:root {
  --bg: #080a10;
  --bg-2: #0d1119;
  --panel: rgba(19, 24, 35, 0.72);
  --panel-solid: #131823;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --txt: #e9eef8;
  --txt-2: #a8b4c9;
  --txt-3: #6b788e;
  --red: #e03e46;
  --red-lt: #ff7a72;
  --blue: #3574d6;
  --blue-lt: #7fb2ff;
  --gold: #f0b74a;
  --ok: #3ecf8e;
  --radius: 18px;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.46);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(224, 62, 70, 0.14), transparent 62%),
    radial-gradient(900px 620px at 88% 0%, rgba(53, 116, 214, 0.14), transparent 60%),
    linear-gradient(180deg, #080a10 0%, #0a0e15 40%, #070910 100%);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.glow {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  z-index: 0;
}
.glow-a { width: 420px; height: 420px; top: -160px; left: -120px; background: rgba(224, 62, 70, 0.22); }
.glow-b { width: 460px; height: 460px; top: -200px; right: -140px; background: rgba(53, 116, 214, 0.2); }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  z-index: 1;
  padding: 46px 28px 26px;
  max-width: 1240px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--txt-2);
  font-size: 12.5px;
  letter-spacing: 0.2px;
  backdrop-filter: blur(6px);
  margin-bottom: 18px;
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.16);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, #ff8f5f 0%, #e8455c 42%, #6f9dfb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero h1 .sep { color: var(--txt-3); font-weight: 300; margin: 0 6px; }

.hero .sub {
  margin: 0;
  color: var(--txt-2);
  font-size: 14.5px;
  max-width: 660px;
}

/* ---------------- layout ---------------- */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 28px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 404px;
  gap: 20px;
  align-items: start;
}

.col-side {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------------- panel ---------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  margin-bottom: 20px;
}
.col-main .panel:last-child { margin-bottom: 0; }

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.1px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.idx {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  color: var(--txt-3);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 2px 6px;
  letter-spacing: 0.5px;
}
.hint { color: var(--txt-3); font-size: 12.5px; white-space: nowrap; }

.is-hidden { display: none !important; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  padding: 13px 24px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  color: #fff;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn .btn-ico { font-size: 15px; opacity: 0.92; }

.btn-primary {
  background: linear-gradient(135deg, #d8373f 0%, #b9202c 100%);
  box-shadow: 0 10px 24px rgba(200, 40, 50, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1.5px); filter: brightness(1.06); }

.btn-predict {
  width: 100%;
  padding: 15px 20px;
  font-size: 15.5px;
  background: linear-gradient(120deg, #e0454d 0%, #c2242f 38%, #2f6cc9 100%);
  box-shadow: 0 12px 30px rgba(180, 40, 60, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  margin-bottom: 12px;
}
.btn-predict:hover:not(:disabled) { transform: translateY(-1.5px); filter: brightness(1.07); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; }
.btn.is-busy { pointer-events: none; opacity: 0.8; }

.spin {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- load bar ---------------- */
.load-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--txt-2);
  font-size: 13px;
  min-height: 22px;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--txt-3);
  flex: none;
}
.status-dot.idle { background: #4a5567; }
.status-dot.loading { background: var(--gold); animation: pulse 1.1s ease-in-out infinite; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.14); }
.status-dot.warn { background: var(--gold); }
.status-dot.err { background: var(--red); }
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ---------------- meta ---------------- */
.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.meta-grid:empty { display: none; }

.meta-cell {
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.meta-cell .k {
  font-size: 11.5px;
  color: var(--txt-3);
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 4px;
}
.meta-cell .v {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.meta-cell .v small { font-size: 11.5px; font-weight: 500; color: var(--txt-3); margin-left: 3px; }
.meta-cell.hl .v { color: var(--gold); }

/* ---------------- balls ---------------- */
.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #fff;
  position: relative;
  letter-spacing: -0.3px;
  flex: none;
  user-select: none;
}
.ball::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.04) 38%, transparent 62%);
  pointer-events: none;
}
.ball.red {
  width: 46px; height: 46px;
  font-size: 18px;
  background: radial-gradient(circle at 33% 26%, #ff8b7e 0%, #e23c45 44%, #96131d 100%);
  box-shadow: inset 0 -3px 9px rgba(0, 0, 0, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.22),
    0 7px 16px rgba(200, 34, 46, 0.3);
}
.ball.blue {
  width: 46px; height: 46px;
  font-size: 18px;
  background: radial-gradient(circle at 33% 26%, #8fbaff 0%, #3574d6 44%, #163d7d 100%);
  box-shadow: inset 0 -3px 9px rgba(0, 0, 0, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.22),
    0 7px 16px rgba(38, 84, 170, 0.32);
}
.ball.sm { width: 27px; height: 27px; font-size: 12px; }
.ball.xs { width: 23px; height: 23px; font-size: 11px; }

/* ---------------- latest ---------------- */
.latest-body {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.latest-balls { display: flex; align-items: center; gap: 9px; }
.latest-balls .plus {
  color: var(--txt-3);
  font-size: 17px;
  font-weight: 300;
  margin: 0 3px;
}
.latest-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 26px;
  flex: 1;
  min-width: 220px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.latest-side:empty { display: none; }
.ls-item .k { display: block; font-size: 11.5px; color: var(--txt-3); margin-bottom: 2px; }
.ls-item .v { font-size: 14.5px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------- tabs ---------------- */
.stat-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 18px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--txt-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.tab:hover { color: var(--txt); }
.tab.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--txt);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.tab-pane { display: none; }
.tab-pane.is-active { display: block; animation: fadeIn 0.26s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.chart-title {
  font-size: 12.5px;
  color: var(--txt-2);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chart-title.mt { margin-top: 26px; }
.legend { font-size: 11.5px; color: var(--txt-3); display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 2px; }
.lg.hot { background: var(--red); }
.lg.cold { background: #3f4a5e; }

/* ---------------- freq chart ---------------- */
.freq-chart {
  display: grid;
  grid-template-columns: repeat(33, minmax(0, 1fr));
  gap: 3px;
  align-items: end;
  height: 132px;
  padding-top: 6px;
}
.freq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 5px;
  cursor: default;
}
.freq-bar {
  width: 100%;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(180deg, #e6474f 0%, #8e1b25 100%);
  min-height: 3px;
  transition: filter 0.16s, transform 0.16s;
  transform-origin: bottom;
}
.freq-col.is-cold .freq-bar { background: linear-gradient(180deg, #46536b 0%, #2b3444 100%); }
.freq-col:hover .freq-bar { filter: brightness(1.28); transform: scaleY(1.04); }
.freq-lbl {
  font-size: 9.5px;
  color: var(--txt-3);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ---------------- blue grid ---------------- */
.blue-grid {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 5px;
}
.blue-cell {
  border-radius: 9px;
  padding: 8px 2px 7px;
  text-align: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.blue-cell .n {
  display: block;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--blue-lt);
  line-height: 1.2;
}
.blue-cell .c {
  display: block;
  font-size: 10.5px;
  color: var(--txt-3);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

/* ---------------- metric cards ---------------- */
.metric-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.mcard {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, 0.026);
}
.mcard .k { font-size: 11.5px; color: var(--txt-3); margin-bottom: 6px; display: block; }
.mcard .v { font-size: 19px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.4px; }
.mcard .s { font-size: 11.5px; color: var(--txt-2); margin-top: 4px; display: block; }

/* ---------------- svg chart ---------------- */
.svg-wrap { width: 100%; }
.svg-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------------- table ---------------- */
.table-wrap {
  max-height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 13px;
  scrollbar-width: thin;
  scrollbar-color: #333d4f transparent;
}
.table-wrap::-webkit-scrollbar { width: 9px; height: 9px; }
.table-wrap::-webkit-scrollbar-thumb { background: #2f3949; border-radius: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }

.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.hist-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #171d29;
  color: var(--txt-3);
  font-weight: 600;
  font-size: 11.5px;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.hist-table th.num, .hist-table td.num { text-align: right; }
.hist-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: var(--txt-2);
  white-space: nowrap;
}
.hist-table tbody tr:last-child td { border-bottom: 0; }
.hist-table tbody tr:hover td { background: rgba(255, 255, 255, 0.028); }
.hist-table .issue { color: var(--txt); font-weight: 650; }
.hist-table .balls-cell { display: flex; gap: 5px; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.pill.r { background: linear-gradient(160deg, #d63b43, #96131d); }
.pill.b { background: linear-gradient(160deg, #3574d6, #1a4489); }

/* ---------------- predict ---------------- */
.panel-predict { margin-bottom: 0; }

.predict-hint {
  font-size: 12.5px;
  color: var(--txt-3);
  text-align: center;
  padding: 6px 0 2px;
}
.predict-hint.is-hidden { display: none; }

.predict-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.predict-result:not(:empty) { margin-top: 4px; }

.pcard {
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  padding: 16px 16px 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.014) 100%);
  position: relative;
  overflow: hidden;
  animation: cardIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.pcard:nth-child(2) { animation-delay: 0.08s; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.pcard::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #e0454d, #2f6cc9);
  opacity: 0.85;
}
.pcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.pcard-name { font-size: 13px; font-weight: 700; color: var(--txt-2); letter-spacing: 0.4px; }
.pcard-tag {
  font-size: 11px;
  font-weight: 650;
  color: var(--gold);
  background: rgba(240, 183, 74, 0.12);
  border: 1px solid rgba(240, 183, 74, 0.26);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.pcard-balls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  flex-wrap: nowrap;
}
.pcard-balls .ball { width: 37px; height: 37px; font-size: 15px; }
.pcard-balls .plus { color: var(--txt-3); margin: 0 1px; font-size: 14px; }

.pcard-reason {
  font-size: 11.5px;
  color: var(--txt-2);
  line-height: 1.75;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
  padding-top: 10px;
}
.pcard-reason .rf { color: var(--txt-3); }
.pcard-reason b { color: #fff; font-weight: 650; }

.rolling .ball { animation: pop 0.36s ease infinite alternate; }
@keyframes pop {
  from { transform: translateY(0) scale(1); }
  to { transform: translateY(-3px) scale(1.045); }
}

/* ---------------- adv (选号条件) ---------------- */
.adv {
  border: 1px solid var(--line);
  border-radius: 13px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.022);
  overflow: hidden;
}
.adv-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: var(--txt-2);
  font-family: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.adv-toggle:hover { background: rgba(255, 255, 255, 0.035); color: var(--txt); }
.adv-arrow {
  font-size: 10px;
  color: var(--txt-3);
  transition: transform 0.2s ease;
  display: inline-block;
}
.adv.is-open .adv-arrow { transform: rotate(90deg); }
.adv-title { font-weight: 650; white-space: nowrap; }
.adv-summary {
  margin-left: auto;
  color: var(--txt-3);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adv-body {
  display: none;
  padding: 14px 14px 15px;
  border-top: 1px solid var(--line);
}
.adv.is-open .adv-body { display: block; animation: fadeIn 0.2s ease; }

.adv-row { margin-bottom: 15px; }
.adv-row:last-of-type { margin-bottom: 10px; }
.adv-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.adv-label { font-size: 11.5px; color: var(--txt-2); letter-spacing: 0.2px; }
.adv-tip { font-size: 11px; color: var(--txt-3); font-variant-numeric: tabular-nums; }

.sum-inputs { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.sum-inputs input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--txt);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  padding: 8px 10px;
  text-align: center;
  outline: none;
  transition: border-color 0.16s, background 0.16s;
}
.sum-inputs input:focus { border-color: rgba(240, 183, 74, 0.5); background: rgba(240, 183, 74, 0.06); }
.sum-inputs .dash { color: var(--txt-3); font-size: 12px; flex: none; }

.presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.presets button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.028);
  color: var(--txt-2);
  font-family: inherit;
  font-size: 11px;
  padding: 5px 4px;
  border-radius: 7px;
  cursor: pointer;
  transition: 0.16s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.presets button:hover { color: #fff; border-color: var(--line-strong); }
.presets button.is-on {
  color: var(--gold);
  border-color: rgba(240, 183, 74, 0.42);
  background: rgba(240, 183, 74, 0.1);
}

.pick-grid { display: grid; gap: 5px; }
.pick-grid.red { grid-template-columns: repeat(11, minmax(0, 1fr)); }
.pick-grid.blue { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.pick {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--txt-2);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  border-radius: 7px;
  padding: 5px 0;
  cursor: pointer;
  transition: 0.15s;
  line-height: 1.4;
}
.pick:hover:not(:disabled) { border-color: var(--line-strong); color: #fff; transform: translateY(-1px); }
.pick-grid.red .pick.is-on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(160deg, #d63b43, #96131d);
  box-shadow: 0 4px 11px rgba(200, 40, 50, 0.3);
}
.pick-grid.blue .pick.is-on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(160deg, #3574d6, #1a4489);
  box-shadow: 0 4px 11px rgba(38, 84, 170, 0.32);
}
.pick:disabled { opacity: 0.28; cursor: not-allowed; }

.adv-note {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--txt-3);
  min-height: 15px;
}
.adv-note.is-warn { color: var(--gold); }

/* ---------------- ghost button ---------------- */
.btn-ghost {
  width: 100%;
  margin-top: 12px;
  padding: 12px 18px;
  font-size: 13.5px;
  color: var(--txt-2);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }

/* ---------------- note ---------------- */
.panel-note {
  background: rgba(240, 183, 74, 0.045);
  border-color: rgba(240, 183, 74, 0.16);
}
.panel-note h3 {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.3px;
}
.panel-note p {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--txt-2);
}
.panel-note p:last-child { margin-bottom: 0; }
.panel-note b { color: var(--txt); font-weight: 650; }

/* ---------------- footer ---------------- */
.foot {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px 40px;
  color: var(--txt-3);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.foot a { color: var(--txt-2); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.15); }
.foot a:hover { color: #fff; }
.dot-sep { opacity: 0.5; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 8px 20px 32px; }
  .col-side { position: static; }
  .hero { padding: 36px 20px 20px; }
  .foot { padding: 0 20px 34px; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .panel { padding: 18px 16px 20px; border-radius: 15px; }
  .meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .meta-cell { padding: 10px 12px; }
  .meta-cell .v { font-size: 15px; }
  .latest-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
  .hero { padding: 28px 16px 16px; }
  .layout { padding: 6px 14px 28px; gap: 16px; }
  .foot { padding: 0 16px 30px; }
  .btn { width: 100%; }
  .load-bar { gap: 12px; }
  .status { width: 100%; }
  .freq-chart { grid-template-columns: repeat(17, minmax(0, 1fr)); gap: 3px; height: auto; }
  .freq-col { gap: 3px; }
  .blue-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .latest-body { gap: 16px; }
  .latest-side { border-left: 0; padding-left: 0; }
  .latest-balls { gap: 7px; }
  .ball.red, .ball.blue { width: 36px; height: 36px; font-size: 14.5px; }
  .pcard-balls .ball { width: 33px; height: 33px; font-size: 13.5px; }
  .pcard-balls { gap: 5px; }
  .hist-table thead th, .hist-table tbody td { padding: 8px 9px; }
  .hist-table th:nth-child(2), .hist-table td:nth-child(2),
  .hist-table th:nth-child(5), .hist-table td:nth-child(5),
  .hist-table th:nth-child(6), .hist-table td:nth-child(6) { display: none; }
  .hist-table .balls-cell { gap: 4px; }
  .pill { min-width: 21px; height: 21px; font-size: 11px; }
  .pick-grid.red { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .pick { padding: 6px 0; font-size: 12px; }
  .stat-tabs { width: 100%; justify-content: space-between; }
  .tab { flex: 1; text-align: center; padding: 7px 4px; font-size: 12.5px; }
}

/* ================= 打印选号卡 ================= */
#print-area { display: none; }

#print-area .pc-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #12161d;
  margin-bottom: 30px;
}
#print-area .pc-brand { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; color: #12161d; }
#print-area .pc-brand small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: #77808f;
  letter-spacing: 0.2px;
  margin-top: 5px;
}
#print-area .pc-issue { text-align: right; line-height: 1.35; }
#print-area .pc-issue .k { display: block; font-size: 10px; color: #77808f; letter-spacing: 0.5px; }
#print-area .pc-issue .v {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #12161d;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
#print-area .pc-issue .d { display: block; font-size: 10.5px; color: #5c6675; }

#print-area .pc-group {
  border: 1px solid #d9dee7;
  border-radius: 12px;
  padding: 20px 22px 18px;
  margin-bottom: 20px;
  page-break-inside: avoid;
}
#print-area .pc-group-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}
#print-area .pc-name { font-size: 14px; font-weight: 750; color: #12161d; letter-spacing: 0.5px; }
#print-area .pc-tag {
  font-size: 10.5px;
  font-weight: 650;
  color: #8a6415;
  border: 1px solid #e0c789;
  background: #fdf6e4;
  border-radius: 999px;
  padding: 2px 10px;
}
#print-area .pc-balls { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
#print-area .pc-balls .ball {
  width: 50px;
  height: 50px;
  font-size: 19px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
#print-area .pc-balls .plus { color: #98a1b0; font-size: 15px; margin: 0 2px; }
#print-area .pc-meta {
  font-size: 12px;
  color: #3d4655;
  font-variant-numeric: tabular-nums;
  padding-top: 13px;
  border-top: 1px dashed #e3e7ee;
}
#print-area .pc-meta b { color: #12161d; font-weight: 700; }
#print-area .pc-meta .rf { color: #8b94a3; }

#print-area .pc-basis {
  border: 1px solid #e3e7ee;
  border-radius: 12px;
  padding: 18px 22px 19px;
  background: #fafbfd;
  margin-bottom: 22px;
  page-break-inside: avoid;
}
#print-area .pc-basis h4 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  color: #12161d;
  letter-spacing: 1px;
}
#print-area .pc-basis ul {
  margin: 0;
  padding-left: 16px;
  columns: 2;
  column-gap: 26px;
}
#print-area .pc-basis li {
  font-size: 11px;
  color: #46505f;
  line-height: 2.15;
  break-inside: avoid;
}
#print-area .pc-basis b { color: #12161d; font-variant-numeric: tabular-nums; }

#print-area .pc-foot {
  border-top: 1px solid #dfe4ec;
  padding-top: 13px;
  font-size: 10px;
  line-height: 1.9;
  color: #7a8494;
}
#print-area .pc-foot .line1 { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 4px; }

@media print {
  @page { size: A4 portrait; margin: 14mm 13mm; }

  html, body {
    background: #fff !important;
    min-height: 0 !important;
    font-size: 12px;
  }
  body > *:not(#print-area) { display: none !important; }

  #print-area {
    display: block !important;
    background: #fff;
    color: #12161d;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
