:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1f2733;
  --muted: #6b7686;
  --line: #e6eaf2;
  --brand: #c8102e;       /* 体彩红 */
  --brand2: #1457a3;      /* 蓝 */
  --hot: #e4572e;
  --warm: #e8b339;
  --cold: #2e86de;
  --ok: #1f9d6b;
  --shadow: 0 2px 12px rgba(31,39,51,.06);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }
header.top {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 14px 18px; background: linear-gradient(120deg, #c8102e, #9c0c24);
  color: #fff; border-radius: 14px; box-shadow: var(--shadow);
}
header.top h1 { font-size: 20px; margin: 0; letter-spacing: 1px; }
header.top .sub { font-size: 12px; opacity: .9; }
.tabs { display: flex; gap: 8px; margin: 16px 0; }
.tab {
  padding: 9px 18px; border-radius: 10px; cursor: pointer; font-weight: 600;
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.disclaimer {
  background: #fff7e6; border: 1px solid #ffe1a8; color: #8a5a00;
  padding: 10px 14px; border-radius: 10px; font-size: 12.5px; margin-bottom: 16px;
}
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); }
.card .k { color: var(--muted); font-size: 12px; }
.card .v { font-size: 22px; font-weight: 700; margin-top: 4px; }
.latest { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.balls { display: flex; gap: 8px; flex-wrap: wrap; }
.ball {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: var(--brand2); font-size: 16px;
}
.ball.front { background: var(--brand2); }
.ball.back { background: var(--brand); }
.ball.d3 { background: #333a48; width: 36px; height: 36px; }
.section-title { font-size: 15px; font-weight: 700; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 4px; height: 16px; background: var(--brand); border-radius: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; }
th { background: #fafbfe; color: var(--muted); font-weight: 600; }
tr:hover td { background: #f7f9ff; }
.numgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.numcell {
  border-radius: 8px; padding: 6px 4px; text-align: center; border: 1px solid var(--line); background: #fff;
}
.numcell .n { font-weight: 700; font-size: 15px; }
.numcell .o { font-size: 11px; color: var(--muted); }
.numcell.hot { background: #fdeee9; border-color: #f3c4b6; }
.numcell.warm { background: #fdf6e3; border-color: #ecd9a0; }
.numcell.cold { background: #e9f2fc; border-color: #bcd8f3; }
.chart { width: 100%; height: 280px; }
.chart-cap { font-size: 12px; line-height: 1.55; margin-top: 10px; color: var(--muted); }

/* 门店同款走势图 */
.store-scroll { position: relative; overflow: auto; max-height: 72vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.store-fit { position: relative; }
.store-fs { position: fixed; inset: 0; background: var(--bg); z-index: 999; display: none; height: 100vh; height: 100dvh; }
.store-fs-scroll { position: absolute; inset: 0; overflow: hidden; -webkit-overflow-scrolling: touch; }
.store-fs-exit {
  position: fixed; top: 12px; right: 12px; z-index: 1001;
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.34); color: #fff; font-size: 18px; line-height: 42px; text-align: center;
  cursor: pointer; opacity: 1; transition: opacity .4s ease; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.store-fs-hint {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1001;
  background: rgba(0,0,0,0.44); color: #fff; font-size: 12px; padding: 6px 14px; border-radius: 16px;
  opacity: 1; transition: opacity .4s ease; pointer-events: none; white-space: nowrap;
}
.store-fs.fs-controls-hidden .store-fs-exit,
.store-fs.fs-controls-hidden .store-fs-hint,
.store-fs.fs-controls-hidden .store-fs-game { opacity: 0; pointer-events: none; }
.store-fs-game { position: fixed; top: 12px; left: 12px; z-index: 1001; display: flex; gap: 6px; transition: opacity .4s ease; }
.store-fs-game button { border: none; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; background: rgba(0,0,0,0.34); color: #fff; cursor: pointer; }
.store-fs-game button.active { background: var(--brand); color: #fff; }
.store-table { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.store-table th, .store-table td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; padding: 0; height: 28px; }
.store-table thead th { position: sticky; top: 0; z-index: 3; background: #fafbfe; }
.store-table thead .num-h { background: #fafbfe; }
.store-table .num-h { width: 30px; color: var(--muted); font-weight: 600; }
.store-table .num-cell { width: 30px; }
.store-table .sticky-left { position: sticky; left: 0; z-index: 2; background: #fff; }
.store-table thead .sticky-left { z-index: 4; background: #fafbfe; }
.store-table .ballmark { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 12px; }
.store-table .omit { color: var(--muted); font-size: 11px; }
.store-table .period { font-weight: 600; padding: 0 8px; white-space: nowrap; }
.store-table .draw { padding: 0 6px; white-space: nowrap; }
.store-table .sb { display: inline-block; min-width: 16px; text-align: center; font-weight: 600; }
.store-table .sb.front { color: var(--brand2); }
.store-table .sb.back { color: var(--brand); }
.store-table .sb.sep { color: var(--muted); margin: 0 2px; }
.store-table .sb.hl { background: var(--warm); border-radius: 4px; padding: 0 2px; }
.store-table .sum { color: var(--ink); font-size: 11px; font-weight: 600; }
.store-canvas { position: absolute; top: 0; left: 0; pointer-events: none; }
.mini { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; cursor: pointer; }
.mini.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.store-head { margin-bottom: 4px; }
.store-title { font-weight: 700; font-size: 15px; }
.store-legend { font-size: 12px; color: var(--muted); margin-top: 2px; }
.store-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.store-table .group { font-weight: 700; }
.store-table .group.red { color: #d62839; }
.store-table .group.blue { color: #1e6ee0; }
.store-table .group.green { color: #1f9d6b; }
.store-table .group.stats { color: var(--muted); }
.store-table thead tr:nth-child(1) th { top: 0; }
.store-table thead tr:nth-child(2) th { top: 28px; }
.store-table .num-h { min-width: 26px; }
.store-table .edge { border-right: 2px solid #d4dae6; }
.store-table .statc { min-width: 42px; padding: 0 6px; font-weight: 600; white-space: nowrap; }
.store-table .ballmark.blue { background: #1e6ee0; }
.store-table .ballmark.green { background: #1f9d6b; }
.row2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px){ .row2 { grid-template-columns: 1fr; } .card .v{font-size:18px;} }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
select, input, button {
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13px;
}
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); cursor: pointer; font-weight: 600; }
button.primary:hover { filter: brightness(1.05); }
.sel-result { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ticket { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow); }
.ticket .tag { font-size: 11px; color: var(--muted); }
.ticket .nums { font-size: 18px; font-weight: 700; letter-spacing: 2px; margin-top: 4px; }
.foot { color: var(--muted); font-size: 12px; margin-top: 30px; text-align: center; line-height: 1.8; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 12px; }
.muted { color: var(--muted); }
.bignum { font-size: 15px; font-weight: 700; }

/* AI智选 · 每日一注 */
.aismart-card { border: 1px solid #ffd9c2; background: linear-gradient(180deg, #fff8f3, #ffffff); }
.aismart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.aismart-game { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.aismart-game-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 15px; }
.aismart-date { font-size: 12px; color: var(--muted); font-weight: 600; }
.aismart-today-nums { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }
.aismart-today-nums .ball { width: 42px; height: 42px; font-size: 17px; }
.aismart-badge-row { margin: 4px 0 8px; }
.aismart-badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.aismart-badge.win { background: #e6f7ef; color: var(--ok); border: 1px solid #b6e3cd; }
.aismart-badge.miss { background: #fdeaea; color: #c0392b; border: 1px solid #f3c4c4; }
.aismart-badge.pending { background: #eef2fb; color: var(--brand2); border: 1px solid #cdd9f3; }
.aismart-badge.nodraw { background: #f1f3f6; color: var(--muted); border: 1px solid var(--line); }
.aismart-reason { font-size: 12.5px; line-height: 1.65; color: var(--ink); background: #fafbfe; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.aismart-hist { margin-top: 10px; font-size: 13px; }
.aismart-hist summary { cursor: pointer; color: var(--brand2); font-weight: 600; padding: 4px 0; }
.aismart-hist table th, .aismart-hist table td { padding: 6px 8px; }
@media (max-width: 760px){ .aismart-grid { grid-template-columns: 1fr; } }
