/* =========================================================
   0149开奖网 · 红金经典（中式大气）主题
   主色 #b91c1c 深红 / 辅色 #f5c451 香槟金 / 底色 #fdf8f2 浅米
   手机端优先 · 紧凑贴边 · 安全区适配 · 字号 clamp 自适应
   ========================================================= */

:root {
    --red: #b91c1c;
    --red-mid: #8f1414;
    --red-deep: #6f0f0f;
    --gold: #f5c451;
    --gold-light: #f7d774;
    --gold-deep: #d4a12a;
    --bg: #fdf8f2;
    --card: #ffffff;
    --line: #f0e0d0;
    --zebra: #fff5f3;
    --text: #3a2a20;
    --muted: #8a7a6a;
    --radius: 14px;
    --shadow: 0 2px 10px rgba(185, 28, 28, .08);
    --sx-red: #dc2626;
    --sx-blue: #2563eb;
    --sx-green: #16a34a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
    margin: 0;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    font-size: clamp(13px, 3.6vw, 15px);
    line-height: 1.35;
    word-break: break-word;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font-family: inherit; }

.container {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    background: var(--bg);
    min-height: 100vh;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
}

/* ============ 顶部 header ============ */
.header {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-mid) 55%, var(--red-deep) 100%);
    color: #fff;
    padding-top: env(safe-area-inset-top);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px 6px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.logo-img {
    width: clamp(30px, 9vw, 40px);
    height: clamp(30px, 9vw, 40px);
    flex-shrink: 0;
    display: block;
}

.logo-text { min-width: 0; }

.logo-title {
    font-size: clamp(17px, 5vw, 22px);
    font-weight: 900;
    color: var(--gold-light);
    letter-spacing: .5px;
    white-space: nowrap;
    line-height: 1.15;
}

.logo-sub {
    font-size: clamp(11px, 3.5vw, 13px);
    font-weight: 800;
    color: #f6d9a8;
    white-space: nowrap;
    line-height: 1.2;
}

.nav-btn {
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    color: var(--red-deep);
    font-weight: 800;
    font-size: clamp(12px, 3.4vw, 14px);
    padding: 6px 14px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
}

.nav-btn:active { transform: scale(.96); }

.header-tabs {
    display: flex;
    gap: 8px;
    padding: 6px 8px;
    background: linear-gradient(180deg, #f9ecd3, #f2d9a8);
    border-top: 2px solid var(--gold);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 7px 6px;
    border-radius: 999px;
    font-size: clamp(13px, 3.8vw, 15px);
    font-weight: 700;
    color: var(--red-deep);
    background: rgba(255, 255, 255, .55);
    border: 1px solid var(--gold-deep);
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s ease;
}

.tab.active {
    background: linear-gradient(180deg, var(--red), var(--red-mid));
    color: #fff;
    border-color: var(--red-mid);
    box-shadow: 0 2px 8px rgba(127, 16, 16, .35);
}

/* ============ 顶部小开奖条（固定） ============ */
.top-kj-wrap {
    position: sticky;
    top: 0;
    z-index: 200;
    background: linear-gradient(180deg, var(--red) 0%, var(--red-mid) 100%);
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 2px 10px rgba(127, 16, 16, .28);
}

.top-kj-section { display: none; }

body.tab-am .top-kj-section.kj-section-am,
body.tab-hk .top-kj-section.kj-section-hk { display: block; }

body:not(.tab-am):not(.tab-hk) .top-kj-section.kj-section-am { display: block; }

.top-kj-bar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
}

.top-kj-meta {
    width: clamp(58px, 17vw, 76px);
    flex-shrink: 0;
    text-align: center;
    line-height: 1.15;
}

.top-kj-period {
    font-size: clamp(12px, 3.6vw, 16px);
    font-weight: 900;
    color: #fff;
    white-space: nowrap;
    margin-bottom: 2px;
}

.top-kj-period span { color: var(--gold-light); }

.top-kj-history {
    display: inline-block;
    font-size: clamp(11px, 3.1vw, 13px);
    font-weight: 900;
    color: var(--gold);
    border-bottom: 1px solid rgba(245, 196, 81, .6);
    white-space: nowrap;
}

.top-kj-nums { flex: 1; min-width: 0; }

.top-kj-hidden { display: none; }

.kj-nums-big {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    padding: 0;
}

/* ---- 单个球 ---- */
.kj-num-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 0;
    padding: 2px 0;
    gap: 1px;
    text-align: center;
}

.kj-num-big .num-big {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(26px, 7.6vw, 34px);
    height: clamp(26px, 7.6vw, 34px);
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--gold);
    color: var(--red);
    font-weight: 900;
    font-size: clamp(13px, 4vw, 17px);
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(245, 196, 81, .45), 0 1px 3px rgba(0, 0, 0, .18);
}

.kj-num-big .sx-big {
    font-size: clamp(13px, 4vw, 16px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--gold-light);
    white-space: nowrap;
}

.kj-num-big .kj-label {
    font-size: clamp(9px, 2.7vw, 11px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--gold);
    white-space: nowrap;
}

/* 波色真实配色（红 / 蓝 / 绿） */
.kj-num-big.red .num-big { border-color: var(--sx-red); color: #c81e1e; }
.kj-num-big.blue .num-big { border-color: var(--sx-blue); color: #1d4ed8; }
.kj-num-big.green .num-big { border-color: var(--sx-green); color: #15803d; }

/* 特码球：金底红字，明显区分 */
.kj-num-big.te .num-big {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    border-color: var(--red);
    color: var(--red-deep);
    box-shadow: 0 0 0 2px rgba(245, 196, 81, .9), 0 2px 7px rgba(185, 28, 28, .4);
}

.kj-num-big.te .sx-big { color: #ffe6a8; }

/* loading（未开奖占位） */
.kj-num-big.loading .num-big {
    background: #fff7e6;
    border-color: #e6cf96;
    color: #c9a24a;
    box-shadow: 0 0 0 1px rgba(245, 196, 81, .3);
}

.kj-num-big.loading .sx-big { color: #f0d9a8; }

/* 刷新按钮 / 加号 */
.kj-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 800;
    color: var(--red);
    font-size: clamp(16px, 4.6vw, 20px);
    padding: 0 3px;
}

.top-kj-plus-text {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 1px;
    font-size: clamp(11px, 3.2vw, 13px);
    color: var(--red-deep);
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    border-radius: 8px;
    padding: 5px 2px;
    min-width: clamp(18px, 5vw, 22px);
    cursor: pointer;
    user-select: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.kj-refresh-btn.loading,
.detail-kj-refresh-btn.loading { opacity: .6; }

/* 旧的顶部小号球（兼容 buildTopNumObj） */
.kj-num {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: clamp(24px, 8vw, 32px);
    height: clamp(34px, 11vw, 42px);
    border-radius: 6px;
    color: #fff;
    font-weight: 700;
}
.kj-num .num { font-size: clamp(10px, 3.5vw, 14px); }
.kj-num .sx { font-size: clamp(7px, 2.2vw, 10px); }
.kj-num.green { background: linear-gradient(180deg, #16a34a, #15803d); }
.kj-num.red { background: linear-gradient(180deg, #dc2626, #b91c1c); }
.kj-num.blue { background: linear-gradient(180deg, #2563eb, #1d4ed8); }

/* ============ 标语 ============ */
.top-slogan {
    margin: 8px 10px 0;
    padding: 7px 8px;
    text-align: center;
    font-size: clamp(15px, 4.6vw, 20px);
    font-weight: 800;
    color: var(--red-deep);
    background: linear-gradient(180deg, #fff7e8, #fdeac6);
    border: 1px solid #f2d9a8;
    border-radius: 999px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-slogan span { color: var(--gold-deep); padding: 0 3px; }

/* ============ 详细开奖区 ============ */
.detail-kj-stack {
    display: flex;
    flex-direction: column;
    margin: 8px 10px 0;
    gap: 8px;
}

body.tab-am #amDetailSection { order: 1; }
body.tab-am #hkDetailSection { order: 2; }
body.tab-hk #hkDetailSection { order: 1; }
body.tab-hk #amDetailSection { order: 2; }

.detail-kj-section {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 10px 9px;
}

.detail-kj-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--line);
}

.detail-kj-period {
    font-size: clamp(14px, 4.1vw, 17px);
    font-weight: 900;
    color: var(--red);
    white-space: nowrap;
}

.detail-qishu { color: var(--red-deep); }

.detail-kj-time {
    font-size: clamp(13px, 3.8vw, 15px);
    font-weight: 900;
    color: var(--red-deep);
    white-space: nowrap;
}

.detail-kj-history-link {
    margin-left: auto;
    flex-shrink: 0;
    font-size: clamp(12px, 3.4vw, 14px);
    font-weight: 900;
    color: #fff;
    background: linear-gradient(180deg, var(--red), var(--red-mid));
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.detail-kj-nums {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 9px 2px;
}

.detail-kj-nums .kj-num-big {
    flex: 0 0 auto;
    width: auto;
}

.detail-kj-nums .kj-num-big .num-big {
    width: clamp(34px, 10vw, 44px);
    height: clamp(34px, 10vw, 44px);
    font-size: clamp(15px, 4.7vw, 20px);
}

.detail-kj-nums .kj-num-big .sx-big {
    color: #c81e1e;
    font-size: clamp(16px, 4.8vw, 22px);
    font-weight: 900;
}

.detail-kj-nums .kj-plus { color: var(--gold-deep); }

.detail-kj-next-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px dashed var(--line);
}

.detail-kj-next-info {
    flex: 1;
    min-width: 0;
    font-size: clamp(13px, 3.7vw, 15px);
    font-weight: 700;
    color: var(--text);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-next-qishu { color: var(--red); font-weight: 800; }
.detail-next-time { color: var(--muted); }

.detail-kj-refresh-btn {
    flex-shrink: 0;
    font-size: clamp(12px, 3.4vw, 14px);
    font-weight: 800;
    color: var(--red-deep);
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    padding: 5px 14px;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .18);
}

/* ============ 资料区 ============ */
.content { width: 100%; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .3s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.zl-section { padding: 6px 10px 2px; }

.zl-title {
    margin: 10px 0 0;
    padding: 8px 12px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--red) 0%, var(--red-mid) 70%, var(--red-deep) 100%);
    color: var(--gold);
    font-size: clamp(13px, 3.7vw, 15px);
    font-weight: 800;
    letter-spacing: .5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 2px solid var(--gold);
}

.zl-block {
    margin: 10px 0;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.zl-title + .zl-block {
    margin-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
}

.zl-block.has-wide-table { overflow-x: auto; }
.zl-block.is-30ma table.zl-table { font-size: clamp(10px, 2.9vw, 12px); }

.zl-image-ads { padding: 8px; }
.zl-image-ads:empty { display: none; }

.zl-image-ad { margin: 0 0 8px; }
.zl-image-ad:last-child { margin-bottom: 0; }
.zl-image-ad img { display: block; width: 100%; border-radius: 10px; }

/* 期期推荐导航 */
.zl-quicknav { padding: 8px 10px; }

.quicknav-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.quicknav-list li { margin: 0; padding: 0; }

.quicknav-link {
    display: block;
    min-width: 0;
    height: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--zebra);
    border: 1px solid var(--line);
    color: var(--red-deep);
    font-size: clamp(12px, 3.4vw, 14px);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quicknav-link:active { background: #fde8e2; }

.quicknav-qishu {
    color: var(--gold-deep);
    font-weight: 800;
    margin-right: 2px;
}

.quicknav-ad-li { width: 100%; }
.quicknav-ad-slot:empty { display: none; }
.quicknav-ad-li:has(> .quicknav-ad-slot:empty) { display: none; }

.quicknav-ad-link,
.quicknav-ad-text {
    display: block;
    padding: 6px 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff7e8, #fdeac6);
    border: 1px solid #f2d9a8;
    color: var(--red-deep);
    font-size: clamp(12px, 3.4vw, 14px);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============ 数据表格 ============ */
table.zl-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: clamp(11px, 3.2vw, 13px);
    background: var(--card);
}

table.zl-table th {
    background: linear-gradient(180deg, var(--red), var(--red-mid));
    color: var(--gold);
    font-weight: 700;
    text-align: left;
    padding: 6px 6px;
    white-space: nowrap;
    border: 1px solid #a81616;
}

table.zl-table td {
    padding: 5px 6px;
    text-align: left;
    color: var(--text);
    border: 1px solid var(--line);
    vertical-align: middle;
}

table.zl-table tr:nth-child(even) td { background: var(--zebra); }

table.zl-table td:first-child,
table.zl-table th:first-child { padding-left: 8px; white-space: nowrap; }

table.zl-table tbody th {
    padding: 5px 6px;
    text-align: left;
    color: var(--text);
    font-weight: 800;
    border: 1px solid var(--line);
    vertical-align: middle;
    background: var(--card);
}

table.zl-table tbody tr:nth-child(even) th { background: var(--zebra); }

table.zl-table.duilianpt,
table.zl-table.duilianpt1,
table.zl-table.qxtable,
table.zl-table.yjjt,
table.zl-table.jiuxiao-table,
table.zl-table.wucuo-table,
table.zl-table.aaaa-table { table-layout: fixed; }

table.zl-table.duilianpt td,
table.zl-table.duilianpt th,
table.zl-table.duilianpt1 td,
table.zl-table.duilianpt1 th,
table.zl-table.qxtable td,
table.zl-table.qxtable th,
table.zl-table.yjjt td,
table.zl-table.yjjt th,
table.zl-table.jiuxiao-table td,
table.zl-table.jiuxiao-table th,
table.zl-table.wucuo-table td,
table.zl-table.wucuo-table th,
table.zl-table.aaaa-table td,
table.zl-table.aaaa-table th {
    word-break: break-word;
    border-radius: 0 !important;
}

table.zl-table td[style*="#00CC66"],
table.zl-table td[style*="#00cc66"],
table.zl-table td[style*="#008000"],
table.zl-table td[style*="#00FF00"],
table.zl-table td[style*="#00ff00"],
table.zl-table th[style*="#00CC66"],
table.zl-table th[style*="#00cc66"],
table.zl-table th[style*="#008000"],
table.zl-table th[style*="#00FF00"],
table.zl-table th[style*="#00ff00"],
table.zl-table td[bgcolor="#00CC66"],
table.zl-table td[bgcolor="#00cc66"],
table.zl-table td[bgcolor="#008000"],
table.zl-table td[bgcolor="#00FF00"],
table.zl-table td[bgcolor="#00ff00"],
table.zl-table th[bgcolor="#00CC66"],
table.zl-table th[bgcolor="#00cc66"],
table.zl-table th[bgcolor="#008000"],
table.zl-table th[bgcolor="#00FF00"],
table.zl-table th[bgcolor="#00ff00"] {
    background: linear-gradient(180deg, #f6d8ef, #e8b7e0) !important;
    color: var(--red-deep) !important;
}

table.zl-table td[style*="#FFCCFF"],
table.zl-table td[style*="#ffccff"],
table.zl-table td[style*="#f2ffa9"],
table.zl-table td[style*="#F2FFA9"] {
    background: linear-gradient(180deg, #fff7e8, #fdeac6) !important;
    color: var(--red-deep) !important;
    font-weight: 800;
}

table.zl-table td[style*="#05b34c"],
table.zl-table td[style*="#05B34C"],
table.zl-table td[style*="#FFA500"],
table.zl-table td[style*="#ffa500"] {
    background: linear-gradient(180deg, var(--red), var(--red-mid)) !important;
    color: var(--gold-light) !important;
    font-weight: 800;
}

table.zl-table td[style*="#FFCCFF"] font,
table.zl-table td[style*="#ffccff"] font,
table.zl-table td[style*="#f2ffa9"] font,
table.zl-table td[style*="#F2FFA9"] font,
table.zl-table td[style*="#00CC66"] font,
table.zl-table td[style*="#00cc66"] font,
table.zl-table td[style*="#008000"] font,
table.zl-table td[style*="#00FF00"] font,
table.zl-table td[style*="#00ff00"] font,
table.zl-table td[style*="#05b34c"] font,
table.zl-table td[style*="#05B34C"] font,
table.zl-table td[style*="#FFA500"] font,
table.zl-table td[style*="#ffa500"] font {
    color: inherit !important;
}

table.zl-table .jx {
    color: var(--red-deep);
    font-weight: 800;
}

table.zl-table.multi-col,
table.zl-table.sx-table:not(.attr-table) { table-layout: fixed; }

table.zl-table.attr-table td,
table.zl-table.attr-table th { white-space: normal; }

/* 表格内的生肖标签 */
.zl-table .zl { margin: 0 2px; }

/* 兼容源码中的各类专属表：统一交给 .zl-table 规则 */
table.bose-table, table.santou-table, table.yizhou-table,
table.danshuang-table, table.qqsh-table, table.sanqi-table,
table.sanshiba-table, table.miezhuang-table, table.dazao-table,
table.duilianpt, table.jinpal-table, table.jinsuanpan-table,
table.aaaa-table, table.zhougong-table, table.wuwei-table,
table.liuxiao-table, table.erzhonger-table, table.erqi-table,
table.huobao-table, table.zhuangjia-table, table.jiuxiao-table,
table.wucuo-table, table.jinma-table { width: 100%; max-width: 100%; }

/* ============ 疯狂⑤码字体放大 ============ */
table.zl-table:has(td.dudu) {
    font-size: clamp(13px, 3.8vw, 16px) !important;
    table-layout: fixed !important;
}

table.zl-table:has(td.dudu) td {
    font-size: inherit !important;
    line-height: 1.55 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    vertical-align: top !important;
}

table.zl-table td.dudu {
    padding: 8px 10px !important;
    font-size: clamp(15px, 4.3vw, 18px) !important;
    font-weight: 800 !important;
    line-height: 1.7 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

table.zl-table td.dudu font,
table.zl-table:has(td.dudu) td font,
table.zl-table:has(td.dudu) td span {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* ============ 属性知识模块统一配色 ============ */
.zl-block .sx,
.module-body .sx {
    background: transparent !important;
    padding: 0 !important;
}

.zl-block .sx table,
.module-body .sx table {
    width: 100% !important;
    margin-top: 10px !important;
    border-collapse: collapse !important;
    background: var(--card) !important;
    border: 1px solid var(--line) !important;
}

.zl-block .sx table:first-child,
.module-body .sx table:first-child { margin-top: 0 !important; }

.zl-block .sx th,
.module-body .sx th {
    height: auto !important;
    padding: 8px 10px !important;
    background: linear-gradient(180deg, #fff7e8, #fdeac6) !important;
    color: var(--red-deep) !important;
    font-weight: 900 !important;
    border: 1px solid var(--line) !important;
    text-align: center !important;
}

.zl-block .sx td,
.module-body .sx td {
    padding: 7px 8px !important;
    text-align: center !important;
    color: var(--text) !important;
    border: 1px solid var(--line) !important;
    background: var(--card) !important;
}

.zl-block .sx tr:nth-child(even) td,
.module-body .sx tr:nth-child(even) td { background: var(--zebra) !important; }

.zl-block .sx td.a-left,
.module-body .sx td.a-left {
    text-align: left !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

.zl-block .sx ul.sx1,
.module-body .sx ul.sx1 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 6px !important;
}

.zl-block .sx ul.sx1 li,
.module-body .sx ul.sx1 li {
    flex: 0 0 calc(33.3333% - 6px) !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.zl-block .sx ul.sx1 li dl,
.module-body .sx ul.sx1 li dl {
    margin: 0 !important;
    padding: 8px 6px !important;
    background: linear-gradient(180deg, #fffdfa, #fff5f3) !important;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
}

.zl-block .sx ul.sx1 li dl dt,
.module-body .sx ul.sx1 li dl dt {
    font-weight: 900 !important;
    color: var(--red-deep) !important;
}

.zl-block .sx ul.sx1 li dl dd,
.module-body .sx ul.sx1 li dl dd {
    margin: 4px 0 0 !important;
}

.zl-block .sx + div,
.module-body .sx + div {
    margin-top: 10px !important;
    padding: 10px 12px !important;
    text-align: center !important;
    font-size: 13px !important;
    color: #7a2a0a !important;
    background: linear-gradient(180deg, #fff7e8, #fdeac6) !important;
    border: 1px solid #f2d9a8 !important;
    border-radius: 10px !important;
}

/* ============ 页脚 ============ */
.footer {
    margin: 12px 10px 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(135deg, var(--red) 0%, var(--red-mid) 60%, var(--red-deep) 100%);
    border-radius: var(--radius);
    border-top: 2px solid var(--gold);
    text-align: center;
    color: #fbe6c9;
}

.footer-ad { margin-bottom: 8px; }
.footer-ad:empty { display: none; }

.footer-ad a,
.footer-ad span {
    display: inline-block;
    margin: 3px 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: var(--gold-light);
    font-size: clamp(12px, 3.3vw, 13px);
    font-weight: 700;
}

.footer-info {
    font-size: clamp(12px, 3.4vw, 13px);
    color: #ffe9c9;
    line-height: 1.5;
}

.footer-copyright {
    margin-top: 4px;
    font-size: clamp(11px, 3.2vw, 13px);
    font-weight: 700;
    color: var(--gold);
    letter-spacing: .5px;
}

.footer-icp { color: #f3d3a8 !important; }

/* ============ 悬浮按钮 ============ */
.float-btn-group {
    position: fixed;
    right: calc(10px + env(safe-area-inset-right));
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    width: clamp(46px, 13vw, 54px);
    height: clamp(46px, 13vw, 54px);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: clamp(10px, 2.9vw, 12px);
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    color: var(--red-deep);
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    box-shadow: 0 4px 12px rgba(185, 28, 28, .35);
    cursor: pointer;
    user-select: none;
}

.float-btn:active { transform: scale(.92); }

.float-btn.back-home {
    color: #fff;
    background: linear-gradient(180deg, var(--red), var(--red-mid));
    box-shadow: 0 4px 12px rgba(127, 16, 16, .4);
}

/* ============ 弹层（历史 / 资料） ============ */
.history-mask,
.module-mask {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(50, 12, 12, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

.history-popup,
.module-popup {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 910;
    width: min(94vw, 640px);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: var(--card);
    border-radius: 16px;
    border: 2px solid var(--gold);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -48%) scale(.98);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.history-mask.show,
.module-mask.show { opacity: 1; visibility: visible; }

.history-popup.show,
.module-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.history-head,
.module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    color: var(--gold);
}

.history-head .title,
.module-head .title {
    font-size: clamp(14px, 4vw, 16px);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-close,
.module-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: var(--gold-light);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.history-close:active,
.module-close:active { transform: scale(.92); }

.history-body,
.module-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
}

.module-body .zl-block { margin: 0; box-shadow: none; }

/* 历史记录表 */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: clamp(12px, 3.5vw, 14px);
}

.history-table th {
    background: linear-gradient(180deg, var(--red), var(--red-mid));
    color: var(--gold);
    font-weight: 700;
    text-align: left;
    padding: 6px 6px;
    white-space: nowrap;
    border: 1px solid #a81616;
}

.history-table td {
    padding: 6px 6px;
    text-align: left;
    border: 1px solid var(--line);
    vertical-align: middle;
}

.history-table tr:nth-child(even) td { background: var(--zebra); }

.qishu-cell {
    color: var(--red);
    font-weight: 800;
    white-space: nowrap;
}

.history-nums {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.history-num {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: clamp(28px, 8vw, 34px);
    padding: 2px 3px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid var(--gold);
    line-height: 1.1;
}

.history-num .hn-num {
    font-size: clamp(13px, 3.9vw, 16px);
    font-weight: 900;
    color: var(--red);
}

.history-num .hn-sx {
    font-size: clamp(11px, 3.2vw, 13px);
    font-weight: 900;
    color: var(--muted);
}

.history-num.red { border-color: var(--sx-red); }
.history-num.red .hn-num { color: #c81e1e; }
.history-num.blue { border-color: var(--sx-blue); }
.history-num.blue .hn-num { color: #1d4ed8; }
.history-num.green { border-color: var(--sx-green); }
.history-num.green .hn-num { color: #15803d; }

.history-num.te {
    background: linear-gradient(180deg, var(--gold-light), var(--gold-deep));
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(245, 196, 81, .85);
}
.history-num.te .hn-num { color: var(--red-deep); }
.history-num.te .hn-sx { color: #7a2a0a; }

.history-plus {
    font-weight: 800;
    color: var(--red);
    font-size: clamp(14px, 4vw, 17px);
    padding: 0 2px;
}

/* ============ 横竖屏 / 小屏优化 ============ */
@media (max-width: 380px) {
    .top-kj-meta { width: 56px; }
    .kj-num-big .sx-big { font-size: 14px; }
    .detail-kj-nums { gap: 5px; }
    .quicknav-list { grid-template-columns: 1fr; }
}

@media (min-width: 700px) {
    .quicknav-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (orientation: landscape) and (max-height: 520px) {
    .header-top { padding: 4px 10px 3px; }
    .logo-img { width: 28px; height: 28px; }
    .header-tabs { padding: 4px 8px; }
    .tab { padding: 5px 6px; }
    .top-kj-bar { padding: 3px 6px; }
    .kj-num-big .num-big { width: 26px; height: 26px; font-size: 13px; }
    .kj-num-big .sx-big { font-size: 12px; }
    .float-btn-group { flex-direction: row; }
}

@media (max-width: 480px) {
    .detail-kj-nums {
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 3px;
        padding: 8px 0;
    }

    .detail-kj-nums .kj-num-big {
        flex: 1 1 0;
        min-width: 0;
    }

    .detail-kj-nums .kj-num-big .num-big {
        width: clamp(28px, 8.1vw, 34px);
        height: clamp(28px, 8.1vw, 34px);
        font-size: clamp(14px, 4vw, 17px);
    }

    .detail-kj-nums .kj-num-big .sx-big {
        font-size: clamp(12px, 3.6vw, 16px);
        white-space: nowrap;
    }

    .detail-kj-nums .kj-plus {
        flex: 0 0 auto;
        padding: 0 1px;
        font-size: clamp(14px, 3.8vw, 18px);
    }

    .zl-title {
        font-size: clamp(16px, 4.6vw, 19px);
        line-height: 1.35;
    }

    .quicknav-link,
    .quicknav-ad-link,
    .quicknav-ad-text {
        font-size: clamp(13px, 3.8vw, 15px);
        line-height: 1.45;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .zl-block {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table.zl-table,
    table.zl-table.duilianpt,
    table.zl-table.duilianpt1,
    table.zl-table.qxtable,
    table.zl-table.yjjt,
    table.zl-table.jiuxiao-table,
    table.zl-table.wucuo-table,
    table.zl-table.aaaa-table,
    table.zl-table.multi-col,
    table.zl-table.sx-table:not(.attr-table) {
        table-layout: auto !important;
        font-size: clamp(13px, 3.9vw, 15px);
    }

    table.zl-table th,
    table.zl-table td,
    table.zl-table tbody th,
    table.zl-table.duilianpt td,
    table.zl-table.duilianpt th,
    table.zl-table.duilianpt1 td,
    table.zl-table.duilianpt1 th,
    table.zl-table.qxtable td,
    table.zl-table.qxtable th,
    table.zl-table.yjjt td,
    table.zl-table.yjjt th,
    table.zl-table.jiuxiao-table td,
    table.zl-table.jiuxiao-table th,
    table.zl-table.wucuo-table td,
    table.zl-table.wucuo-table th,
    table.zl-table.aaaa-table td,
    table.zl-table.aaaa-table th {
        font-size: clamp(13px, 3.9vw, 15px) !important;
        line-height: 1.55 !important;
        padding: 6px 7px !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    table.zl-table td:first-child,
    table.zl-table th:first-child {
        white-space: normal !important;
    }

    .float-btn-group {
        right: 8px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        gap: 8px;
    }

    .float-btn {
        width: 48px;
        height: 48px;
        font-size: 11px;
    }
}

/* ===== 从主站同步：资料板块专属表格规则（仅当前站使用） ===== */
table.duilianpt1.sanqi-table th font[color="#000000"] { color: #000000 !important; }
table.duilianpt1.sanqi-table td font[color="#000000"] { color: #000000 !important; }
table.duilianpt1.sanshiba-table td font[color="#000001"] { color: #000001 !important; }
table.duilianpt1.sanshiba-table td font[color="#0000FF"] { color: #0000FF !important; }
table.duilianpt1.sanshiba-table td font[color="#FF0000"] { color: #FF0000 !important; }
table.duilianpt1.miezhuang-table td font[color="#000000"] { color: #000000 !important; }
table.duilianpt1.miezhuang-table td font[color="#C0C0C0"] { color: #C0C0C0 !important; }

table.zl-table.dazao-table {
    table-layout: auto !important;
    border-collapse: collapse !important;
    border: 1px solid #FFFFFF !important;
}
table.zl-table.dazao-table td {
    padding: 0 !important;
    line-height: normal !important;
    font-size: clamp(16px, 5vw, 26px) !important;
    font-weight: 700 !important;
    font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
    border: 1px solid #FFFFFF !important;
    word-break: keep-all !important;
    white-space: nowrap !important;
}
table.zl-table.dazao-table td:first-child { width: 35% !important; min-width: 0 !important; max-width: none !important; }
table.zl-table.dazao-table td:nth-child(2) { min-width: 0 !important; width: auto !important; }
table.zl-table.dazao-table td:last-child { min-width: 0 !important; max-width: none !important; white-space: normal !important; }
table.zl-table.dazao-table td[colspan="2"] { text-align: center !important; width: 100% !important; }
table.zl-table.dazao-table td[bgcolor="#F4F4F4"] { background: #F4F4F4 !important; }
table.zl-table.dazao-table td[style*="05b34c"] { background: #05b34c !important; }
table.zl-table.dazao-table td[style*="FFCCFF"] { background: #FFCCFF !important; }
table.zl-table.dazao-table td font[color="#000080"] { color: #000080 !important; }
table.zl-table.dazao-table td font[color="#FF0000"] { color: #FF0000 !important; }
table.zl-table.dazao-table td font[color="#0000FF"] { color: #0000FF !important; }
table.zl-table.dazao-table td font[color="#FFFFFF"] { color: #FFFFFF !important; }
table.zl-table.dazao-table td font[color="#008000"] { color: #008000 !important; }

table.duilianpt {
    table-layout: auto !important;
    width: 100% !important;
    color: #FF0000;
    border-radius: 0 !important;
    overflow: hidden;
    text-align: center;
    background: #fff !important;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 !important;
}
table.duilianpt tr {
    height: 30px;
    border-bottom: none !important;
    background: #fff !important;
}
table.duilianpt tr:nth-child(even) th {
    background: #fff !important;
}
table.duilianpt th {
    font-weight: bold !important;
    border: 1px solid #C0C0C0 !important;
    font-size: 18pt !important;
    text-align: center !important;
    color: #000000 !important;
    padding: 4px 3px !important;
    line-height: 1.6;
    vertical-align: middle;
    white-space: normal !important;
    word-break: keep-all;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
}
table.duilianpt th:first-child,
table.duilianpt th:last-child {
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
}
table.duilianpt .zl {
    font-size: 22pt;
    font-weight: bold;
    color: #FF0000 !important;
    white-space: normal !important;
    word-break: keep-all !important;
    line-height: 1.6 !important;
}
table.duilianpt td,
table.duilianpt td:first-child,
table.duilianpt td:last-child {
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
    white-space: normal !important;
    padding: 6px 3px !important;
}
table.duilianpt td font[color="#0000FF"] { color: #0000FF !important; }
table.duilianpt td font[color="#FF0000"] { color: #FF0000 !important; }
table.duilianpt td font[color="#008000"] { color: #008000 !important; }
table.duilianpt td font[color="#000000"] { color: #000000 !important; }
table.duilianpt td > font { font-size: 16px !important; }

body .zl-block[data-key="hk19"] table.duilianpt th {
    font-size: clamp(13px, 3.8vw, 15px) !important;
    line-height: 1.5 !important;
}
body .zl-block[data-key="hk19"] table.duilianpt .zl {
    font-size: clamp(14px, 4.2vw, 18px) !important;
    line-height: 1.5 !important;
}

body .zl-block:not([data-key="hk17"]) table,
body .zl-block:not([data-key="hk17"]) table th,
body .zl-block:not([data-key="hk17"]) table td,
body .zl-block:not([data-key="hk17"]) table th:nth-child(n),
body .zl-block:not([data-key="hk17"]) table td:nth-child(n) {
    text-align: left !important;
}
body .zl-block:not([data-key="hk17"]) table th,
body .zl-block:not([data-key="hk17"]) table td,
body .zl-block:not([data-key="hk17"]) table th:nth-child(n),
body .zl-block:not([data-key="hk17"]) table td:nth-child(n) {
    font-size: clamp(13px, 4.2vw, 22px) !important;
    font-weight: 900 !important;
    padding-left: 8px !important;
    padding-right: 6px !important;
}
body .zl-block:not([data-key="hk17"]) table .zl {
    font-size: clamp(15px, 5vw, 28px) !important;
    font-weight: 900 !important;
}
body .zl-block:not([data-key="hk17"]) table font {
    font-size: inherit !important;
    font-weight: inherit !important;
}
body .zl-block:not([data-key="hk17"]) table span {
    font-weight: inherit !important;
}

@media (max-width: 768px) {
    body .zl-block[data-key="hk21"] table.duilianpt1 th,
    body .zl-block[data-key="hk27"] table.duilianpt1 th,
    body .zl-block[data-key="hk21"] table.duilianpt1 td,
    body .zl-block[data-key="hk27"] table.duilianpt1 td {
        padding: 5px 4px !important;
    }
    body .zl-block[data-key="hk18"] table.qxtable.yxym td,
    body .zl-block[data-key="hk07"] table.qxtable.yxym td {
        padding: 5px 4px !important;
    }
    body .zl-block[data-key="hk18"] table.qxtable.yxym td[colspan="3"],
    body .zl-block[data-key="hk07"] table.qxtable.yxym td[colspan="3"] {
        padding: 6px 4px !important;
    }
    body .zl-block[data-key="hk30"] table.zl-table.dazao-table td {
        padding: 4px 3px !important;
    }
}
@media (max-width: 380px) {
    body .zl-block[data-key="hk21"] table.duilianpt1 th,
    body .zl-block[data-key="hk27"] table.duilianpt1 th,
    body .zl-block[data-key="hk21"] table.duilianpt1 td,
    body .zl-block[data-key="hk27"] table.duilianpt1 td {
        padding: 4px 3px !important;
    }
    body .zl-block[data-key="hk18"] table.qxtable.yxym td,
    body .zl-block[data-key="hk07"] table.qxtable.yxym td {
        padding: 4px 3px !important;
    }
    body .zl-block[data-key="hk30"] table.zl-table.dazao-table td {
        padding: 4px 3px !important;
    }
}

table.sx-table.thirtyma-table {
    min-width: 0 !important;
    table-layout: auto !important;
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1px solid #9ca3af !important;
}
table.sx-table.thirtyma-table th,
table.sx-table.thirtyma-table td {
    padding: 4px 8px !important;
    vertical-align: middle !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-wrap: normal !important;
    word-break: keep-all !important;
    white-space: normal !important;
    border: 1px solid #9ca3af !important;
}
td.thirtyma-cell {
    text-align: left !important;
    padding-left: 10px !important;
    padding-right: 6px !important;
    line-height: 1.3 !important;
    font-weight: 900 !important;
    font-family: Arial, "Microsoft YaHei", sans-serif !important;
}
.thirtyma-header {
    text-align: center !important;
    background: linear-gradient(180deg, #a7f3d0 0%, #059669 100%) !important;
    color: #000000 !important;
    font-weight: 900 !important;
    font-size: 23px !important;
    padding: 10px 6px !important;
    border: 1px solid #9ca3af !important;
}
.thirtyma-zodiac-name {
    color: #2563eb !important;
    font-weight: 900 !important;
    font-size: 23px !important;
    display: inline !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
}
.thirtyma-nums {
    color: #000000 !important;
    font-weight: 900 !important;
    font-size: 23px !important;
    display: inline !important;
    letter-spacing: 0 !important;
    margin-left: 0 !important;
}
.thirtyma-num-highlight {
    background-color: #FFFF00 !important;
    color: #000000 !important;
    font-weight: 900 !important;
    padding: 0 2px !important;
    display: inline !important;
}
.thirtyma-draw-row td {
    background-color: #CCFFFF !important;
    color: #FF0000 !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 28px !important;
    padding: 9px 6px !important;
    white-space: normal !important;
    word-break: keep-all !important;
    border: 1px solid #9ca3af !important;
}
@media (max-width: 540px) {
    table.sx-table.thirtyma-table th,
    table.sx-table.thirtyma-table td { padding: 4px 5px !important; }
    td.thirtyma-cell { padding-left: 6px !important; padding-right: 4px !important; }
    .thirtyma-header { font-size: 17px !important; padding: 8px 4px !important; }
    .thirtyma-zodiac-name { font-size: 16px !important; }
    .thirtyma-nums { font-size: 16px !important; }
    .thirtyma-draw-row td { font-size: 19px !important; padding: 7px 4px !important; }
}
@media (max-width: 400px) {
    table.sx-table.thirtyma-table th,
    table.sx-table.thirtyma-table td { padding: 4px 4px !important; }
    td.thirtyma-cell { padding-left: 5px !important; padding-right: 3px !important; }
    .thirtyma-header { font-size: 14px !important; padding: 7px 3px !important; }
    .thirtyma-zodiac-name { font-size: 13px !important; }
    .thirtyma-nums { font-size: 13px !important; }
    .thirtyma-draw-row td { font-size: 15px !important; padding: 7px 3px !important; }
}
@media (max-width: 350px) {
    .thirtyma-zodiac-name { font-size: 11px !important; }
    .thirtyma-nums { font-size: 11px !important; }
    .thirtyma-header { font-size: 12px !important; }
    .thirtyma-draw-row td { font-size: 12px !important; }
}

table.qxtable.yxym {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    border: 1px solid #C0C0C0 !important;
    background: #FFFFFF !important;
}
table.qxtable.yxym td {
    border: 1px solid #C0C0C0 !important;
    padding: 6px 4px !important;
    vertical-align: middle !important;
    text-align: center !important;
    font-size: clamp(14px, 4vw, 18px) !important;
    color: #000000 !important;
    white-space: normal !important;
    word-break: keep-all !important;
    line-height: 1.6 !important;
}
table.qxtable.yxym td:first-child {
    font-weight: bold !important;
    white-space: nowrap;
}
table.qxtable.yxym td:nth-child(2) {
    color: #FF0000 !important;
    font-weight: bold !important;
    font-size: clamp(16px, 5vw, 22px) !important;
    letter-spacing: 1px !important;
}
table.qxtable.yxym td:nth-child(2) span[style*="background-color: #FFFF00"] {
    background-color: #FFFF00 !important;
    padding: 0 2px !important;
}
table.qxtable.yxym td:last-child {
    font-weight: bold !important;
    white-space: nowrap;
}
@media (max-width: 600px) {
    table.qxtable.yxym td { padding: 5px 3px !important; }
}
@media (max-width: 400px) {
    table.qxtable.yxym td { padding: 4px 2px !important; }
}

table.qxtable.yxym td[colspan="3"] {
    background: #f7f0d0 !important;
    font-size: clamp(13px, 3.8vw, 15px) !important;
    color: #333333 !important;
    padding: 7px 3px !important;
    line-height: 1.8 !important;
}
table.qxtable.yxym td[colspan="3"] span.jx {
    color: #FF0000;
    font-weight: bold;
    letter-spacing: 1px;
}
table.qxtable.yxym td[colspan="3"][style*="background: #f7f7f7"] {
    background: #f7f7f7 !important;
}
@media (max-width: 600px) {
    table.qxtable.yxym td[colspan="3"] { padding: 6px 3px !important; }
}

@media (max-width: 600px) {
    table.duilianpt1 td { padding: 6px 4px !important; }
    table.duilianpt1 tr { height: auto !important; }
    table.duilianpt th { padding: 6px 4px !important; }
    table.duilianpt tr { height: auto !important; }
    table.yjjt td { padding: 6px 4px !important; }
    table.duilianpt1.bose-table th { white-space: normal !important; }
    table.duilianpt1.bose-table td { white-space: normal !important; }
    table.duilianpt1.bose-table .zl { white-space: normal !important; }
}
@media (max-width: 400px) {
    table.duilianpt1 td { padding: 5px 3px !important; }
    table.duilianpt th { padding: 5px 3px !important; }
    table.yjjt td { padding: 5px 3px !important; }
}

table.zl-table.jinpal-table,
table.zl-table.jinsuanpan-table,
body .zl-block table.zl-table.aaaa-table,
body .zl-block table.zl-table.zhougong-table,
body .zl-block table.zl-table.wuwei-table,
body .zl-block table.zl-table.liuxiao-table,
body .zl-block table.zl-table.erzhonger-table,
body .zl-block table.zl-table.erqi-table,
body .zl-block table.zl-table.sanqi-table,
body .zl-block table.zl-table.huobao-table,
body .zl-block table.zl-table.zhuangjia-table,
body .zl-block table.zl-table.jiuxiao-table,
body .zl-block table.zl-table.wucuo-table,
body .zl-block table.zl-table.jinma-table {
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: collapse !important;
    background: #fff !important;
    margin: 0 !important;
}

table.zl-table.jinpal-table tr,
table.zl-table.jinsuanpan-table tr,
body .zl-block table.zl-table.aaaa-table tr,
body .zl-block table.zl-table.zhougong-table tr,
body .zl-block table.zl-table.wuwei-table tr,
body .zl-block table.zl-table.liuxiao-table tr,
body .zl-block table.zl-table.erzhonger-table tr,
body .zl-block table.zl-table.erqi-table tr,
body .zl-block table.zl-table.sanqi-table tr,
body .zl-block table.zl-table.huobao-table tr,
body .zl-block table.zl-table.zhuangjia-table tr {
    height: auto !important;
    border-bottom: none !important;
    background: #fff !important;
}

table.zl-table.jinpal-table tr:nth-child(even) td,
table.zl-table.jinsuanpan-table tr:nth-child(even) td {
    background: #fff !important;
}

table.zl-table.jinpal-table td,
table.zl-table.jinsuanpan-table td,
body .zl-block table.zl-table.zhougong-table td,
body .zl-block table.zl-table.wuwei-table td,
body .zl-block table.zl-table.liuxiao-table td,
body .zl-block table.zl-table.erzhonger-table td,
body .zl-block table.zl-table.huobao-table th,
body .zl-block table.zl-table.zhuangjia-table th,
body .zl-block table.zl-table.wucuo-table th,
body .zl-block table.zl-table.jinma-table td {
    border: 1px solid #C0C0C0 !important;
    padding: 6px 8px !important;
    font-size: clamp(14px, 4.2vw, 18px) !important;
    line-height: 1.6;
    vertical-align: middle;
    text-align: left !important;
    font-weight: bold !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: auto !important;
}

table.zl-table.jinpal-table td,
table.zl-table.jinsuanpan-table td { text-align: center !important; max-width: none !important; word-break: keep-all !important; overflow-wrap: break-word !important; white-space: normal !important; }
table.zl-table.jinpal-table td { color: #FF0000 !important; }
table.zl-table.jinsuanpan-table td { color: #FF0000 !important; }
table.zl-table.jinpal-table td:first-child,
table.zl-table.jinsuanpan-table td:first-child,
table.zl-table.jinsuanpan-table td:nth-child(3) {
    white-space: nowrap !important;
    text-align: center !important;
    color: #000000 !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}
table.zl-table.jinpal-table td:nth-child(2) {
    text-align: left !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
table.zl-table.jinsuanpan-table td:nth-child(2) {
    text-align: center !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    white-space: nowrap !important;
}
table.zl-table.jinpal-table td span[style*="FFFF00"],
table.zl-table.jinpal-table td span[style*="background-color"],
table.zl-table.jinsuanpan-table td span[style*="FFFF00"],
table.zl-table.jinsuanpan-table td span[style*="background-color"],
body .zl-block table.zl-table.wuwei-table td span[style*="FFFF00"],
body .zl-block table.zl-table.wuwei-table td span[style*="background-color"],
body .zl-block table.zl-table.liuxiao-table td span[style*="FFFF00"],
body .zl-block table.zl-table.liuxiao-table td span[style*="background-color"],
body .zl-block table.zl-table.erzhonger-table td span[style*="FFFF00"],
body .zl-block table.zl-table.erzhonger-table td span[style*="background-color"] {
    background-color: #FFFF00 !important;
}
table.zl-table.jinpal-table td font[color="#000000"],
table.zl-table.jinsuanpan-table td font[color="#000000"],
body .zl-block table.zl-table.wuwei-table td font[color="#000000"],
body .zl-block table.zl-table.erzhonger-table td font[color="#000000"],
body .zl-block table.zl-table.liuxiao-table td font[color="#000000"] { color: #000000 !important; }
table.zl-table.jinpal-table td font[color="#FF0000"],
table.zl-table.jinsuanpan-table td font[color="#FF0000"] { color: #FF0000 !important; }

body .zl-block table.zl-table.aaaa-table td {
    border: 1px solid #FFFFFF !important;
    padding: 5px 6px !important;
    font-size: clamp(14px, 4.2vw, 18px) !important;
    line-height: 1.5;
    vertical-align: middle;
    text-align: left !important;
    font-weight: 900 !important;
    font-family: "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    white-space: nowrap !important;
}
body .zl-block table.zl-table.aaaa-table td font,
body .zl-block table.zl-table.aaaa-table td span {
    font-weight: inherit !important;
}
body .zl-block table.zl-table.aaaa-table td:first-child { width: 50% !important; }
body .zl-block table.zl-table.aaaa-table td:nth-child(2) { width: 50% !important; }
body .zl-block table.zl-table.aaaa-table td[colspan="2"] {
    width: 100% !important;
    text-align: center !important;
    white-space: normal !important;
}
body .zl-block table.zl-table.aaaa-table td[bgcolor="#F4F4F4"] { background: #F4F4F4 !important; }
body .zl-block table.zl-table.aaaa-table td[style*="f2ffa9"] { background: #f2ffa9 !important; }
body .zl-block table.zl-table.aaaa-table td[style*="FFA500"] { background: #FFA500 !important; }
body .zl-block table.zl-table.aaaa-table td font[color="#000080"] { color: #000080 !important; }
body .zl-block table.zl-table.aaaa-table td font[color="#FF0000"] { color: #FF0000 !important; }
body .zl-block table.zl-table.aaaa-table td font[color="#0000FF"] { color: #0000FF !important; }
body .zl-block table.zl-table.aaaa-table td font[color="#000000"] { color: #000000 !important; }
body .zl-block table.zl-table.aaaa-table td span[style*="FFFF00"],
body .zl-block table.zl-table.aaaa-table td span[style*="background-color"] { background-color: #FFFF00 !important; }

body .zl-block table.zl-table.zhougong-table td { color: #FF0000 !important; white-space: nowrap !important; }
body .zl-block table.zl-table.zhougong-table td font[color="#0000FF"] { color: #0000FF !important; }
body .zl-block table.zl-table.zhougong-table td font[color="#FF00FF"] { color: #FF00FF !important; }
body .zl-block table.zl-table.zhougong-table td font[color="#008000"] { color: #008000 !important; }
body .zl-block table.zl-table.zhougong-table td span.zl { color: #FF0000 !important; }

body .zl-block table.zl-table.wuwei-table td,
body .zl-block table.zl-table.liuxiao-table td,
body .zl-block table.zl-table.erzhonger-table td { color: #000000 !important; white-space: nowrap !important; word-break: keep-all !important; overflow-wrap: break-word !important; }
body .zl-block table.zl-table.wuwei-table td font[color="#808080"] { color: #808080 !important; }
body .zl-block table.zl-table.wuwei-table td span.zl,
body .zl-block table.zl-table.liuxiao-table td span.zl,
body .zl-block table.zl-table.erzhonger-table td span.zl { color: #FF0000 !important; }
body .zl-block table.zl-table.liuxiao-table td font[color="#800000"] { color: #800000 !important; }
body .zl-block table.zl-table.liuxiao-table td font[color="#0000FF"] { color: #0000FF !important; }

body .zl-block table.zl-table.erqi-table th,
body .zl-block table.zl-table.erqi-table td,
body .zl-block table.zl-table.sanqi-table th,
body .zl-block table.zl-table.sanqi-table td {
    border: 1px solid #C0C0C0 !important;
    padding: 6px 4px !important;
    font-size: clamp(14px, 4.2vw, 18px) !important;
    line-height: 1.5;
    vertical-align: middle;
    text-align: center !important;
    color: #000000 !important;
    font-weight: bold !important;
    background: #fff !important;
    min-width: 0 !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
}
body .zl-block table.zl-table.erqi-table th:first-child,
body .zl-block table.zl-table.sanqi-table th:first-child {
    width: 22% !important;
    min-width: 52px !important;
    white-space: nowrap !important;
    font-size: clamp(13px, 3.8vw, 17px) !important;
}
body .zl-block table.zl-table.erqi-table th:last-child,
body .zl-block table.zl-table.sanqi-table th:last-child {
    width: 24% !important;
    min-width: 56px !important;
    white-space: nowrap !important;
    font-size: clamp(13px, 3.8vw, 17px) !important;
}
body .zl-block table.zl-table.erqi-table td,
body .zl-block table.zl-table.sanqi-table td { white-space: nowrap !important; }
body .zl-block table.zl-table.erqi-table td font[color="#0000FF"],
body .zl-block table.zl-table.sanqi-table td font[color="#0000FF"] { color: #0000FF !important; }
body .zl-block table.zl-table.erqi-table th font[color="#000000"],
body .zl-block table.zl-table.sanqi-table th font[color="#000000"] { color: #000000 !important; }
body .zl-block table.zl-table.erqi-table span.zl,
body .zl-block table.zl-table.sanqi-table span.zl { color: #FF0000 !important; }
body .zl-block table.zl-table.erqi-table td span[style*="FFFF00"],
body .zl-block table.zl-table.erqi-table td span[style*="background-color"],
body .zl-block table.zl-table.sanqi-table td span[style*="FFFF00"],
body .zl-block table.zl-table.sanqi-table td span[style*="background-color"] { background-color: #FFFF00 !important; }

body .zl-block table.zl-table.huobao-table th,
body .zl-block table.zl-table.zhuangjia-table th,
body .zl-block table.zl-table.wucuo-table th,
body .zl-block table.zl-table.jinma-table td {
    color: #000000 !important;
    background: #fff !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
}
body .zl-block table.zl-table.zhuangjia-table th span[style*="background-color"] {
    display: inline !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    white-space: normal !important;
}
body .zl-block table.zl-table.huobao-table .zl {
    font-size: clamp(15px, 4.8vw, 20px) !important;
    color: #FF0000;
    font-weight: bold;
}
body .zl-block table.zl-table.zhuangjia-table .zl,
body .zl-block table.zl-table.zhuangjia-table th span[style*="background-color"],
body .zl-block table.zl-table.jinma-table .zl {
    font-size: clamp(14px, 4.5vw, 19px) !important;
    font-weight: bold;
}
body .zl-block table.zl-table.huobao-table th[bgcolor="#C0C0C0"],
body .zl-block table.zl-table.huobao-table tr:last-child th {
    background: #C0C0C0 !important;
}
body .zl-block table.zl-table.wucuo-table .zl {
    font-size: clamp(15px, 4.8vw, 20px) !important;
    color: #FF0000;
    font-weight: bold;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
}

body .zl-block table.zl-table.jiuxiao-table td {
    border: 1px solid #C0C0C0 !important;
    padding: 6px 5px !important;
    font-size: clamp(13px, 4vw, 17px) !important;
    line-height: 1.5;
    text-align: left !important;
    vertical-align: middle;
    color: #000000 !important;
    font-weight: bold !important;
    background: #fff !important;
    white-space: nowrap !important;
    min-width: 0 !important;
}
body .zl-block table.zl-table.jiuxiao-table td:first-child,
body .zl-block table.zl-table.jiuxiao-table td:last-child,
body .zl-block table.zl-table.jiuxiao-table td:nth-child(2):not([colspan]) {
    white-space: nowrap !important;
    word-break: keep-all !important;
}
body .zl-block table.zl-table.jiuxiao-table td:nth-child(2):not([colspan]) { color: #FF0000 !important; }
body .zl-block table.zl-table.jiuxiao-table td[colspan],
body .zl-block table.zl-table.jiuxiao-table td[colspan="2"] {
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
}
body .zl-block table.zl-table.jiuxiao-table td[colspan][style*="background"] {
    background: #f7f7f7 !important;
    color: #FF0000 !important;
}
body .zl-block table.zl-table.jiuxiao-table td[colspan="2"] { color: #FF0000 !important; }

@media (max-width: 480px) {
    table.zl-table.jinpal-table td,
    table.zl-table.jinsuanpan-table td,
    body .zl-block table.zl-table.aaaa-table td,
    body .zl-block table.zl-table.zhougong-table td,
    body .zl-block table.zl-table.wuwei-table td,
    body .zl-block table.zl-table.liuxiao-table td,
    body .zl-block table.zl-table.erzhonger-table td,
    body .zl-block table.zl-table.erqi-table th,
    body .zl-block table.zl-table.erqi-table td,
    body .zl-block table.zl-table.sanqi-table th,
    body .zl-block table.zl-table.sanqi-table td,
    body .zl-block table.zl-table.huobao-table th,
    body .zl-block table.zl-table.zhuangjia-table th,
    body .zl-block table.zl-table.jiuxiao-table td,
    body .zl-block table.zl-table.wucuo-table th,
    body .zl-block table.zl-table.jinma-table td {
        font-size: clamp(12px, 4vw, 15px) !important;
        padding: 5px 4px !important;
    }
    body .zl-block table.zl-table.erqi-table th:first-child,
    body .zl-block table.zl-table.sanqi-table th:first-child,
    body .zl-block table.zl-table.erqi-table th:last-child,
    body .zl-block table.zl-table.sanqi-table th:last-child {
        font-size: clamp(11px, 3.6vw, 14px) !important;
    }
    body .zl-block table.zl-table.huobao-table .zl,
    body .zl-block table.zl-table.wucuo-table .zl,
    body .zl-block table.zl-table.jinma-table .zl { font-size: clamp(13px, 4vw, 17px) !important; }
    body .zl-block table.zl-table.zhuangjia-table th span[style*="background-color"] { font-size: clamp(12px, 3.6vw, 15px) !important; }
}

@media (max-width: 360px) {
    table.zl-table.jinpal-table td,
    table.zl-table.jinsuanpan-table td,
    body .zl-block table.zl-table.aaaa-table td,
    body .zl-block table.zl-table.zhougong-table td,
    body .zl-block table.zl-table.wuwei-table td,
    body .zl-block table.zl-table.liuxiao-table td,
    body .zl-block table.zl-table.erzhonger-table td,
    body .zl-block table.zl-table.erqi-table th,
    body .zl-block table.zl-table.erqi-table td,
    body .zl-block table.zl-table.sanqi-table th,
    body .zl-block table.zl-table.sanqi-table td,
    body .zl-block table.zl-table.huobao-table th,
    body .zl-block table.zl-table.zhuangjia-table th,
    body .zl-block table.zl-table.jiuxiao-table td,
    body .zl-block table.zl-table.wucuo-table th,
    body .zl-block table.zl-table.jinma-table td {
        font-size: clamp(11px, 3.8vw, 14px) !important;
        padding: 4px 3px !important;
    }
    body .zl-block table.zl-table.erqi-table th:first-child,
    body .zl-block table.zl-table.sanqi-table th:first-child,
    body .zl-block table.zl-table.erqi-table th:last-child,
    body .zl-block table.zl-table.sanqi-table th:last-child {
        font-size: clamp(10px, 3.4vw, 13px) !important;
        min-width: 44px !important;
    }
    body .zl-block table.zl-table.huobao-table .zl,
    body .zl-block table.zl-table.wucuo-table .zl,
    body .zl-block table.zl-table.jinma-table .zl { font-size: clamp(12px, 3.6vw, 16px) !important; }
    body .zl-block table.zl-table.zhuangjia-table th span[style*="background-color"] { font-size: clamp(11px, 3.2vw, 14px) !important; }
}

/* ===== 当前站补充：hk17 生肖号码卡片避免被挤换行 ===== */
@media (max-width: 480px) {
    .zl-block .sx ul.sx1,
    .module-body .sx ul.sx1 {
        gap: 6px !important;
        padding: 4px !important;
    }

    .zl-block .sx ul.sx1 li,
    .module-body .sx ul.sx1 li {
        flex: 0 0 calc(50% - 3px) !important;
    }

    .zl-block .sx ul.sx1 li dl,
    .module-body .sx ul.sx1 li dl {
        padding: 7px 4px !important;
    }

    .zl-block .sx ul.sx1 li dl dt,
    .module-body .sx ul.sx1 li dl dt {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        font-size: clamp(13px, 3.8vw, 15px) !important;
        line-height: 1.2 !important;
    }

    .zl-block .sx ul.sx1 li dl dt img,
    .module-body .sx ul.sx1 li dl dt img {
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 auto !important;
    }

    .zl-block .sx ul.sx1 li dl dd,
    .module-body .sx ul.sx1 li dl dd {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 2px !important;
        margin-top: 4px !important;
    }

    .zl-block .sx ul.sx1 li dl dd span,
    .module-body .sx ul.sx1 li dl dd span {
        margin: 0 !important;
        min-width: 22px !important;
        padding: 0 2px !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 18px !important;
    }
}

@media (max-width: 360px) {
    .zl-block .sx ul.sx1 li dl dt,
    .module-body .sx ul.sx1 li dl dt {
        font-size: 12px !important;
    }

    .zl-block .sx ul.sx1 li dl dd span,
    .module-body .sx ul.sx1 li dl dd span {
        min-width: 20px !important;
        font-size: 11px !important;
        line-height: 17px !important;
    }
}

/* ===== 当前站补充：实力波色双波中特左列不换行，中间列加粗 ===== */
body .zl-block[data-key="hk21"] table.duilianpt1.bose-table th:first-child,
body .zl-block[data-key="hk21"] table.duilianpt1.bose-table td:first-child {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    width: 24% !important;
    min-width: 74px !important;
    font-weight: 900 !important;
}

body .zl-block[data-key="hk21"] table.duilianpt1.bose-table th:nth-child(2),
body .zl-block[data-key="hk21"] table.duilianpt1.bose-table td:nth-child(2) {
    font-weight: 900 !important;
    color: #7f1d1d !important;
}

body .zl-block[data-key="hk21"] table.duilianpt1.bose-table th:last-child,
body .zl-block[data-key="hk21"] table.duilianpt1.bose-table td:last-child {
    white-space: nowrap !important;
    word-break: keep-all !important;
    width: 22% !important;
    min-width: 68px !important;
    font-weight: 900 !important;
}

@media (max-width: 480px) {
    body .zl-block[data-key="hk21"] table.duilianpt1.bose-table th:first-child,
    body .zl-block[data-key="hk21"] table.duilianpt1.bose-table td:first-child {
        min-width: 68px !important;
        font-size: clamp(12px, 3.6vw, 15px) !important;
    }

    body .zl-block[data-key="hk21"] table.duilianpt1.bose-table th:nth-child(2),
    body .zl-block[data-key="hk21"] table.duilianpt1.bose-table td:nth-child(2) {
        font-size: clamp(13px, 3.8vw, 16px) !important;
    }

    body .zl-block[data-key="hk21"] table.duilianpt1.bose-table th:last-child,
    body .zl-block[data-key="hk21"] table.duilianpt1.bose-table td:last-child {
        min-width: 62px !important;
        font-size: clamp(12px, 3.6vw, 15px) !important;
    }
}
