:root{
  --bg:#f4f6f9; --card:#ffffff; --text:#1f2430; --sub:#6b7280;
  --line:#e8ebf0; --red:#e64340; --red-soft:#fdecea; --blue:#2563eb; --blue-soft:#e8f0fe;
  --shadow:0 2px 12px rgba(31,36,48,.06);
}
*{box-sizing:border-box;margin:0;padding:0}
body{background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;padding:28px 20px 60px}
.wrap{max-width:1180px;margin:0 auto}
header{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.logo{display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:linear-gradient(135deg,var(--red),var(--blue));color:#fff;font-weight:800;box-shadow:var(--shadow);text-decoration:none;letter-spacing:1px;white-space:nowrap;padding:0 14px;height:44px;font-size:18px;flex-shrink:0;transition:transform .2s}
.logo:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(220,38,38,.25)}
/* 单字 logo（首页"發"）保持方形 */
.logo-square{width:44px!important;padding:0!important;letter-spacing:0!important;flex:0 0 auto}
h1{font-size:22px;font-weight:700;letter-spacing:.5px}
.subtitle{color:var(--sub);font-size:13px;margin-top:3px}
.panel{background:var(--card);border-radius:14px;box-shadow:var(--shadow);padding:20px 22px;margin-bottom:18px}
.controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.controls label{font-size:14px;font-weight:600;color:var(--sub)}
input[type=number]{width:120px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;font-size:14px;outline:none;background:#fff;color:var(--text)}
input[type=number]:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(37,99,235,.1)}
button{padding:9px 20px;border:none;border-radius:8px;background:var(--blue);color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:.15s}
button:hover{background:#1d4ed8}
button:disabled{background:#9ca3af;cursor:not-allowed}
.quick{display:inline-flex;gap:6px;align-items:center;flex-wrap:wrap}
.qlabel{font-size:12px;color:var(--sub)}
.qbtn{padding:6px 12px;font-size:12px;background:#f3f4f6;color:var(--text);border:1px solid var(--line);font-weight:600}
.qbtn:hover{background:#e5e7eb}
.qbtn.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.meta{margin-left:auto;color:var(--sub);font-size:12.5px;text-align:right;line-height:1.7}
.meta b{color:var(--text);font-weight:600}
.alert{margin-top:12px;padding:10px 14px;border-radius:8px;font-size:13px;display:none}
.alert.err{display:block;background:var(--red-soft);color:var(--red)}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.stat{border-radius:14px;padding:18px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.stat.red{background:linear-gradient(145deg,#fff 60%,var(--red-soft))}
.stat.blue{background:linear-gradient(145deg,#fff 60%,var(--blue-soft))}
.stat .tag{font-size:12px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:var(--sub)}
.stat .num{font-size:38px;font-weight:800;line-height:1.2;margin:8px 0 2px}
.stat.red .num{color:var(--red)} .stat.blue .num{color:var(--blue)}
.stat .desc{font-size:13px;color:var(--sub)}
.stat .desc b{color:var(--text)}
.badge{position:absolute;top:14px;right:14px;font-size:11px;padding:3px 9px;border-radius:20px;font-weight:700}
.badge.hi{background:var(--red-soft);color:var(--red)} .badge.lo{background:#f1f5f9;color:#64748b}
.badge.bhi{background:var(--blue-soft);color:var(--blue)}
h2{font-size:16px;font-weight:700;margin-bottom:4px;display:flex;align-items:center;gap:8px}
.dot{width:9px;height:9px;border-radius:50%}
.note{color:var(--sub);font-size:12px;margin-bottom:16px}
.chart{width:100%;overflow-x:auto}
.legend{display:flex;gap:18px;font-size:12px;color:var(--sub);margin-top:10px;flex-wrap:wrap}
.legend span{display:inline-flex;align-items:center;gap:6px}
.swatch{width:12px;height:12px;border-radius:3px;display:inline-block}
table{width:100%;border-collapse:collapse;font-size:13.5px}
th,td{padding:9px 10px;text-align:right;border-bottom:1px solid var(--line)}
th:first-child,td:first-child{text-align:left}
thead th{color:var(--sub);font-weight:600;background:#fafbfc;position:sticky;top:0;cursor:pointer;user-select:none}
thead th:hover{color:var(--blue)}
tbody tr:hover{background:#fafbfc}
.ball{display:inline-flex;width:28px;height:28px;border-radius:50%;align-items:center;justify-content:center;color:#fff;font-weight:700;font-size:13px}
.ball.red{background:var(--red)} .ball.blue{background:var(--blue)}
.bar-cell{width:140px}
.bar-track{height:8px;background:#eef1f5;border-radius:5px;overflow:hidden}
.bar-fill{height:100%;border-radius:5px}
.tabs{display:flex;gap:8px;margin-bottom:14px}
.tab{padding:6px 14px;border-radius:20px;border:1px solid var(--line);background:#fff;color:var(--sub);font-size:13px;cursor:pointer;font-weight:600}
.tab.on{background:var(--text);color:#fff;border-color:var(--text)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.loading{text-align:center;padding:50px 20px;color:var(--sub);font-size:14px}
.spinner{width:28px;height:28px;border:3px solid var(--line);border-top-color:var(--blue);border-radius:50%;animation:spin .8s linear infinite;margin:0 auto 14px}
@keyframes spin{to{transform:rotate(360deg)}}
/* ===== 顶部导航 / 主页面 ===== */
.topnav{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.nav-link{padding:7px 15px;border-radius:8px;color:var(--sub);font-size:13px;font-weight:600;text-decoration:none;border:1px solid transparent}
.nav-link:hover{background:#f3f4f6;color:var(--text)}
.nav-link.on{background:#eef2ff;color:#4338ca;border-color:#e0e7ff}
.hero{padding:14px 4px 20px}
.hero-title{font-size:26px;font-weight:800;letter-spacing:.5px}
.hero-sub{color:var(--sub);font-size:13.5px;margin-top:6px}
/* ===== 首页美化 ===== */
body.home{background:#f6f7fb;position:relative;overflow-x:hidden}
.home-bg{position:fixed;inset:0;pointer-events:none;z-index:0;overflow:hidden}
.bg-blob{position:absolute;border-radius:50%;filter:blur(80px);opacity:.35}
.bg-blob.b1{width:480px;height:480px;background:linear-gradient(135deg,#fca5a5,#fda4af);top:-140px;right:-100px}
.bg-blob.b2{width:420px;height:420px;background:linear-gradient(135deg,#a5b4fc,#c4b5fd);bottom:-120px;left:-120px}
.bg-blob.b3{width:380px;height:380px;background:linear-gradient(135deg,#99f6e4,#a7f3d0);top:40%;left:60%;opacity:.25}
body.home .wrap{position:relative;z-index:1}
.home-header{display:flex;align-items:center;gap:16px;margin-bottom:28px;flex-wrap:wrap}
.header-badge{margin-left:auto;background:linear-gradient(135deg,#fef3c7,#fde68a);color:#92400e;padding:6px 14px;border-radius:20px;font-size:12px;font-weight:700;box-shadow:0 2px 8px rgba(217,119,6,.15)}
.hero-panel{background:linear-gradient(135deg,#ffffff 0%,#fef2f2 50%,#eff6ff 100%);border:1px solid #fff;border-radius:20px;padding:32px 36px;box-shadow:0 8px 32px rgba(31,36,48,.06);margin-bottom:32px;position:relative;overflow:hidden}
.hero-panel::after{content:'🎱';position:absolute;right:32px;top:50%;transform:translateY(-50%);font-size:120px;opacity:.08;pointer-events:none}
.hero-badge{display:inline-block;background:#fff;border:1px solid var(--line);padding:5px 14px;border-radius:20px;font-size:12px;color:var(--sub);font-weight:600;margin-bottom:14px}
.hero-panel .hero-title{font-size:34px;line-height:1.2;margin-bottom:12px}
.grad-text{background:linear-gradient(135deg,#dc2626 0%,#7c3aed 50%,#2563eb 100%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-weight:900}
.hero-desc{color:var(--sub);font-size:14.5px;line-height:1.75;margin-bottom:20px;max-width:560px}
.hero-stats{display:flex;gap:12px;flex-wrap:wrap}
.stat-pill{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 16px;display:flex;flex-direction:column;align-items:center;min-width:90px}
.stat-pill b{font-size:18px;color:var(--text);font-weight:800;line-height:1.2}
.stat-pill span{font-size:11px;color:var(--sub);margin-top:2px}
.section-label{display:flex;align-items:center;gap:12px;margin:32px 0 18px}
.label-icon{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0}
.label-title{font-size:18px;font-weight:800;color:var(--text);line-height:1.2}
.label-sub{font-size:12.5px;color:var(--sub);margin-top:3px}
.entry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:18px}
.home-note{display:flex;gap:14px;align-items:flex-start;margin-top:28px;padding:18px 22px;border-radius:14px;background:linear-gradient(135deg,#fffbeb,#fef3c7);border:1px solid #fde68a;color:#92400e;font-size:13px;line-height:1.7}
.note-icon{font-size:22px;flex-shrink:0;line-height:1.3}
.home-footer{display:flex;gap:10px;justify-content:center;align-items:center;margin-top:32px;padding-top:22px;border-top:1px solid var(--line);color:var(--sub);font-size:12px}
/* ===== 走势图 ===== */
.trend-page .wrap{max-width:1600px}
.trend-wrap{overflow-x:auto;background:var(--card);border-radius:12px;padding:8px;border:1px solid var(--line)}
.trend-tbl{border-collapse:collapse;font-size:11px;min-width:100%;font-variant-numeric:tabular-nums}
.trend-tbl th,.trend-tbl td{padding:3px 4px;text-align:center;border:1px solid #f3f4f6;white-space:nowrap}
.trend-tbl thead th{background:linear-gradient(180deg,#fef2f2,#fff);color:#7f1d1d;font-weight:700;position:sticky;top:0;z-index:2}
.trend-tbl thead th.blue-h{background:linear-gradient(180deg,#eff6ff,#fff);color:#1e3a8a}
.trend-tbl tbody tr:nth-child(even){background:#fafbfc}
.trend-tbl tbody tr:hover{background:#fef9c3}
.trend-issue{font-weight:700;color:var(--text);background:#f9fafb!important;min-width:72px;font-size:10.5px}
.trend-red-hit{background:#dc2626;color:#fff;font-weight:700;border-radius:4px}
.trend-blue-hit{background:#2563eb;color:#fff;font-weight:700;border-radius:4px}
.trend-d3-hit{color:#fff;font-weight:700;border-radius:4px}
.trend-d3-hit.d3-bai{background:#dc2626}.trend-d3-hit.d3-shi{background:#2563eb}.trend-d3-hit.d3-ge{background:#0891b2}
.d3-trend-tbl thead tr:first-child th{top:0;height:25px}
.d3-trend-tbl thead tr:nth-child(2) th{top:25px;height:25px}
.d3-trend-tbl thead th.d3-head-bai{background:linear-gradient(180deg,#fef2f2,#fff);color:#7f1d1d}
.d3-trend-tbl thead th.d3-head-shi{background:linear-gradient(180deg,#eff6ff,#fff);color:#1e3a8a}
.d3-trend-tbl thead th.d3-head-ge{background:linear-gradient(180deg,#ecfeff,#fff);color:#155e75}
.d3-number-head{min-width:58px}.d3-number{font-weight:800;letter-spacing:2px;color:var(--text);background:#f9fafb;min-width:58px}
.trend-miss{color:#9ca3af}
.trend-tbl td[data-hot="1"]{background:#fef2f2;color:#dc2626;font-weight:700}
.trend-tbl td[data-hot="2"]{background:#eff6ff;color:#2563eb;font-weight:700}
.trend-legend{display:flex;gap:18px;flex-wrap:wrap;font-size:12px;color:var(--sub);margin:0 0 10px;padding:10px 14px;background:#f9fafb;border-radius:8px}
.trend-legend-item{display:flex;align-items:center;gap:6px}
.legend-box{width:14px;height:14px;border-radius:3px;display:inline-block}
.legend-red{background:#dc2626}.legend-blue{background:#2563eb}.legend-teal{background:#0891b2}.legend-miss{background:#e5e7eb}
@media(max-width:560px){.hero-panel .hero-title{font-size:24px}.hero-panel::after{font-size:80px;right:16px}}
.entry{display:flex;gap:16px;background:var(--card);border:1px solid var(--line);border-radius:14px;padding:24px;box-shadow:var(--shadow);text-decoration:none;color:inherit;transition:.18s}
.entry:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(31,36,48,.12);border-color:#c7d2fe}
.entry-icon{width:52px;height:52px;border-radius:13px;display:flex;align-items:center;justify-content:center;font-size:26px;flex-shrink:0}
.red-icon{background:#fef2f2}.purple-icon{background:#f5f3ff}
.entry-name{font-size:17px;font-weight:700;margin-bottom:8px}
.entry-arrow{color:var(--blue);margin-left:4px}
.entry-desc{font-size:13px;color:var(--sub);line-height:1.7}
.entry-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.entry-tags span{font-size:11px;padding:4px 10px;border-radius:14px;background:#f3f4f6;color:#64748b;font-weight:600}
.home-note{margin-top:20px;padding:15px 18px;border-radius:10px;background:#fffbeb;border:1px solid #fde68a;color:#92400e;font-size:12.5px;line-height:1.7}
/* ===== 自动选号面板 ===== */
.preset-btn{padding:6px 12px;font-size:12px;background:#f3f4f6;color:var(--text);border:1px solid var(--line);font-weight:600}
.preset-btn:hover{background:#e5e7eb}
.pick-meta{margin-left:auto;color:var(--sub);font-size:12.5px;line-height:1.6}
.constraint-tags{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px}
.constraint-tags .ctag{font-size:11.5px;padding:4px 10px;border-radius:16px;background:#f5f3ff;color:#6d28d9;border:1px solid #e9e5ff;font-weight:600}
.pick-empty{text-align:center;padding:28px;color:#9ca3af;font-size:13px;border:1px dashed var(--line);border-radius:10px}
.ticket-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
.ticket{background:#fafbfc;border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.ticket-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.ticket-idx{font-size:12px;font-weight:700;color:var(--sub)}
.ticket-balls{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.ticket-balls .sep{color:var(--sub);font-weight:700;margin:0 2px}
.ticket-metrics{display:flex;gap:12px;flex-wrap:wrap;margin-top:9px;padding-top:8px;border-top:1px solid var(--line);font-size:11.5px;color:var(--sub)}
.ticket-metrics b{color:var(--text);font-weight:600}
.pick-warning{margin-top:12px;padding:9px 13px;border-radius:8px;background:#fff7ed;color:#c2410c;font-size:12.5px}
.analysis-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:8px}
.cmp-table{width:100%;border-collapse:collapse;font-size:12.5px;margin-bottom:10px}
.cmp-table th,.cmp-table td{padding:7px 10px;text-align:left;border:1px solid var(--line)}
.cmp-table th{background:#f5f3ff;color:#6d28d9;font-weight:700}
.cmp-table td:nth-child(2){color:var(--sub)}
.cmp-table td:nth-child(3){color:var(--text);font-weight:600}
.threshold-line{font-size:12.5px;color:var(--sub);background:#fafbfc;border-radius:8px;padding:9px 13px;margin-bottom:14px}
.threshold-line b{color:#6d28d9;font-weight:700}
/* ===== 精确理论 / 验证区 ===== */
.mode-switch{display:inline-flex;border:1px solid var(--line);border-radius:7px;overflow:hidden}
.mode-switch button{padding:6px 13px;font-size:12px;border:0;background:#fff;color:var(--sub);font-weight:600;cursor:pointer}
.mode-switch button.on{background:#7c3aed;color:#fff}
.verify-box{margin-top:16px;padding:14px 16px;background:#f8fafc;border:1px solid var(--line);border-radius:10px}
.verify-box h3{font-size:13px;margin:0 0 10px;color:var(--text);font-weight:700}
.verify-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.verify-tbl{width:100%;border-collapse:collapse;font-size:11.5px}
.verify-tbl th,.verify-tbl td{padding:5px 8px;border:1px solid var(--line);text-align:center}
.verify-tbl th{background:#eef2ff;color:#4338ca;font-weight:700}
.verify-tbl td:first-child{text-align:left;color:var(--text);font-weight:600}
.diff-ok{color:#15803d;font-weight:600}.diff-bad{color:#dc2626;font-weight:600}
.chi-badge{display:inline-block;padding:4px 11px;border-radius:14px;font-size:12px;font-weight:700;margin-top:8px}
.chi-pass{background:#dcfce7;color:#15803d}.chi-fail{background:#fee2e2;color:#dc2626}
.verify-note{font-size:11.5px;color:var(--sub);line-height:1.7;margin-top:10px}
.passrate-tbl{width:100%;border-collapse:collapse;font-size:12px;margin-top:6px}
.passrate-tbl th,.passrate-tbl td{padding:6px 10px;border:1px solid var(--line);text-align:center}
.passrate-tbl th{background:#f5f3ff;color:#6d28d9;font-weight:700}
.passrate-tbl td:first-child{text-align:left;font-weight:600}
.section-sub{font-size:12.5px;font-weight:700;color:#6d28d9;margin:14px 0 6px}
/* ===== 逐注验证 ===== */
.check-btn{font-size:11px;padding:4px 10px;background:#ecfeff;color:#0e7490;border:1px solid #a5f3fc;font-weight:700;border-radius:6px}
.check-btn:hover{background:#cffafe}
.check-summary{display:flex;align-items:center;gap:18px;flex-wrap:wrap;padding:12px 16px;background:#f8fafc;border:1px solid var(--line);border-radius:10px;margin-bottom:8px}
.check-balls{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.check-balls .sep{color:var(--sub);font-weight:700;margin:0 3px}
.check-conclusion{font-size:13px;color:var(--sub)}
.check-conclusion b{font-weight:700}
/* ===== 历史几等奖对账 ===== */
.prize-history-header{display:flex;gap:18px;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--sub)}
.prize-history-header b{color:var(--text);font-weight:700}
.prize-history-nums{display:flex;gap:16px;font-size:12px}
.prize-history-nums b{color:var(--text);font-weight:700}
.prize-chart{display:flex;flex-direction:column;gap:7px;margin-top:4px}
.prize-row{display:grid;grid-template-columns:60px 1fr 110px;gap:10px;align-items:center;padding:7px 10px;border-radius:8px;transition:.12s}
.prize-row:hover{background:#fafbfc}
.prize-row.prize-best{background:linear-gradient(90deg,#fef3c7,#fffbeb);border-left:3px solid #f59e0b}
.prize-name{text-align:left}
.prize-bar-track{height:14px;background:#eef1f5;border-radius:7px;overflow:hidden}
.prize-bar{height:100%;border-radius:7px;transition:width .4s ease}
.prize-cnt{font-size:12px;color:var(--sub);text-align:right}
/* ===== 福彩3D ===== */
.section-label{font-size:15px;font-weight:700;color:var(--text);margin:22px 2px 12px;padding-left:10px;border-left:4px solid var(--blue)}
.section-label span{font-size:12px;font-weight:500;color:var(--sub);margin-left:8px}
.teal-icon{background:#ecfeff}.amber-icon{background:#fffbeb}
.ball.amber{background:#d97706}
.ticket-balls .ball.amber{font-size:15px;width:32px;height:32px}

@media(max-width:900px){
  header{flex-wrap:wrap;gap:10px 12px}
  header > div{min-width:0;flex:1}
  .logo{height:38px;font-size:15px;padding:0 11px;border-radius:10px}
  .logo-square{width:38px!important}
  .topnav{margin-left:0;width:100%;flex-wrap:wrap}
  .entry-grid{grid-template-columns:1fr}
  .verify-grid{grid-template-columns:1fr}
  .mode-switch{margin-top:6px}
  .cards{grid-template-columns:repeat(2,1fr)}
  .grid2{grid-template-columns:1fr}
  .meta{margin-left:0;text-align:left;width:100%}
  .pick-meta{margin-left:0;width:100%}
}
@media(max-width:560px){
  body{padding:18px 12px 40px}
  .wrap{max-width:100%}
  header{gap:8px}
  h1{font-size:18px}
  .subtitle{font-size:11px}
  .logo{height:34px;font-size:13px;padding:0 9px;border-radius:9px;letter-spacing:.5px}
  .logo-square{width:34px!important}
  .nav-link{padding:6px 10px;font-size:12px}
}
