:root {
  --bg-page: #f3f3f3;
  --bg-header: #fff;
  --bg-panel: #fff;
  --bg-table: #fff;
  --bg-th: #fafafa;
  --bg-status: #f1f8ff;
  --bg-text-ad: #f9f9f9;
  --bg-toggle: #fff;
  --text-main: #222;
  --text-title: #555;
  --text-muted: #6f6f6f;
  --text-status: #115da8;
  --text-footer: #777;
  --border: #e5e5e5;
  --border-soft: #ececec;
}

html[data-theme="dark"] {
  --bg-page: #1a1a1a;
  --bg-header: #222;
  --bg-panel: #2a2a2a;
  --bg-table: #2a2a2a;
  --bg-th: #333;
  --bg-status: #3a2a2a;
  --bg-text-ad: #333;
  --bg-toggle: #2a2a2a;
  --text-main: #e8e8e8;
  --text-title: #d0d0d0;
  --text-muted: #aaa;
  --text-status: #ffb4b4;
  --text-footer: #999;
  --border: #3a3a3a;
  --border-soft: #444;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  transition: background 0.2s, color 0.2s;
}

.container {
  width: min(980px, 94vw);
  margin: 0 auto;
}

.site-header {
  width: 100%;
  background: var(--bg-header);
  color: var(--text-main);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

/* 智能吸顶：下滑隐藏、上滑显示 */
.site-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  background: var(--bg-header);
  transition: transform 0.28s ease;
  will-change: transform;
}
.site-topbar.is-hidden {
  transform: translateY(-100%);
}

/* ===== 全站彩种导航菜单 ===== */
.site-nav {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.site-nav-inner {
  display: flex;
  gap: 0;
  padding: 0;
}
.site-nav-link {
  display: inline-block;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.site-nav-link:hover {
  color: #e60012;
}
.site-nav-link.active {
  color: #e60012;
  border-bottom-color: #e60012;
  font-weight: 600;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.primary-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1;
}

.logo-mark {
  width: 60px;
  height: 36px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seo-intro {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
}

.seo-intro p {
  margin: 0;
}

.seo-intro .brand-accent {
  color: #e60012;
  font-weight: 700;
}

.seo-section-title {
  margin: 18px 0 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.4;
}

.seo-block {
  margin-top: 12px;
  padding: 10px 12px 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.seo-block .seo-section-title {
  margin-top: 0;
}

.seo-predict-block .table-wrap {
  margin-top: 4px;
}

.faq-panel {
  margin-top: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.faq-heading {
  margin: 0;
  padding: 14px 14px 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
  line-height: 1.4;
  border-bottom: 1px solid var(--border);
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q-heading {
  display: block;
  margin: 0;
}

.faq-q {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: var(--bg-panel);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.faq-q:hover {
  background: #fff4f0;
  color: #e60012;
}

.faq-item.is-open .faq-q {
  color: #e60012;
  background: #fffafa;
  box-shadow: inset 3px 0 0 #e60012;
}

html[data-theme="dark"] .faq-q:hover {
  background: #3a2a2a;
  color: var(--text-status);
}

html[data-theme="dark"] .faq-item.is-open .faq-q {
  background: #332525;
  box-shadow: inset 3px 0 0 #e60012;
}

.faq-q:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px #e60012;
}

.faq-mark {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #999;
  transition: transform 0.2s ease, color 0.15s ease;
}

.faq-item.is-open .faq-mark {
  transform: rotate(180deg);
  color: #e60012;
}

.faq-q-text {
  flex: 1;
  min-width: 0;
}

.faq-a-wrap[hidden] {
  display: none;
}

.faq-a-wrap:not([hidden]) {
  padding: 0 14px 14px 42px;
  background: var(--bg-th);
  border-top: 1px solid var(--border-soft);
}

.faq-a {
  margin: 0;
  padding-top: 12px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-muted);
  text-align: justify;
}

.seo-empty,
.seo-noscript {
  margin: 0;
  padding: 14px 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.seo-noscript {
  background: var(--bg-status);
  border-top: 1px solid var(--border);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  background: var(--bg-toggle);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  display: none;
}

html[data-theme="light"] .theme-toggle .icon-moon,
html:not([data-theme]) .theme-toggle .icon-moon {
  display: block;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.feedback-link {
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .logo-mark {
    width: 48px;
    height: 30px;
  }

  .logo-title {
    font-size: 14px;
  }

  .header-right {
    gap: 8px;
  }

  /* 窄屏隐藏「联系客服」文字，保留主题切换，避免顶栏换行 */
  .feedback-link {
    display: none;
  }
}

.panel {
  background: var(--bg-panel);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.panel h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.muted {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.status {
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 6px;
  font-size: 13px;
  background: var(--bg-status);
  color: var(--text-status);
}

.ad-strip {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mid-ads {
  margin-bottom: 0;
}

.quick-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 12px;
}

.quick-nav-btn {
  border: 0;
  background: transparent;
  text-align: center;
  padding: 12px 8px;
  color: var(--text-main);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.quick-nav-btn + .quick-nav-btn {
  border-left: 1px solid var(--border);
}

.quick-nav-btn.active {
  color: #e60012;
  box-shadow: inset 0 -2px 0 #e60012;
}

.game-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.game-tab {
  flex: 1 1 calc(50% - 4px);
  min-width: 120px;
  display: block;
  background: #ececec;
  border: 0;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  color: #555;
  font-size: 15px;
  text-decoration: none;
  box-sizing: border-box;
}

.game-tab.active {
  background: #ececec;
  color: #e60012;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 #e60012;
}

html[data-theme="dark"] .game-tab {
  background: #333;
  color: #ccc;
}

html[data-theme="dark"] .game-tab.active {
  color: #ff6b6b;
  box-shadow: inset 0 -2px 0 #ff6b6b;
}

.hk-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 12px;
  padding: 16px 10px 14px;
  text-align: center;
}

.hk-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
}

.hk-title .issue {
  color: #e60012;
  padding: 0 4px;
}

.hk-balls {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0 2px;
}

.hk-col {
  flex: 0 0 12%;
  width: 12%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hk-ball {
  --hk-c: #2e9d57;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 18px;
  font-weight: 900;
  color: #151515;
  background: #fff url("../images/ball-blue.png") center / 100% 100% no-repeat;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.hk-ball.hk-red {
  background-image: url("../images/ball-red.png");
}

.hk-ball.hk-blue {
  background-image: url("../images/ball-blue.png");
}

.hk-ball.hk-green {
  background-image: url("../images/ball-green.png");
}

.hk-ball .hk-n {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding-bottom: 6%;
  line-height: 1;
  font-size: inherit;
  font-weight: 900;
  color: #151515;
}

.hk-lab {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: #222;
}

.hk-c-red { color: #e53935; }
.hk-c-blue { color: #1e7be6; }
.hk-c-green { color: #1aa05a; }

.hk-wx-jin { color: #e53935; }
.hk-wx-mu { color: #26c6da; }
.hk-wx-shui { color: #1e88e5; }
.hk-wx-huo { color: #fb8c00; }
.hk-wx-tu { color: #c49a3c; }

.hk-plus {
  flex: 1 1 0;
  min-width: 22px;
  height: 46px;
  padding: 0;
  font-size: 22px;
  font-weight: 700;
  color: #222;
  line-height: 46px;
  text-align: center;
}

.hk-row .hk-plus {
  color: #1e7be6;
}

.hk-red { --hk-c: #e53935; }
.hk-blue { --hk-c: #1e88e5; }
.hk-green { --hk-c: #2e9d57; }

.hk-countdown {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-main);
}

.hk-history {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 12px;
  overflow: hidden;
}

.hk-history[hidden] {
  display: none;
}

.hk-subtabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  background: #e9e9e9;
}

html[data-theme="dark"] .hk-subtabs {
  background: #333;
}

.hk-subtab {
  border: 0;
  background: transparent;
  padding: 11px 2px;
  cursor: pointer;
  color: #666;
  font-size: 13px;
}

.hk-subtab.active {
  background: var(--bg-panel);
  color: #e60012;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 #e60012;
}

html[data-theme="dark"] .hk-subtab {
  color: #ccc;
}

html[data-theme="dark"] .hk-subtab.active {
  color: #ff6b6b;
  box-shadow: inset 0 -2px 0 #ff6b6b;
}

.hk-row {
  padding: 10px 8px 12px;
  border-top: 1px solid var(--border);
}

.hk-row:nth-child(even) {
  background: #f7f7f7;
}

html[data-theme="dark"] .hk-row:nth-child(even) {
  background: #242424;
}

.hk-row-head {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding: 0 4px;
}

.hk-row .hk-ball {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.hk-row .hk-plus {
  height: 36px;
  line-height: 36px;
  font-size: 18px;
}

.hk-history .more-btn {
  margin: 8px;
  width: calc(100% - 16px);
}

.hk-predict {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 12px;
  overflow: hidden;
}

.hk-predict[hidden] {
  display: none;
}

.hk-xin-title {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 10px 8px;
}

.hk-xin-title .issue {
  color: #e60012;
  padding: 0 4px;
}

.hk-xin-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border-soft);
}

.hk-xin-label {
  flex: 0 0 52px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 6px;
}

.hk-xin-vals {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.hk-xin-vals .hk-ball {
  width: 32px;
  height: 32px;
  font-size: 13px;
  flex: 0 0 auto;
}

.hk-xin-chip {
  min-width: 32px;
  padding: 4px 8px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: #f3f3f3;
  color: var(--text-main);
}

html[data-theme="dark"] .hk-xin-chip {
  background: #3a3a3a;
}

.hk-xin-chip.wave-red { background: #e53935; color: #fff; }
.hk-xin-chip.wave-blue { background: #1e88e5; color: #fff; }
.hk-xin-chip.wave-green { background: #2e9d57; color: #fff; }

.hk-xin-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 12px 12px;
}

.hk-xin-sub {
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px 6px;
  background: #f7f7f7;
}

html[data-theme="dark"] .hk-xin-sub {
  background: #333;
}

.hk-xin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hk-xin-table th,
.hk-xin-table td {
  padding: 8px 6px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.hk-xin-table th {
  background: var(--bg-th);
  font-weight: 700;
}

.hk-hit { color: #e60012; font-weight: 700; }
.hk-miss { color: #888; }

@media (max-width: 480px) {
  .hk-ball {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .hk-plus {
    height: 38px;
    line-height: 38px;
    font-size: 18px;
  }

  .hk-lab {
    font-size: 11px;
  }

  .hk-row .hk-ball {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .hk-row .hk-plus {
    height: 30px;
    line-height: 30px;
  }

  .hk-subtab {
    font-size: 12px;
    padding: 10px 0;
  }
}

.draw-box {
  background: var(--bg-panel);
  border-radius: 8px;
  margin-top: 12px;
  padding: 14px 10px;
  text-align: center;
}

.draw-issue {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.draw-formula {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 22px;
  font-weight: 700;
}

.draw-num {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2f7de1;
  color: #fff;
}

.draw-tags {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.tag {
  min-width: 42px;
  padding: 4px 12px;
  border-radius: 4px;
  color: #fff;
  font-weight: 700;
}

.tag-red { background: #e60012; }
.tag-blue { background: #2f7de1; }

.data-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  background: #e9e9e9;
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.data-tab {
  border: 0;
  background: transparent;
  padding: 12px 8px;
  cursor: pointer;
  color: #666;
  font-size: 15px;
}

.data-tab.active {
  background: var(--bg-panel);
  color: #e60012;
  font-weight: 700;
  box-shadow: inset 0 2px 0 #e60012;
}

html[data-theme="dark"] .data-tabs {
  background: #2a2a2a;
}

.lottery-panel {
  margin-top: 0;
  border-radius: 0 0 10px 10px;
}

.trend-table th,
.trend-table td {
  padding: 7px 4px;
  font-size: 12px;
}

.interval-row {
  background: #f3f3f3;
  color: #888;
  font-size: 12px;
}

html[data-theme="dark"] .interval-row {
  background: #333;
}

.dot {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}

.rect {
  display: inline-flex;
  min-width: 36px;
  height: 22px;
  border-radius: 3px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  padding: 0 4px;
}

.badge {
  display: inline-block;
  min-width: 44px;
  padding: 3px 8px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
}

.badge-hit { background: #e60012; }
.badge-miss { background: #2f7de1; }

.pred-red { color: #e60012; font-weight: 700; }
.pred-gray { color: #666; font-weight: 700; }

.date-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.date-bar input {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: 4px;
}

.date-bar button {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.pie-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.pie-card {
  text-align: center;
}

.pie-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.pie {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 8px;
}

.pie-legend {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.stats-block {
  margin-bottom: 14px;
}

.stats-block h3 {
  margin: 0;
  background: #f08a24;
  color: #fff;
  font-size: 14px;
  padding: 8px;
  text-align: center;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-top: 0;
}

.stats-row span {
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  border-right: 1px solid var(--border);
}

.stats-row span:last-child {
  border-right: 0;
}

.num-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-top: 0;
}

.num-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.num-circle {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  background: #f08a24;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.zebra:nth-child(even) {
  background: #fafafa;
}

html[data-theme="dark"] .zebra:nth-child(even) {
  background: #2f2f2f;
}

@media (max-width: 760px) {
  .back-to-top {
    display: none !important;
  }

  .pie {
    width: 110px;
    height: 110px;
  }

  .stats-row,
  .num-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.countdown {
  color: #d32f2f;
  font-size: 14px;
  margin-top: 6px;
}

.more-btn,
.cta-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.more-btn {
  background: #f2f2f2;
  color: var(--text-main);
}

html[data-theme="dark"] .more-btn {
  background: #333;
  color: var(--text-main);
}

.cta-btn {
  background: #6c4dff;
  color: #fff;
  font-weight: 700;
  margin: 14px 0 8px;
}

.result-big {
  color: #d32f2f;
  font-weight: 700;
}

.result-small {
  color: #1565c0;
  font-weight: 700;
}

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

.ad-card,
.top-ad {
  display: block;
  background: var(--bg-panel);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
}

.ad-card img,
.top-ad img {
  width: 100%;
  display: block;
}

.ad-card .meta,
.top-ad .meta {
  padding: 8px 10px;
}

.ad-card .title,
.top-ad .title {
  font-size: 14px;
  color: #222;
  margin: 0;
}

.ad-card .desc,
.top-ad .desc {
  font-size: 12px;
  color: #666;
  margin: 4px 0 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-table);
}

th,
td {
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 10px 8px;
  font-size: 14px;
  white-space: nowrap;
}

th {
  background: var(--bg-th);
}

.num-list {
  display: inline-flex;
  gap: 4px;
}

.num-ball {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  background: #3777d8;
}

.text-ad-panel {
  margin-top: 12px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
}

.text-ad-panel .cta-btn {
  margin: 0;
  border-radius: 0;
}

.text-ads {
  display: flex;
  flex-direction: column;
}

.text-ad {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 700;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  transition: background 0.15s ease, text-decoration-color 0.15s ease;
}

.text-ad:hover {
  background: #fff4f0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

html[data-theme="dark"] .text-ad:hover {
  background: #3a2a2a;
}

.text-ad-panel .cta-btn:hover {
  background: #5a3de6;
}

.site-footer {
  margin-top: 18px;
  padding: 22px 0 36px;
  color: var(--text-footer);
  text-align: center;
  background: #fff;
  border-top: 1px solid var(--border);
}

html[data-theme="dark"] .site-footer {
  background: var(--bg-header);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.footer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-title);
  text-decoration: none;
}

.footer-chip svg,
.footer-mail svg,
.tg-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.footer-chip:hover {
  background: #f7f7f7;
}

html[data-theme="dark"] .footer-chip:hover {
  background: #333;
}

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: #888;
  font-size: 13px;
}

.tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #e0b15a, #c48a2a);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(180, 120, 20, 0.25);
}

.tg-btn svg {
  width: 14px;
  height: 14px;
}

.tg-btn:hover {
  background: linear-gradient(180deg, #e8bc68, #b57b20);
}

.footer-disclaimer {
  margin: 16px auto 0;
  max-width: none;
  font-size: 12px;
  line-height: 1.7;
  color: #999;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 768px) {
  .footer-disclaimer {
    white-space: normal;
    max-width: 100%;
    padding: 0 8px;
    word-break: break-word;
  }
}

.page-shell {
  position: relative;
  width: min(980px, 94vw);
  margin: 0 auto;
  overflow: visible;
}

.page-shell > .container {
  width: 100%;
}

.float-rail {
  position: absolute;
  top: 0;
  bottom: 12px;
  width: 72px;
  pointer-events: none;
}

.float-rail-left {
  left: -96px;
}

.float-rail-right {
  right: -96px;
}

.float-ad {
  position: sticky;
  top: calc(100vh - 200px);
  margin-top: calc(100vh - 220px);
  width: 72px;
  display: block;
  text-decoration: none;
  pointer-events: auto;
}

.float-ad img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}


.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 84px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(35, 35, 35, 0.82);
  color: #fff;
  font-size: 24px;
  line-height: 42px;
  text-align: center;
  cursor: pointer;
  z-index: 1200;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.back-to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: rgba(230, 0, 18, 0.9);
}

@media (max-width: 1100px) {
  .float-rail {
    width: 56px;
    bottom: 8px;
  }

  .float-rail-left {
    left: 8px;
  }

  .float-rail-right {
    right: 8px;
  }

  .float-ad {
    width: 56px;
    top: calc(100vh - 180px);
  }
}

@media (max-width: 760px) {
  .ad-grid {
    grid-template-columns: 1fr 1fr;
  }

  .float-rail {
    position: fixed;
    top: auto;
    bottom: 78px;
    width: 40px;
    height: auto;
    z-index: 900;
    pointer-events: none;
  }

  .float-rail-left {
    left: 6px;
    right: auto;
  }

  .float-rail-right {
    right: 6px;
    left: auto;
  }

  .float-ad {
    position: static;
    top: auto;
    margin-top: 0;
    width: 40px;
  }

  .float-ad img {
    border-radius: 6px;
  }
}

/* ── 加拿大28预测专页 ─────────────────────── */
.yuce-panel {
  margin-top: 12px;
  padding-top: 14px;
}

.yuce-head {
  text-align: center;
  margin-bottom: 4px;
}

.yuce-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.yuce-meta {
  margin: 8px 0 12px;
  font-size: 13px;
  color: var(--text-muted, #888);
}

.yuce-meta strong {
  color: #e60012;
  font-weight: 700;
}

.yuce-rate {
  white-space: nowrap;
}

.yuce-algo-tabs {
  margin-top: 0;
}

.yuce-algo-tabs .data-tab {
  font-size: 14px;
  padding: 11px 4px;
}

.yuce-sub-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px 0;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* display:flex 会盖掉原生 [hidden]，需显式隐藏 */
.yuce-sub-filters[hidden] {
  display: none !important;
}

.yuce-pill {
  border: 1px solid var(--border);
  background: #f3f3f3;
  color: #666;
  padding: 6px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
}

.yuce-pill.active {
  background: #e60012;
  border-color: #e60012;
  color: #fff;
  font-weight: 700;
}

html[data-theme="dark"] .yuce-pill {
  background: #333;
  color: #bbb;
}

html[data-theme="dark"] .yuce-pill.active {
  background: #e60012;
  color: #fff;
}

.yuce-table td {
  vertical-align: middle;
}

.yc-draw {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-wrap: nowrap;
  justify-content: center;
  white-space: nowrap;
}

.yc-ball {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #e60012;
}

.yc-ball.yc-sum {
  background: #2f7de1;
}

.yc-plus,
.yc-eq {
  color: #999;
  font-size: 12px;
  margin: 0 1px;
}

.yc-pending {
  color: #999;
  letter-spacing: 1px;
}

.yc-cell-tags {
  line-height: 1.8;
}

.yc-cell-tags .tag {
  display: inline-block;
  margin: 2px 3px;
  min-width: 36px;
  padding: 2px 8px;
  font-size: 12px;
}

.yc-algo-label {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f0f0f0;
  color: #555;
  font-size: 12px;
}

html[data-theme="dark"] .yc-algo-label {
  background: #3a3a3a;
  color: #ccc;
}

.yuce-algo-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.yuce-algo-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--bg-panel);
}

.yuce-algo-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #e60012;
}

.yuce-algo-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
}

.yuce-panel .lottery-panel {
  border: 1px solid var(--border);
  border-top: 0;
}

.yuce-panel .table-wrap {
  -webkit-overflow-scrolling: touch;
}

.yuce-table.is-all-mode {
  min-width: 520px;
}

.yuce-table td.yc-col-draw,
.yuce-table th.yc-col-draw {
  min-width: 118px;
}

@media (max-width: 760px) {
  .yuce-panel .table-wrap {
    margin: 0 -2px;
  }

  .yuce-table th,
  .yuce-table td {
    padding: 8px 4px;
    font-size: 12px;
  }

  .yuce-table td.yc-col-issue {
    font-size: 11px;
    padding-left: 2px;
    padding-right: 2px;
  }

  .yc-ball {
    width: 18px;
    height: 18px;
    font-size: 10px;
    flex-shrink: 0;
  }

  .yc-plus,
  .yc-eq {
    font-size: 10px;
    margin: 0;
    flex-shrink: 0;
  }

  .yc-cell-tags .tag {
    min-width: 28px;
    padding: 2px 4px;
    font-size: 11px;
    margin: 1px 2px;
  }

  .yc-algo-label {
    font-size: 11px;
    padding: 2px 5px;
    white-space: nowrap;
  }

  .yuce-table .badge {
    min-width: 32px;
    padding: 2px 6px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .yuce-algo-cards {
    grid-template-columns: 1fr;
  }

  .yuce-algo-tabs .data-tab {
    font-size: 12px;
    padding: 10px 2px;
  }

  .yuce-title {
    font-size: 16px;
  }

  .yc-ball {
    width: 22px;
    height: 22px;
    font-size: 11px;
  }
}
