/* 旺彩双色球 H5：一份手写样式。手机优先（390 宽），桌面内容区居中限宽。 */
:root {
  --brand: #dc0012;
  --brand-d: #b8000f;
  --brand-50: #fff2f2;
  --brand-100: #ffe1e2;
  --red: #e3262f;
  --blue: #1f6fd1;
  --blue-50: #edf3fc;
  --gold: #c98a10;
  --text: #1c1f24;
  --text-2: #4b525c;
  --text-3: #8a919b;
  --line: #eceef1;
  --line-2: #dfe2e6;
  --bg: #f4f5f7;
  --card: #fff;
  --r: 14px;
  --r-sm: 10px;
  --pad: 16px;
  --top-h: 52px;
  --tab-h: 58px;
  --num: "DIN Alternate", "Roboto", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 22px; height: 22px; flex: none; }
.ic--sm { width: 18px; height: 18px; }
.ic--xs { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgb(255 255 255 / .96);
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  max-width: 720px; height: var(--top-h); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 20px;
}
.is-wide .topbar__in { max-width: 1120px; }
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.brand__logo { display: block; height: 26px; width: auto; flex: none; }
.topnav { display: none; }
.topbar__dl { margin-left: auto; }

/* ---------------------------------------------------------------- 底部导航（手机） */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgb(255 255 255 / .97);
  border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 12px; color: var(--text-3);
}
.tabbar a:active { background: var(--bg); }
.tabbar a.is-on { color: var(--brand); font-weight: 600; }
.tabbar .ic { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- 页面框架 */
.page {
  max-width: 720px; margin: 0 auto;
  padding: 12px var(--pad) 8px;
}
.is-wide .page { max-width: 1120px; }
.footer {
  max-width: 720px; margin: 0 auto;
  padding: 20px var(--pad) calc(var(--tab-h) + 24px + env(safe-area-inset-bottom));
  text-align: center; font-size: 13px; line-height: 1.8; color: var(--text-3);
}
.is-wide .footer { max-width: 1120px; }
.footer__links { margin-top: 6px; display: flex; justify-content: center; gap: 18px; color: var(--text-2); }
.footer__c { margin-top: 4px; }
.footer__c a { color: inherit; }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 2px 12px; font-size: 13px; color: var(--text-3);
}
.crumbs a { color: var(--text-2); }
.crumbs a:active { color: var(--brand); }
.crumbs__sep { color: var(--line-2); }
.crumbs [aria-current] { color: var(--text-3); }

.page-title { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 2px 2px 4px; }
.page-sub { font-size: 14px; color: var(--text-3); margin: 0 2px 14px; }

.card {
  background: var(--card); border-radius: var(--r);
  box-shadow: 0 1px 2px rgb(16 24 40 / .04);
}
.card + .card { margin-top: 12px; }
.sec { margin-top: 22px; }
.sec__title {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 17px; font-weight: 700; margin: 0 2px 10px;
}
.sec__title::before {
  content: ""; width: 4px; height: 15px; border-radius: 2px; background: var(--brand);
  align-self: center;
}
.sec__aside { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--text-3); }
.note { margin: 10px 2px 0; font-size: 13px; line-height: 1.7; color: var(--text-3); }

.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-style: normal; font-weight: 500;
  color: var(--text-2); background: var(--bg); white-space: nowrap;
}
.tag--red { color: var(--brand); background: var(--brand-50); }
.tag--gray { color: var(--text-3); background: var(--bg); }

.link-more { display: inline-flex; align-items: center; gap: 1px; font-size: 14px; color: var(--text-3); }
.link-more:active { color: var(--brand); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: 22px;
  font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .15s, opacity .15s;
}
.btn--sm { height: 32px; padding: 0 14px; font-size: 14px; border-radius: 16px; }
.btn--block { display: flex; width: 100%; }
.btn--primary { color: #fff; background: var(--brand); }
.btn--primary:active { background: var(--brand-d); }
.btn--outline { color: var(--brand); border-color: rgb(220 0 18 / .35); background: #fff; }
.btn--outline:active { background: var(--brand-50); }
.btn--ghost { color: var(--text); background: var(--bg); }
.btn--ghost:active { background: var(--line-2); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-3); cursor: pointer;
}
.icon-btn:active { background: var(--bg); color: var(--brand); }
.icon-btn.is-done { color: var(--brand); }

/* 切换条（彩种 / 玩法 / 图组） */
.chips {
  position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--pad) * -1) 14px; padding: 2px var(--pad);
  scroll-padding: 0 var(--pad);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 16px;
  border-radius: 18px; font-size: 15px; color: var(--text-2);
  background: var(--card); border: 1px solid var(--line-2);
}
.chip:active { background: var(--bg); }
.chip.is-on { color: #fff; background: var(--brand); border-color: var(--brand); font-weight: 600; }
.chips--sub { margin-top: -4px; }
.chip--sub { height: 32px; padding: 0 13px; font-size: 14px; border-radius: 8px; }
.chip--sub.is-on { color: var(--brand); background: var(--brand-50); border-color: rgb(220 0 18 / .3); }

.seg {
  display: inline-flex; padding: 3px; border-radius: 10px; background: #e9ebee; flex: none;
}
.seg a {
  height: 30px; padding: 0 12px; display: inline-flex; align-items: center;
  border-radius: 8px; font-size: 14px; color: var(--text-2);
}
.seg a.is-on { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

/* 空状态 */
.empty { padding: 32px 20px; text-align: center; }
.empty--sm { padding: 18px; }
.empty__t { font-size: 16px; font-weight: 600; color: var(--text-2); }
.empty__d { margin-top: 4px; font-size: 14px; color: var(--text-3); }

/* ---------------------------------------------------------------- 号码球 */
.balls { display: flex; flex-wrap: wrap; gap: 6px; --b: 34px; --bf: 17px; }
.balls--lg { gap: 7px; --b: 38px; --bf: 18px; }
.balls--md { gap: 5px; --b: 30px; --bf: 15.5px; }
.balls--sm { gap: 4px; --b: 26px; --bf: 13px; }
.balls--xs { gap: 3px; --b: 24px; --bf: 13px; }
.ball {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--b); height: var(--b); border-radius: 50%;
  font-family: var(--num); font-size: var(--bf); font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
  color: #fff; background: var(--red);
  background-image: radial-gradient(circle at 32% 28%, rgb(255 255 255 / .2), rgb(255 255 255 / 0) 60%);
  box-shadow: inset 0 -1.5px 0 rgb(0 0 0 / .12);
}
.ball--blue { background-color: var(--blue); }
.balls:has(.ball--char) {
  display: inline-flex; flex-wrap: nowrap; gap: 0; border-radius: 8px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-2); background: #f7f8fa;
}
.ball--char {
  width: 21px; height: 28px; border-radius: 0; font-size: 14px; letter-spacing: 0;
  color: var(--text); background: none; box-shadow: none;
}
.ball--char + .ball--char { border-left: 1px solid var(--line-2); }

/* 轻提示（复制成功等，web.js 用） */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 28px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translateX(-50%); padding: 10px 18px; border-radius: 10px;
  font-size: 15px; color: #fff; background: rgb(28 31 36 / .9);
}
.footer__all { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 12px; color: var(--text-3); }
.footer__all a { color: inherit; }
.errlinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin-top: 20px; font-size: 14px; }

/* ---------------------------------------------------------------- 404 / 410 */
.notfound { margin-top: 24px; padding: 36px 24px 32px; text-align: center; }
.notfound__art { display: flex; justify-content: center; margin: 8px 0 4px; }
.notfound__art .balls { --b: 52px; --bf: 26px; gap: 10px; }
.notfound__t { margin-top: 12px; font-size: 21px; font-weight: 700; }
.notfound__d { margin-top: 6px; font-size: 15px; color: var(--text-3); }
.notfound__act { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

/* ---------------------------------------------------------------- 桌面 */
@media (min-width: 768px) {
  :root { --pad: 20px; --top-h: 60px; }
  body { font-size: 16px; }
  .topnav { display: flex; gap: 4px; margin-left: 12px; }
  .topnav a {
    height: var(--top-h); display: inline-flex; align-items: center; padding: 0 12px;
    font-size: 15px; color: var(--text-2); border-bottom: 2px solid transparent;
  }
  .topnav a:hover { color: var(--text); }
  .topnav a.is-on { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
  .tabbar { display: none; }
  .page { padding-top: 20px; }
  .footer { padding-bottom: 32px; }
  .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
  .chip:hover:not(.is-on) { border-color: #c9cdd3; color: var(--text); }
}

/* 开奖（首页、详情、列表、归档、下载）：W1 */
/* ---------------------------------------------------------------- 首页 */
.hero { padding: 18px var(--pad) 6px; }
.hero__top { display: flex; align-items: flex-start; justify-content: space-between; }
.hero__name { font-size: 22px; font-weight: 700; line-height: 1.25; }
.hero__meta { margin-top: 3px; font-size: 14px; color: var(--text-3); }
.hero__meta b { font-family: var(--num); font-weight: 700; color: var(--text-2); font-size: 15px; }
.hero__balls { display: block; margin: 16px 0 16px; }

.stats { display: flex; }
.stats > div { flex: 1; padding: 2px 0; }
.stats > div + div { border-left: 1px solid var(--line); padding-left: 16px; }
.stats dt { font-size: 13px; color: var(--text-3); }
.stats dd { margin-top: 2px; font-family: var(--num); font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.stats dd.is-hl { color: var(--brand); }
.stats--card { margin-top: 12px; padding: 14px var(--pad); }

.quick {
  display: flex; margin: 16px calc(var(--pad) * -1) 0; border-top: 1px solid var(--line);
}
.quick a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 48px; font-size: 15px; color: var(--text-2);
}
.quick a + a { border-left: 1px solid var(--line); }
.quick a:active { background: var(--bg); }
.quick .ic { width: 19px; height: 19px; color: var(--brand); }

.list { padding: 2px 0; }
.list > li + li .draw-row { border-top: 1px solid var(--line); }
.list__group {
  padding: 12px var(--pad) 2px; font-size: 13px; font-weight: 600; color: var(--text-3);
}
.list > .list__group + li .draw-row { border-top: 0; }
.list > li + .list__group { margin-top: 4px; border-top: 8px solid var(--bg); }
.draw-row {
  position: relative; display: block; margin: 0 var(--pad); padding: 14px 0 15px;
}
.draw-row:active::after {
  content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); background: rgb(0 0 0 / .03);
}
.draw-row__head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; margin-bottom: 10px; padding-right: 38px; }
.draw-row__name { font-size: 17px; font-weight: 600; }
.draw-row__meta { font-size: 13px; color: var(--text-3); }

/* ---------------------------------------------------------------- 开奖详情 */
.draw-head { padding: 18px var(--pad) 0; }
.draw-head__title { font-size: 22px; font-weight: 700; display: flex; align-items: baseline; gap: 10px; }
.draw-head__title span { font-family: var(--num); font-size: 17px; font-weight: 700; color: var(--text-2); }
.draw-head__meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 14px; color: var(--text-3); }
.draw-head__balls { margin: 18px 0 18px; }
.pager {
  display: flex; margin: 0 calc(var(--pad) * -1); border-top: 1px solid var(--line);
}
.pager > * {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 48px; font-size: 15px; color: var(--text-2);
}
.pager > * + * { border-left: 1px solid var(--line); }
.pager a:active { background: var(--bg); }
.pager .is-off { color: #c4c8ce; }
.pager__mid .ic { color: var(--brand); }

.prize { width: 100%; border-collapse: collapse; font-size: 15px; }
.prize th, .prize td { padding: 12px var(--pad); text-align: left; }
.prize thead th { font-size: 13px; font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--line); padding-top: 12px; padding-bottom: 10px; }
.prize td { border-top: 1px solid var(--line); }
.prize tbody tr:first-child td { border-top: 0; }
.prize .num { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 16px; }
.prize thead .num { font-family: inherit; font-size: 13px; }
.prize td.is-hl { color: var(--brand); font-weight: 700; }
.prize--dense td { padding-top: 9px; padding-bottom: 9px; }
.prize__group th { padding: 10px var(--pad) 6px; font-size: 13px; font-weight: 600; color: var(--text-2); background: #fafbfc; border-top: 1px solid var(--line); }
.prize tbody:first-of-type .prize--dense td { padding-top: 9px; padding-bottom: 9px; }
.prize__group th { border-top: 0; }
.prize__group + tr td { border-top: 0; }

.grid-links { display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 0; }
.grid-links a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; font-size: 14px; color: var(--text-2); border-radius: var(--r-sm);
}
.grid-links a:active { background: var(--bg); }
.grid-links .ic {
  width: 42px; height: 42px; padding: 10px; border-radius: 12px;
  color: var(--brand); background: var(--brand-50);
}

@media (min-width: 768px) {
  .draw-row:hover::after, .rank__row:hover::after { content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); background: rgb(0 0 0 / .025); }
}

/* ---------------------------------------------------------------- 首页：tab 与关注 */
.draw-item { position: relative; }
.star {
  position: absolute; right: calc(var(--pad) - 9px); top: 8px; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #c4c8ce; cursor: pointer;
}
.star:active { background: var(--bg); }
.star__ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.star.is-on { color: var(--gold); }
.star.is-on .star__ic { fill: currentColor; }

.home-tabs { margin-top: 18px; }
.htabs {
  position: sticky; top: var(--top-h); z-index: 20;
  display: flex; gap: 6px; margin: 0 calc(var(--pad) * -1); padding: 8px var(--pad);
  background: rgb(244 245 247 / .96);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.htabs[hidden] { display: none; }
.htab {
  flex: 1; height: 40px; border: 0; border-radius: 20px; cursor: pointer;
  font-size: 16px; color: var(--text-2); background: #e9ebee;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.htab.is-on { color: #fff; background: var(--brand); font-weight: 600; }
.htab__n {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  font-size: 12px; line-height: 18px; font-weight: 600; color: var(--brand); background: #fff;
}
.htab:not(.is-on) .htab__n { color: #fff; background: var(--text-3); }
.is-tabs .tabpanel { margin-top: 6px; }
.is-tabs .tabpanel .sec__title { display: none; }
.tabpanel[hidden] { display: none; }
.tabpanel .empty .ic { margin: 0 auto 8px; }

/* ---------------------------------------------------------------- 详情补充 */
.draw-head__next {
  margin: -4px 0 16px; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 14px; color: var(--text-2); background: var(--bg);
}
.draw-head__at { display: block; margin-top: 2px; font-size: 13px; color: var(--text-3); }
.draw-head__next b { margin-right: 8px; font-weight: 600; color: var(--brand); }
.relink { overflow: hidden; }
.relink a {
  display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 var(--pad);
  font-size: 15px;
}
.relink a + a { border-top: 1px solid var(--line); }
.relink a:active { background: var(--bg); }
.relink a span { margin-left: auto; font-size: 13px; color: var(--text-3); }
.relink a .ic { color: #c4c8ce; }
.relink__h { margin: 16px 2px 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 17px; font-size: 14px; color: var(--text-2);
  background: var(--card); border: 1px solid var(--line-2);
}
.tags a:active { background: var(--bg); }

/* ---------------------------------------------------------------- 历史开奖 / 归档 */
.list-head { margin-bottom: 12px; }
.list-head .page-title { margin-bottom: 2px; }
.list-head .page-sub { margin-bottom: 0; font-size: 13px; }
.pager--year { margin: 0 0 12px; overflow: hidden; }
.chips--wrap { flex-wrap: wrap; overflow: visible; margin-bottom: 0; padding-left: 0; padding-right: 0; }
.chip--year { height: 34px; padding: 0 14px; font-size: 14px; font-family: var(--num); }
.list-links { margin: 14px 2px 0; font-size: 14px; }
.list-links a { display: inline-flex; align-items: center; gap: 2px; color: var(--text-2); }
.list-links a:active { color: var(--brand); }

.dwrap { overflow: hidden; }
.dtable { width: 100%; border-collapse: collapse; }
.dtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dtable tbody tr {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  align-items: baseline; padding: 13px var(--pad) 12px;
}
.dtable tbody tr + tr { border-top: 1px solid var(--line); }
.dtable td { display: block; padding: 0; }
.dtable__issue { grid-column: 1; font-family: var(--num); font-size: 16px; font-weight: 700; }
.dtable__issue a::after { content: ""; position: absolute; inset: 0; }
.dtable tbody tr:active { background: rgb(0 0 0 / .03); }
.dtable__date { grid-column: 2; text-align: right; font-size: 13px; color: var(--text-3); }
.dtable__nums { grid-column: 1 / -1; margin-top: 9px; }
.dtable__money { margin-top: 8px; font-size: 13px; color: var(--text-2); text-align: left; }
.dtable__money::before { content: attr(data-label) " "; color: var(--text-3); }
.dtable__money.is-empty { display: none; }
.dtable .num { font-family: var(--num); font-variant-numeric: tabular-nums; }

@media (min-width: 768px) {
  .dtable thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .dtable thead th {
    padding: 12px 14px; font-size: 13px; font-weight: 500; text-align: left;
    color: var(--text-3); border-bottom: 1px solid var(--line);
  }
  .dtable thead th.num { text-align: right; }
  .dtable tbody tr { display: table-row; padding: 0; }
  .dtable tbody tr:hover { background: #fafbfc; }
  .dtable td { display: table-cell; padding: 12px 14px; vertical-align: middle; }
  .dtable__issue { white-space: nowrap; }
  .dtable__nums .balls--md { flex-wrap: nowrap; }
  .dtable__issue a::after { content: none; }
  .dtable__issue a:hover { color: var(--brand); }
  .dtable__date { text-align: left; font-size: 14px; white-space: nowrap; }
  .dtable__nums { margin-top: 0; }
  .dtable__money { margin-top: 0; font-size: 15px; text-align: right; white-space: nowrap; }
  .dtable__money::before { content: none; }
  .dtable__money.is-empty { display: table-cell; color: var(--text-3); }
  .htabs { position: static; margin: 0; padding: 8px 0; background: none; }
  .htab { flex: none; width: 110px; }
  .draw-head__next { display: inline-block; }
}

/* ---------------------------------------------------------------- 下载页 */
.dl-hero { margin-top: 8px; padding: 32px 24px 24px; text-align: center; }
.dl-hero__mark { width: 68px; height: 68px; border-radius: 16px; box-shadow: 0 6px 16px rgb(220 0 18 / .25); }
.dl-hero__t { margin-top: 14px; font-size: 24px; font-weight: 700; }
.dl-hero__d { margin-top: 6px; font-size: 15px; color: var(--text-3); }
.dl-hero__btn { margin-top: 22px; height: 48px; }
.dl-hero__n { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.dl-feats li { display: flex; gap: 14px; padding: 16px var(--pad); }
.dl-feats li + li { border-top: 1px solid var(--line); }
.dl-feats .ic {
  width: 42px; height: 42px; padding: 10px; border-radius: 12px;
  color: var(--brand); background: var(--brand-50);
}
.dl-feats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-feats b { font-size: 16px; }
.dl-feats span { font-size: 14px; color: var(--text-3); line-height: 1.5; }
.dl-steps li { display: flex; align-items: center; gap: 12px; padding: 14px var(--pad); font-size: 15px; }
.dl-steps li + li { border-top: 1px solid var(--line); }
.dl-steps li span {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  font-family: var(--num); font-size: 14px; font-weight: 700; line-height: 24px; text-align: center;
  color: #fff; background: var(--brand);
}
@media (min-width: 768px) {
  .dl-hero { max-width: 460px; margin-left: auto; margin-right: auto; }
}

/* 走势与遗漏（W2）。
   走势表尺寸（手机 390 宽实测后定）：号码格 22 宽 × 26 高，命中球 19 px（设计起点 22 px 球在 33 红 + 16 蓝时
   一屏只看到 15 列；19 px 球仍清楚、一屏多看 1–2 列，格宽守住 22 不再缩，缩了手指点不准也看不清遗漏数字）。
   各列宽由服务端按列名 / 内容宽度算好，写在 <colgroup> 里（table-layout: fixed）。 */

/* ---------------------------------------------------------------- 走势：头部与切换 */
.trend-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 12px; margin: 0 2px 12px; flex-wrap: wrap; }
.trend-top .page-title { margin: 0; }
.trend-title { font-size: 20px; }
.trend-sub { margin-top: 3px; font-size: 13px; color: var(--text-3); }
.trend-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; margin: 0 2px 8px; font-size: 13px; color: var(--text-3); }
.trend-tools a { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); }
.trend-tools a:active { color: var(--brand); }
.trend-tools .ic { color: var(--brand); }

/* ---------------------------------------------------------------- 走势表 */
.trend-wrap {
  position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  background: #fff; border-radius: var(--r);
  box-shadow: 0 1px 2px rgb(16 24 40 / .04), inset 0 0 0 1px var(--line);
}
.trend-wrap svg.tline { position: absolute; z-index: 1; pointer-events: none; overflow: visible; }
.trend {
  table-layout: fixed; border-collapse: separate; border-spacing: 0; margin: 0 auto;
  font-family: var(--num); font-size: 11px; line-height: 1; color: #a5abb4;
  font-variant-numeric: tabular-nums; text-align: center; white-space: nowrap;
}
.trend col.alt { background: #fafbfc; }
.trend th, .trend td { padding: 0; height: 26px; overflow: hidden; border-bottom: 1px solid #f1f2f4; }
.trend tbody td { position: relative; z-index: 2; } /* 数字压在折线之上 */
.trend .s { border-left: 1px solid #dfe2e6; }

/* 表头 */
.trend thead th, .trend tfoot tr.names th {
  background: #f6f7f9; color: var(--text-2); border-bottom: 1px solid #dfe2e6;
  font-family: var(--num); font-size: 10.5px; font-weight: 600; color: var(--text-3);
}
.trend thead th.fix, .trend tfoot th.fix { font-size: 12px; color: var(--text-2); }
.trend thead .gh, .trend thead .gi {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 12px; font-weight: 600; color: var(--text); height: 26px;
}
.trend thead .gi { font-size: 11.5px; color: var(--text-2); background: #eceef2; }
.trend thead .gi--blank { background: #f6f7f9; }
.trend thead .gh--wide, .trend thead .gi { text-align: left; overflow: visible; } /* sticky 的标题文字要穿出单元格 */
.trend thead .gh--wide span, .trend thead .gi span { position: sticky; left: 56px; padding-right: 6px; }
.trend .gh--one, .trend .gh--fit {
  padding: 2px; white-space: normal; word-break: break-all; line-height: 1.2;
  font-size: 11px; color: var(--text);
}
.trend thead .gh--fit { height: auto; }
.trend tfoot tr.names th.gh--one {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; height: auto; min-height: 26px;
}

/* 期号列：左侧吸附 */
.trend .fix {
  position: sticky; left: 0; z-index: 3; text-align: center;
  background: #f6f7f9; border-right: 1px solid #dfe2e6; box-shadow: 1px 0 3px rgb(16 24 40 / .05);
}
.trend tbody .fix { background: #f9fafb; color: var(--text-2); font-size: 12px; font-weight: 700; }

/* 行线：每 5 期（从最新一期往上数）一条深线 */
.trend tbody tr.g5 th, .trend tbody tr.g5 td { border-bottom-color: #dfe2e6; }
.trend tbody tr:last-child th, .trend tbody tr:last-child td { border-bottom-color: #c9cdd3; }

/* 开奖号码列（分析图）：红区一行、蓝区第二行 */
.trend .nums { padding: 0 4px; white-space: normal; }
.trend .nums b { display: block; font-size: 11px; line-height: 12px; font-weight: 700; color: var(--red); letter-spacing: 0; word-spacing: 2px; }
.trend .nums b.b { color: var(--blue); }

/* 命中格 */
.trend td.h i {
  position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%; font-style: normal; font-weight: 700; font-size: 11px;
  letter-spacing: -.2px; color: #fff; background: var(--c, var(--red));
}
.trend td.h i.o { color: var(--c, var(--red)); background: #fff; box-shadow: inset 0 0 0 1.5px var(--c, var(--red)); }
.trend td.hf { color: #fff; background: var(--c, var(--text-3)); font-weight: 700; }
.trend td.hp { color: var(--text); font-weight: 700; font-size: 11.5px; }

/* 表尾：重复列名 + 统计 */
.trend tfoot td, .trend tfoot th.fix { background: #fbfbfc; color: var(--text-2); }
.trend tfoot tr.names th.s, .trend tfoot tr.names th { border-top: 1px solid #c9cdd3; }
.trend tfoot tr.st th.fix { font-size: 10px; font-weight: 500; color: var(--text-3); letter-spacing: -.2px; }
.trend tfoot tr.st:nth-of-type(2) td { color: var(--text); font-weight: 700; }

.textlinks { display: flex; flex-wrap: wrap; gap: 8px; }
.textlinks a {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-2); background: var(--card); border: 1px solid var(--line-2);
}
.textlinks a:active { background: var(--bg); }
.note a.inline { color: var(--brand); }

/* ---------------------------------------------------------------- 走势总览 */
.tindex { display: grid; gap: 12px; }
.tindex .card + .card { margin-top: 0; }
.tcard { padding: 14px var(--pad) 14px; }
.tcard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.tcard__name { font-size: 17px; font-weight: 700; }
.tcard__links { display: flex; flex-wrap: wrap; gap: 6px 6px; }
.tcard__links a {
  display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 8px;
  font-size: 13.5px; color: var(--text-2); background: var(--bg);
}
.tcard__links a:first-child { color: var(--brand); background: var(--brand-50); font-weight: 600; }
.tcard__links a:active { background: var(--line-2); }

/* ---------------------------------------------------------------- 遗漏统计 */
.miss__card { overflow: hidden; }
.mtable { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; font-variant-numeric: tabular-nums; }
.mtable th, .mtable td { padding: 0; height: 40px; border-bottom: 1px solid var(--line); }
.mtable thead th { height: 36px; font-size: 12.5px; font-weight: 600; color: var(--text-3); background: #f9fafb; }
.mtable tbody tr:last-child th, .mtable tbody tr:last-child td { border-bottom: 0; }
.mtable td { font-family: var(--num); font-size: 15px; color: var(--text); }
.mtable .mn { width: 56px; padding-left: var(--pad); text-align: left; }
.mtable thead .mn { padding-left: var(--pad); }
.mtable .mc { position: relative; width: 34%; text-align: left; padding-left: 8px; }
.mtable thead .mc { text-align: left; }
.mball {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 2px;
  border-radius: 14px; font-family: var(--num); font-size: 14px; font-weight: 700; color: #fff; background: var(--red);
}
.mball--blue { background: var(--blue); }
.mc__v { position: relative; z-index: 1; display: inline-block; min-width: 22px; font-weight: 700; }
.mc__v.is-zero { color: var(--brand); }
.mc__bar { position: absolute; left: 8px; bottom: 6px; height: 3px; max-width: calc(100% - 16px); border-radius: 2px; background: #f0c9cb; }
.mtag { display: inline-block; margin-left: 4px; padding: 1px 5px; border-radius: 4px; font-size: 11px; font-style: normal; line-height: 14px; font-family: -apple-system, "PingFang SC", sans-serif; }
.mtag--cold { color: var(--blue); background: var(--blue-50); }
.mtag--hot { color: var(--brand); background: var(--brand-50); }

@media (min-width: 768px) {
  .tindex { grid-template-columns: repeat(2, 1fr); }
  .trend-title { font-size: 22px; }
}

/* 专家预测（W3）：首页 / 榜单 / 专家主页 / 某期历史 */
/* ---------------------------------------------------------------- 专家 */
.avatar {
  position: relative; flex: none; width: var(--s); height: var(--s); border-radius: 50%;
  overflow: hidden; background: #f1e9e9; color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar__t { font-size: calc(var(--s) * .42); font-weight: 600; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.rank { overflow: hidden; }
.rank__head { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--pad) 6px; }
.rank__head h2 { font-size: 17px; font-weight: 700; }
.rank__hint { font-size: 13px; color: var(--text-3); }
.rank__list li + li .rank__row { border-top: 1px solid var(--line); }
.rank__row {
  display: flex; align-items: center; gap: 12px; margin: 0 var(--pad); padding: 10px 0;
  position: relative;
}
.rank__row:active::after { content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); background: rgb(0 0 0 / .03); }
.rank__no {
  flex: none; width: 22px; text-align: center; font-family: var(--num); font-size: 17px; font-weight: 700; color: var(--text-3);
}
.rank__no.is-top { color: var(--brand); }
.rank__name { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__res { flex: none; display: flex; align-items: center; gap: 8px; }
.rank__res b { font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.profile { display: flex; align-items: center; gap: 14px; padding: 16px var(--pad); }
.profile__main { flex: 1; min-width: 0; }
.profile__name { font-size: 20px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile__meta { display: flex; gap: 6px; margin-top: 6px; }
.profile__score { flex: none; text-align: right; }
.profile__score b { display: block; font-family: var(--num); font-size: 26px; line-height: 1.1; color: var(--brand); }
.profile__score small { font-size: 15px; color: var(--text-3); font-weight: 700; }
.profile__score span { font-size: 12px; color: var(--text-3); }
.profile + .chips { margin-top: 14px; }

.current { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px var(--pad); }
.current__icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); background: var(--brand-50);
}
.current__icon.is-muted { color: var(--text-3); background: var(--bg); }
.current__main { flex: 1; min-width: 0; }
.current__t { font-size: 16px; font-weight: 600; white-space: nowrap; }
.current__btn { flex: 1 0 100%; height: 40px; border-radius: 20px; font-size: 15px; }
@media (min-width: 560px) { .current__btn { flex: none; height: 32px; } }
.current__d { font-size: 13px; color: var(--text-3); margin-top: 1px; }

.records { padding: 0; }
.record { padding: 14px var(--pad); }
.record + .record { border-top: 1px solid var(--line); }
.record__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.record__issue { display: inline-flex; align-items: center; gap: 2px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
a.record__issue { color: var(--text); }
a.record__issue .ic { color: var(--text-3); }
a.record__issue:active { color: var(--brand); }
.record__line { display: flex; align-items: flex-start; gap: 12px; }
.record__line + .record__line { margin-top: 8px; }
.record__k { flex: none; width: 30px; font-size: 13px; line-height: 24px; color: var(--text-3); }
.picks { display: flex; flex-wrap: wrap; gap: 3px; flex: 1; }
.pick {
  min-width: 24px; height: 24px; padding: 0 3px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--num); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--text-2); background: var(--bg);
}
.pick.is-hit { color: #fff; background: var(--red); }
.picks--blue .pick.is-hit { background: var(--blue); }
.picks__sep { color: var(--line-2); padding: 0 1px; line-height: 24px; }

/* 首页每块底部：两个榜单入口 */
.rank__foot { display: flex; border-top: 1px solid var(--line); }
.rank__foot a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px;
  height: 44px; font-size: 14px; color: var(--text-2);
}
.rank__foot a + a { border-left: 1px solid var(--line); }
.rank__foot a:active { background: var(--bg); color: var(--brand); }

/* 榜单页 */
.rank__switch { display: flex; margin: 2px 0 12px; }
.rank__switch .seg { width: 100%; }
.rank__switch .seg a { flex: 1; justify-content: center; }
.rank--full { padding: 4px 0; }
.rank__chg { flex: none; min-width: 34px; text-align: right; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rank__chg.is-up { color: var(--brand); }
.rank__chg.is-down { color: #2a9d4b; }
.rank--full .rank__row { padding: 9px 0; gap: 10px; }
.rank__res { flex-direction: column; align-items: flex-end; gap: 2px; min-width: 64px; }
.rank__res .tag { height: 18px; padding: 0 6px; font-size: 11px; }

/* 链接行（主页底部、历史页底部） */
.linkrow { display: flex; flex-wrap: wrap; padding: 4px var(--pad); }
.linkrow a {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; padding: 0 10px; font-size: 14px; color: var(--text-2);
}
.linkrow a:active { color: var(--brand); }
.sec + .card.linkrow, .card + .card.linkrow { margin-top: 12px; }

/* 某期历史页 */
.hopen { padding: 14px var(--pad); }
.hopen__row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.hopen__k { font-size: 13px; color: var(--text-3); }
.hopen__d { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.hopen__d a { display: inline-flex; align-items: center; color: var(--text-2); }
.published { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px var(--pad); }
.published .tag { height: 28px; padding: 0 12px; font-size: 14px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 12px; }
.pager__a {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 14px;
  border-radius: 20px; font-size: 14px; color: var(--text-2); background: var(--card);
  border: 1px solid var(--line-2);
}
.pager__a:active { background: var(--bg); }
.profile__meta a.tag:active { opacity: .7; }
.profile__name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* 工具（总览、推荐、选号器、奖金计算器、热度、DNA）：W4 */
/* ---------------------------------------------------------------- 号码推荐 */
.rec { padding: 16px var(--pad); }
.rec__head { display: flex; align-items: flex-start; justify-content: space-between; }
.rec__head h2 { font-size: 18px; font-weight: 700; }
.rec__head p { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 14px; color: var(--text-3); }
.rec__list { margin: 12px 0 16px; }
.rec__row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.rec__row:last-child { border-bottom: 1px solid var(--line); }
.rec__row .balls { flex: 1; flex-wrap: wrap; }
.rec__no {
  flex: none; width: 22px; height: 22px; border-radius: 6px; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); background: var(--bg);
  font-family: var(--num);
}
.tip { padding: 14px var(--pad); }
.tip h2 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.tip li { position: relative; padding-left: 14px; font-size: 14px; color: var(--text-2); line-height: 1.75; }
.tip li::before { content: ""; position: absolute; left: 2px; top: .75em; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.rec__go {
  display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 14px;
  font-size: 14px; color: var(--text-3);
}
.rec__go:active { color: var(--brand); }
.sec--first { margin-top: 4px; }
.cz-lnk { color: var(--brand); }

/* ---------------------------------------------------------------- 工具总览 */
.tl-card { padding: 16px var(--pad) 14px; }
.tl-card__h { display: flex; gap: 12px; align-items: flex-start; }
.tl-card__ic {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand); background: var(--brand-50);
}
.tl-card__ic .ic { width: 24px; height: 24px; }
.tl-card__ic--choose { color: var(--blue); background: var(--blue-50); }
.tl-card__ic--bonus { color: var(--gold); background: #fdf5e3; }
.tl-card__ic--dna { color: #2f8f5b; background: #eaf6ef; }
.tl-card__t { font-size: 18px; font-weight: 700; line-height: 1.3; }
.tl-card__d { margin-top: 2px; font-size: 14px; line-height: 1.6; color: var(--text-3); }
.tl-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tl-pills a {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 17px;
  font-size: 14px; color: var(--text-2); background: var(--bg);
}
.tl-pills a:active { color: var(--brand); background: var(--brand-50); }

.tl-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
.tl-links a {
  display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 10px;
  font-size: 14px; color: var(--text-2); background: var(--bg);
}
.tl-links a:active { background: var(--line-2); }
.tl-links a.is-on { color: var(--brand); background: var(--brand-50); font-weight: 600; }

/* ---------------------------------------------------------------- 选号器 */
.chips--play { margin-top: -4px; }
button.chip { font: inherit; cursor: pointer; }
.cz-card { padding: 4px var(--pad) 16px; }
.cz-mode {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 12px 0 2px; padding: 3px;
  border-radius: 10px; background: #e9ebee;
}
.cz-mode__b {
  height: 38px; border: 0; border-radius: 8px; background: transparent; font-size: 15px;
  color: var(--text-2); cursor: pointer;
}
.cz-mode__b.is-on { color: var(--text); font-weight: 600; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

.cz-g { padding: 16px 0 6px; }
.cz-g + .cz-g { border-top: 1px solid var(--line); }
.cz-g__h { display: flex; align-items: baseline; gap: 8px; }
.cz-g__t { display: flex; align-items: center; gap: 7px; font-size: 16px; font-weight: 700; flex: none; }
.cz-dot, .bz-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.cz-dot--blue, .bz-dot--blue { background: var(--blue); }
.cz-g__r { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-3); }
.cz-g__n { flex: none; font-size: 13px; color: var(--text-2); }
.cz-g__n b { font-family: var(--num); font-size: 15px; color: var(--brand); }
.cz-seg {
  display: inline-flex; margin-top: 10px; padding: 3px; border-radius: 10px; background: #e9ebee;
}
.cz-seg__b {
  height: 30px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent;
  font-size: 14px; color: var(--text-2); cursor: pointer;
}
.cz-seg__b.is-on { color: var(--text); font-weight: 600; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

.cz-grid, .dn-picks {
  display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr));
  gap: 8px 4px; margin-top: 12px;
}
.pick {
  justify-self: center; align-self: center; width: 44px; height: 44px; padding: 0;
  border: 1.5px solid var(--line-2); border-radius: 50%; background: #fff; color: var(--text-2);
  font: 700 17px/1 var(--num); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: transform .08s, background-color .12s, box-shadow .12s;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.pick:active { transform: scale(.92); }
.pick.is-on, .dn-pick input:checked + span {
  color: #fff; border-color: transparent; background-color: var(--red);
  background-image: radial-gradient(circle at 32% 28%, rgb(255 255 255 / .22), rgb(255 255 255 / 0) 60%);
  box-shadow: 0 2px 6px rgb(227 38 47 / .38);
}
.pick--blue.is-on, .dn-pick--blue input:checked + span {
  background-color: var(--blue); box-shadow: 0 2px 6px rgb(31 111 209 / .38);
}
.pick.is-dan {
  color: #fff; border-color: transparent; background-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(201 138 16 / .28);
}

.cz-tools { display: flex; gap: 10px; margin-top: 14px; }
.cz-set {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.cz-set__i { display: flex; align-items: center; gap: 12px; }
.cz-set__l { font-size: 15px; color: var(--text-2); }
.cz-step { display: inline-flex; align-items: center; gap: 6px; }
.cz-step__b {
  width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--bg);
  font-size: 22px; line-height: 1; color: var(--text-2); cursor: pointer;
}
.cz-step__b:active { background: var(--line-2); }
.cz-step__v {
  width: 58px; height: 40px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
  text-align: center; font: 700 18px var(--num); color: var(--text); -moz-appearance: textfield;
}
.cz-step__v::-webkit-outer-spin-button, .cz-step__v::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cz-append { position: relative; cursor: pointer; }
.cz-append input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cz-switch {
  position: relative; flex: none; width: 48px; height: 28px; border-radius: 14px; background: #d5d8dd;
  transition: background-color .15s;
}
.cz-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s;
}
.cz-append input:checked + .cz-switch { background: var(--brand); }
.cz-append input:checked + .cz-switch::after { transform: translateX(20px); }
.cz-append input:focus-visible + .cz-switch { outline: 2px solid var(--brand); outline-offset: 2px; }

.cz-bar {
  position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); z-index: 20;
  margin: 12px calc(var(--pad) * -1) 0; background: rgb(255 255 255 / .97);
  border-top: 1px solid var(--line); box-shadow: 0 -3px 12px rgb(16 24 40 / .06);
  backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px);
}
.cz-bar__in {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 720px; margin: 0 auto; padding: 10px var(--pad);
}
.cz-bar__t { min-width: 0; }
.cz-bar__main { font-size: 15px; color: var(--text-2); white-space: nowrap; }
.cz-bar__main b { font-family: var(--num); font-size: 21px; font-weight: 700; color: var(--brand); }
.cz-bar__sub { margin-top: 1px; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-bar__sub.is-warn { color: var(--brand); }
.cz-bar .btn { flex: none; padding: 0 22px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.cz-plans { padding-bottom: 8px; }
.cz-plan { padding: 14px var(--pad) 12px; }
.cz-plan__h { display: flex; align-items: center; gap: 8px; }
.cz-plan__k { flex: none; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--brand); background: var(--brand-50); }
.cz-plan__m { flex: 1; min-width: 0; font-size: 13px; color: var(--text-3); }
.cz-plan__c { flex: none; font-family: var(--num); font-size: 17px; color: var(--brand); }
.cz-plan__b { margin-top: 8px; }
.cz-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 5px 0; }
.cz-line__l { flex: none; min-width: 36px; font-size: 12.5px; color: var(--text-3); }
.cz-line__l--t { min-width: 0; margin-left: 4px; }
.cz-nums { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.nb {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; font: 700 13px/1 var(--num); font-style: normal; color: #fff; background: var(--red);
}
.nb--blue { background: var(--blue); }
.nb--dan { background: var(--gold); }
.cz-plan__f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.cz-plan__f .btn.is-done { color: var(--brand); }
.cz-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 14px var(--pad); }
.cz-total p { font-size: 15px; color: var(--text-2); }
.cz-total b { font-family: var(--num); font-size: 19px; color: var(--brand); }
.cz-total__a { display: flex; gap: 8px; }

/* ---------------------------------------------------------------- 奖金计算器 */
.bz { padding: 16px var(--pad) 18px; }
.bz__hint { margin-bottom: 14px; padding: 9px 12px; border-radius: 8px; font-size: 13px; line-height: 1.6; color: var(--text-3); background: var(--bg); }
.bz-g { min-width: 0; margin: 0; padding: 0; border: 0; }
.bz-g + .bz-g { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.bz-g__t { display: flex; align-items: center; gap: 7px; padding: 0; font-size: 16px; font-weight: 700; }
.bz-g__r { margin: 3px 0 10px; font-size: 12.5px; color: var(--text-3); }
.bz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.bz-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.bz-f span { font-size: 13px; color: var(--text-2); }
.bz-f input {
  width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff; font: 700 18px var(--num); color: var(--text); -moz-appearance: textfield;
}
.bz-f input::-webkit-outer-spin-button, .bz-f input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.bz-f input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.bz-f--m { max-width: calc(50% - 6px); }
.bz__act { display: flex; gap: 10px; margin-top: 20px; }
.bz__act .btn { flex: 1; }
.bz__act .btn--primary { flex: 1.6; }
.bz-err { margin-top: 12px; padding: 14px var(--pad); border-left: 3px solid var(--brand); background: var(--brand-50); }
.bz-err__t { font-size: 15px; font-weight: 700; color: var(--brand); }
.bz-err__d { margin-top: 2px; font-size: 14px; color: var(--text-2); }
.bz-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 0; padding: 14px 0; }
.bz-sum > div { padding: 0 var(--pad); }
.bz-sum > div:nth-child(even) { border-left: 1px solid var(--line); }
.bz-sum dt { font-size: 12.5px; color: var(--text-3); }
.bz-sum dd { margin-top: 2px; font-family: var(--num); font-size: 19px; font-weight: 700; letter-spacing: -.2px; word-break: break-all; }
.bz-sum dd small { margin-left: 2px; font-family: inherit; font-size: 12px; font-weight: 400; color: var(--text-3); }
.bz-sum dd.is-hl { color: var(--brand); }
.bz-sum dd small.bz-sum__note { display: block; margin: 0; }
.bz-float { font-family: inherit; font-size: 12px; color: var(--text-3); }
.bz-tbl { margin-top: 12px; overflow: hidden; }
.bz-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bz-table th, .bz-table td { padding: 11px 6px; text-align: left; vertical-align: top; }
.bz-table th:first-child, .bz-table td:first-child { padding-left: var(--pad); }
.bz-table th:last-child, .bz-table td:last-child { padding-right: var(--pad); }
.bz-table thead th { padding-top: 12px; padding-bottom: 9px; font-size: 12px; font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--line); }
.bz-table tbody td { border-top: 1px solid var(--line); }
.bz-table tbody tr:first-child td { border-top: 0; }
.bz-table .num { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.bz-table thead .num { font-family: inherit; font-size: 12px; }
.bz-n { display: block; font-size: 14.5px; font-weight: 600; }
.bz-table small { display: block; margin-top: 1px; font-size: 11.5px; line-height: 1.4; color: var(--text-3); }
.bz-table .is-zero td { color: #b3b8c0; }
.bz-table .is-zero .bz-n { font-weight: 500; }
.bz-table td.is-hl { color: var(--brand); font-weight: 700; }
.bz-table sup { margin-left: 1px; color: var(--brand); }
.bz-table tfoot td { padding-top: 12px; padding-bottom: 12px; font-weight: 700; border-top: 1px solid var(--line-2); background: #fafbfc; }

/* ---------------------------------------------------------------- 号码热度 */
.ht { padding: 14px var(--pad) 8px; }
.ht__sum { margin-bottom: 6px; font-size: 14px; color: var(--text-2); }
.ht__sum b { font-family: var(--num); font-size: 15px; letter-spacing: .3px; }
.ht__hot { color: var(--brand); }
.ht__cold { color: var(--blue); }
.ht__dot { display: inline-block; width: 3px; height: 3px; margin: 0 10px; border-radius: 50%; vertical-align: middle; background: var(--line-2); }
.ht-list { display: grid; grid-template-columns: 1fr; }
.ht-row {
  display: grid; grid-template-columns: 22px 28px minmax(0, 1fr) 62px; align-items: center; gap: 10px;
  padding: 7px 0; border-top: 1px solid var(--line);
}
.ht-row:first-child { border-top: 0; }
.ht-rank { text-align: center; font: 600 13px var(--num); color: var(--text-3); }
.ht-rank.is-top { color: var(--brand); font-weight: 700; }
.ht-bar { display: block; height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.ht-bar i { display: block; height: 100%; min-width: 3px; border-radius: 4px; }
.ht-bar__red { background: linear-gradient(90deg, #f7b0b3, var(--red)); }
.ht-bar__blue { background: linear-gradient(90deg, #a6c5ee, var(--blue)); }
.ht-val { text-align: right; font: 600 15px var(--num); font-variant-numeric: tabular-nums; }
.ht-hist { padding: 14px 0 6px; }
.ht-hist__t { padding: 0 var(--pad) 8px; font-size: 15px; font-weight: 600; }
.ht-hist__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ht-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ht-table th, .ht-table td { padding: 6px 8px; white-space: nowrap; }
.ht-table thead th { font-size: 11.5px; font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--line); }
.ht-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.ht-table .num { text-align: right; font-family: var(--num); font-variant-numeric: tabular-nums; }
.ht-table th:first-child {
  position: sticky; left: 0; z-index: 1; padding-left: var(--pad); text-align: left; background: #fff;
  box-shadow: 1px 0 0 var(--line);
}

/* ---------------------------------------------------------------- 号码 DNA */
.dn-form-card { padding: 16px var(--pad) 18px; }
.dn-form__t { font-size: 17px; font-weight: 700; }
.dn-form__d { margin: 2px 0 6px; font-size: 14px; color: var(--text-3); }
.dn-err { margin: 8px 0 4px; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--brand); background: var(--brand-50); }
.dn-g { min-width: 0; margin: 0; padding: 14px 0 6px; border: 0; }
.dn-g + .dn-g { border-top: 1px solid var(--line); }
.dn-g__t { display: flex; align-items: center; gap: 7px; padding: 0; font-size: 16px; font-weight: 700; }
.dn-g__t small { font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.dn-pick { position: relative; justify-self: center; align-self: center; width: 44px; height: 44px; }
.cz-grid[style*='--cols:8'] .pick, .dn-picks[style*='--cols:8'] .dn-pick { width: 38px; height: 38px; font-size: 15px; }
.dn-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.dn-pick span {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  border: 1.5px solid var(--line-2); border-radius: 50%; background: #fff; color: var(--text-2);
  font: 700 17px/1 var(--num); font-variant-numeric: tabular-nums;
}
.dn-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.dn-form .btn { margin-top: 16px; }
.dn-tbl { overflow-x: auto; }
.dn-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dn-table th, .dn-table td { padding: 7px 3px; text-align: center; }
.dn-table thead th { padding-top: 11px; padding-bottom: 9px; font-size: 11.5px; font-weight: 500; color: var(--text-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dn-table th:first-child, .dn-table td:first-child { padding-left: 12px; text-align: left; }
.dn-table th:last-child, .dn-table td:last-child { padding-right: 12px; }
.dn-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.dn-table .num { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 15px; }
.dn-table thead .num { font-family: inherit; font-size: 11.5px; }
.dn-table .is-hot { color: var(--brand); font-weight: 700; }
.dn-table .is-cold { color: var(--blue); font-weight: 700; }
.dn-res { padding: 18px var(--pad) 16px; }
.dn-res__s { margin: 14px 0 12px; font-size: 15px; color: var(--text-2); }
.dn-res__s b { color: var(--brand); }
.dn-tier { padding: 14px var(--pad) 12px; }
.dn-tier__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dn-tier__t { font-size: 17px; font-weight: 700; }
.dn-tier__t small { margin-left: 6px; font-size: 12.5px; font-weight: 400; color: var(--text-3); }
.dn-tier__d { margin-top: 2px; font-size: 13px; color: var(--text-3); }
.dn-tier.is-zero .dn-tier__t { color: var(--text-3); font-weight: 600; }
.dn-issues { margin-top: 8px; }
.dn-issues li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.dn-issues a { font-size: 14.5px; font-weight: 600; }
.dn-issues a:active { color: var(--brand); }
.dn-issues__n { font: 13.5px var(--num); font-variant-numeric: tabular-nums; color: var(--text-2); text-align: right; }
.dn-issues__n i { margin: 0 4px; font-style: normal; color: var(--text-3); }
.dn-more summary { padding: 10px 0 2px; font-size: 14px; color: var(--brand); cursor: pointer; list-style: none; }
.dn-more summary::-webkit-details-marker { display: none; }

@media (min-width: 768px) {
  .cz-bar { bottom: 0; }
  .tl-links { grid-template-columns: repeat(5, 1fr); }
  .ht-list { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .ht-row:nth-child(2) { border-top: 0; }
  .pick:hover:not(.is-on):not(.is-dan) { border-color: #c9cdd3; color: var(--text); }
}
