/*!
 * 数据观察随笔 · SSQ Number Studio（站点样式）
 * Copyright (c) 2026 梁琦（manning-l）. 保留所有权利。
 *
 * 本文件为专有软件，仅授权在 ssqchoice.site / cnssqml.qd.je 站内使用。
 * 未经著作权人书面许可，禁止复制、修改、再分发、公开传播或用于衍生作品；
 * 删除或篡改本声明即构成故意侵权，将依法追究责任。
 */
:root {
  --ink: #25221e;
  --muted: #80796f;
  --paper: #f6f1e9;
  --card: rgba(255, 253, 249, .8);
  --line: #e6ddd2;
  --red: #d64b47;
  --red-deep: #a62f35;
  --blue: #326f9f;
  --gold: #be8a3a;
  --shadow: 0 22px 60px rgba(77, 52, 30, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: radial-gradient(circle at 10% 0%, #fffaf2 0, var(--paper) 38%, #f0e9df 100%); color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 54px 0 30px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.eyebrow, .section-index { color: var(--gold); letter-spacing: .16em; font-size: 11px; font-weight: 800; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 8px 0 8px; font-family: Georgia, "Songti SC", serif; font-size: clamp(32px, 5vw, 58px); line-height: 1; font-weight: 500; letter-spacing: -.045em; }
h2 { display: inline-block; margin: 7px 0 0 12px; font-family: Georgia, "Songti SC", serif; font-size: 24px; font-weight: 500; }
.subtitle { margin: 0; color: var(--muted); font-size: 14px; }
.header-badge { border: 1px solid var(--line); padding: 10px 14px; border-radius: 999px; color: #6b6359; font-size: 12px; white-space: nowrap; background: rgba(255, 255, 255, .45); }
.pulse { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #62a76a; box-shadow: 0 0 0 4px rgba(98, 167, 106, .14); }
.layout { display: grid; grid-template-columns: minmax(320px, .83fr) minmax(450px, 1.17fr); gap: 20px; align-items: start; }
.card, .result-panel { border: 1px solid rgba(220, 208, 194, .8); border-radius: 24px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.control-panel { grid-row: span 2; padding: 26px; }
.result-panel { min-height: 655px; padding: 26px; }
.history-panel { padding: 24px 26px; }
.method-panel { padding: 24px 26px; }
/* 观测模块含点阵/图表，需要整幅宽度：在窄栏里会被挤变形，故跨满两栏独占一行 */
.viz-panel { grid-column: 1 / -1; padding: 24px 26px; }
.section-heading, .result-header, .label-row, .quantity-row, .history-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading > div, .result-header > div:first-child { display: flex; align-items: flex-start; }
.text-button { border: 0; padding: 5px 0; background: transparent; color: var(--muted); font-size: 12px; }
.text-button:hover { color: var(--ink); }
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 26px 0 7px; padding: 4px; background: #eee7dd; border-radius: 12px; }
.mode-tab { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--muted); font-size: 13px; }
.mode-tab.active { background: #fffdf9; box-shadow: 0 3px 12px rgba(75, 52, 29, .08); color: var(--ink); font-weight: 700; }
.hint, .panel-copy, .privacy-note, .quantity-row p, .method-grid p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.hint { min-height: 20px; margin-bottom: 20px; }
.ball-group { margin-top: 18px; }
.label-row label, .quantity-row label { font-size: 13px; font-weight: 750; }
.label-row label span { margin-left: 6px; color: var(--muted); font-weight: 500; font-size: 11px; }
.count-pill, .status-chip { padding: 4px 8px; border-radius: 999px; background: #f4e3dd; color: var(--red-deep); font-size: 11px; }
.blue-count { background: #e1edf4; color: var(--blue); }
.ball-grid { display: grid; gap: 7px; margin-top: 11px; }
.red-grid { grid-template-columns: repeat(11, 1fr); }
.blue-grid { grid-template-columns: repeat(8, 1fr); }
.ball-select { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 253, 249, .9); color: #756d64; font-size: 11px; transition: transform .16s ease, background .16s ease, color .16s ease, border .16s ease; }
.ball-select:hover { transform: translateY(-2px); border-color: var(--red); }
.red-grid .ball-select.selected { border-color: var(--red); background: var(--red); color: white; box-shadow: 0 5px 12px rgba(214, 75, 71, .24); }
.blue-grid .ball-select.selected { border-color: var(--blue); background: var(--blue); color: white; box-shadow: 0 5px 12px rgba(50, 111, 159, .24); }
.quantity-row { margin: 26px 0 20px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quantity-row p { margin: 4px 0 0; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fffdf9; }
.stepper button { width: 31px; height: 33px; border: 0; background: transparent; color: var(--ink); }
.stepper input { width: 44px; height: 33px; border: 0; border-right: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; outline: 0; background: transparent; color: var(--ink); }
.rule-box { padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(250, 246, 240, .72); }
.mini-note { color: var(--gold); font-size: 10px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(230, 221, 210, .7); }
.switch-row:first-of-type { margin-top: 8px; }
.switch-row b, .switch-row small { display: block; }
.switch-row b { font-size: 12px; font-weight: 700; }
.switch-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { position: relative; flex: 0 0 auto; width: 35px; height: 20px; border-radius: 20px; background: #d3cbc1; transition: background .2s; }
.switch-row i:after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.16); }
.switch-row input:checked + i { background: var(--red); }
.switch-row input:checked + i:after { transform: translateX(15px); }
.primary-button, .secondary-button, .small-button { border: 0; border-radius: 12px; font-weight: 750; transition: transform .15s, box-shadow .15s; }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 20px; padding: 14px 17px; background: var(--ink); color: white; box-shadow: 0 11px 22px rgba(37, 34, 30, .18); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 15px 27px rgba(37, 34, 30, .22); }
.button-arrow { font-size: 20px; font-weight: 400; }
.privacy-note { margin: 13px 0 0; text-align: center; font-size: 10px; }
.result-actions { display: flex; gap: 8px; }
.small-button { padding: 8px 11px; background: #eee7dd; color: #665e55; font-size: 11px; }
.small-button:not(:disabled):hover { background: #e1d5c8; }
.small-button:disabled { opacity: .45; cursor: not-allowed; }
.notice-area { min-height: 4px; }
.notice { margin: 18px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff2dd; color: #936c2f; font-size: 12px; line-height: 1.5; }
.notice.success { background: #e9f4e9; color: #4b8354; }
.stats-bar { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 13px; padding: 10px 12px; border-radius: 10px; background: #f1ebe3; color: #71675c; font-size: 11px; }
.stats-bar span:first-child { color: var(--ink); font-weight: 750; }
.empty-stats { justify-content: space-between; }
.recommend-area, .multiple-area { margin: 14px 0; padding: 14px; border: 1px solid #eaded0; border-radius: 14px; background: #fffaf3; }
.subheading, .expanded-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); font-weight: 750; font-size: 12px; }
.subheading small { color: var(--muted); font-weight: 400; font-size: 10px; }
.recommend-list, .expanded-list { display: grid; gap: 7px; margin-top: 10px; }
.recommend-list .ticket-row, .expanded-list .ticket-row { background: rgba(255, 255, 255, .72); }
.ticket-rank small { display: block; color: var(--muted); font-size: 9px; font-weight: 400; }
.multiple-pool { display: grid; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.multiple-pool b { display: block; margin-bottom: 6px; color: var(--ink); }
.multiple-pool strong { color: var(--gold); font-size: 12px; }
.pool-balls { display: flex; flex-wrap: wrap; gap: 5px; }
.pool-balls .ball { width: 24px; height: 24px; font-size: 9px; }
.expanded-title { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eaded0; }
.load-more { display: block; width: 100%; margin-top: 12px; }
.exclude-box { margin-top: 22px; padding: 16px; border: 1px solid #eaded0; border-radius: 14px; background: #fffaf3; }
.exclude-box > .hint { margin: 7px 0 12px; }
.exclude-group + .exclude-group { margin-top: 14px; }
.exclusion-grid { margin-top: 9px; }
.exclusion-select { background: #fffdf9; }
.exclusion-select.excluded { border-color: #6b6259; background: #6b6259; color: #fff; box-shadow: 0 4px 9px rgba(63, 55, 45, .18); }
.excluded-count { background: #eee7dd; color: #665e55; }
.blue-excluded-count { background: #e5edf4; color: #3f6f95; }
.recent-draw-area { margin: 14px 0; padding: 14px; border: 1px solid #dfe8ed; border-radius: 14px; background: #f8fbfd; }
.recent-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); font-weight: 750; font-size: 12px; }
.recent-heading small { color: var(--muted); font-weight: 400; font-size: 10px; }
.recent-draw-list { display: grid; gap: 7px; margin-top: 10px; }
.recent-draw-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .76); }
.recent-draw-meta { display: grid; gap: 2px; width: 108px; flex: 0 0 108px; color: var(--ink); font-size: 10px; }
.recent-draw-meta small { color: var(--muted); font-size: 9px; }
.recent-draw-row .ticket-balls { gap: 4px; }
.recent-draw-row .ball { width: 22px; height: 22px; font-size: 9px; }
.results-list { min-height: 490px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #ded2c4; border-radius: 16px; color: var(--muted); }
.empty-state h3 { margin: 20px 0 6px; color: var(--ink); font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.empty-state p { margin: 0; font-size: 12px; }
.empty-orbit { position: relative; width: 68px; height: 68px; border: 1px solid #dfd2c2; border-radius: 50%; }
.empty-orbit:before, .empty-orbit:after { content: ""; position: absolute; inset: 10px; border: 1px dashed #dfd2c2; border-radius: 50%; }
.empty-orbit span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.empty-orbit span:nth-child(1) { top: 8px; left: 28px; }.empty-orbit span:nth-child(2) { right: 5px; bottom: 18px; background: var(--blue); }.empty-orbit span:nth-child(3) { bottom: 6px; left: 17px; background: var(--gold); }
.ticket-list { display: grid; gap: 8px; }
.ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid #eee4d8; border-radius: 13px; background: rgba(255, 253, 249, .86); }
.ticket-number { width: 24px; color: #b3a89b; font-size: 11px; }
.ticket-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; flex: 1; }
.ball { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 50%; color: white; font-size: 10px; font-weight: 750; }
.red-ball { background: var(--red); }.blue-ball { background: var(--blue); }.plus { color: #b6aa9d; font-size: 12px; margin: 0 2px; }
.ticket-rank { width: 38px; color: var(--gold); font-size: 11px; text-align: right; }
.legend { display: flex; gap: 17px; margin-top: 13px; color: var(--muted); font-size: 10px; }.legend .ball { width: 14px; height: 14px; margin-right: 4px; vertical-align: -3px; }
.panel-copy { margin: 18px 0 12px; }.history-panel textarea { display: block; width: 100%; min-height: 90px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 11px; outline: 0; background: #fffdf9; color: var(--ink); font-size: 12px; line-height: 1.7; }.history-panel textarea:focus { border-color: var(--gold); }
.history-actions { margin-top: 10px; }.secondary-button { padding: 9px 13px; background: var(--ink); color: white; font-size: 11px; }.status-chip { background: #eee7dd; color: var(--muted); }.status-chip.ready { background: #e9f4e9; color: #4b8354; }
.inline-message { min-height: 18px; margin-top: 9px; color: var(--muted); font-size: 11px; }
.pref-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 12px; }
.pref-divider { color: #cbbfb1; font-size: 12px; }
.pref-box { margin-top: 12px; padding: 14px; border: 1px solid #eaded0; border-radius: 14px; background: #fffaf3; }
.pref-box textarea { display: block; width: 100%; min-height: 76px; margin-top: 9px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 11px; outline: 0; background: #fffdf9; color: var(--ink); font-size: 12px; line-height: 1.7; word-break: break-all; }
.pref-box textarea:focus { border-color: var(--gold); }
.pref-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.doc-main { margin-bottom: 10px; }
.doc-panel { padding: 30px 32px; }
.doc-section { margin-bottom: 22px; }
.doc-section h2 { margin: 0 0 9px; font-family: Georgia, "Songti SC", serif; font-size: 17px; font-weight: 600; }
.doc-section p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.95; }
.doc-section b { color: var(--ink); }
.doc-back { margin: 26px 0 0; }
.doc-back a { color: var(--gold); font-size: 13px; text-decoration: none; border-bottom: 1px solid rgba(190, 138, 58, .4); padding-bottom: 1px; }
.doc-back a:hover { border-bottom-color: var(--gold); }
/* 顶部账号入口 */
.header-side { display: grid; gap: 10px; justify-items: end; }
.account-chip {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .72);
  color: var(--ink); font-size: 12px; font-family: inherit;
  box-shadow: 0 4px 14px rgba(75, 52, 29, .07);
  transition: border-color .16s ease, background .16s ease, transform .1s ease;
}
.account-chip:hover { border-color: var(--gold); background: #fffdf9; }
.account-chip:active { transform: translateY(1px); }
.account-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: #c6bbad; box-shadow: 0 0 0 3px rgba(198, 187, 173, .22); }
.account-chip.ready .account-chip-dot { background: #4b8354; box-shadow: 0 0 0 3px rgba(75, 131, 84, .18); }
.account-chip-action { padding-left: 9px; border-left: 1px solid var(--line); color: var(--gold); font-weight: 700; }

/* 居中弹窗（登录 / 注册） */
.modal-overlay {
  position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(37, 34, 30, .44); backdrop-filter: blur(3px);
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  position: relative; width: min(432px, 100%); max-height: 88vh; overflow-y: auto;
  padding: 28px 28px 24px; border: 1px solid var(--line); border-radius: 24px;
  background: var(--card); box-shadow: 0 26px 64px rgba(37, 34, 30, .3);
}
.modal-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  font-size: 21px; line-height: 1; cursor: pointer; z-index: 2;
}
.modal-x:hover { background: #f3ede5; color: var(--ink); }
.modal-head { margin-bottom: 18px; }
.modal-head h2 { margin: 0 0 6px; font-family: Georgia, "Songti SC", serif; font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.modal-head p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.75; }
.modal-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.modal-actions .secondary-button { padding: 10px 18px; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 14px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(250, 246, 240, .8); }
.account-input-group { margin-top: 2px; }

/* ===== 历史数据观察（图表模块 v2） ===== */
/* ---- 条件模块：自定义统计期数（最低 100 期） ---- */
.viz-cond {
  margin-bottom: 16px; padding: 15px 16px 13px;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, #fffdf9, rgba(250, 246, 240, .74));
  box-shadow: 0 8px 20px rgba(75, 52, 29, .05);
}
.viz-cond-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 13px; }
.viz-cond-head b { font-size: 12.5px; }
.viz-cond-head small { color: var(--muted); font-size: 10.5px; }
.viz-field { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.viz-field-label { color: var(--muted); font-size: 11px; }
.viz-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fffdf9; overflow: hidden; }
.viz-stepper button {
  width: 34px; height: 38px; border: 0; background: transparent; color: var(--muted);
  font-family: inherit; font-size: 16px; line-height: 1; cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.viz-stepper button:hover { background: rgba(198, 169, 116, .16); color: var(--ink); }
.viz-stepper button:disabled { color: #cfc6ba; cursor: not-allowed; background: transparent; }
.viz-stepper input {
  width: 76px; height: 38px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line);
  background: transparent; color: var(--ink); font-family: inherit;
  font-size: 15px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; outline: 0;
}
.viz-stepper .unit { padding: 0 11px 0 8px; color: var(--muted); font-size: 11px; }
.viz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.viz-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  background: #fffdf9; color: var(--muted); font-family: inherit; font-size: 11px;
  cursor: pointer; transition: background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.viz-chip:hover { border-color: var(--gold); color: var(--ink); }
.viz-chip.active {
  border-color: transparent; background: linear-gradient(135deg, #b3955f, #8f7040);
  color: #fff; font-weight: 700; box-shadow: 0 5px 13px rgba(143, 112, 64, .28);
}
.viz-cond-foot {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 12px; padding-top: 11px;
  border-top: 1px dashed var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.7;
}
.viz-cond-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.viz-cond-foot .warn { color: #b4322c; }

/* ---- 页签 ---- */
.viz-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.viz-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: rgba(250, 246, 240, .8); }
.viz-tab {
  border: 0; border-radius: 10px; padding: 9px 15px; background: transparent;
  color: var(--muted); font-family: inherit; font-size: 12px; cursor: pointer;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.viz-tab:hover { color: var(--ink); }
.viz-tab.active { background: #fffdf9; box-shadow: 0 3px 12px rgba(75, 52, 29, .12); color: var(--ink); font-weight: 700; }

/* ---- 摘要统计 ---- */
.viz-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(134px, 1fr)); gap: 12px; margin-bottom: 16px; }
.viz-stat {
  position: relative; padding: 14px 15px 13px; border: 1px solid var(--line);
  border-radius: 16px; background: #fffdf9; overflow: hidden;
  box-shadow: 0 6px 16px rgba(75, 52, 29, .05);
}
.viz-stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); opacity: .9; }
.viz-stat.red::before { background: linear-gradient(180deg, #d3544a, #b4322c); }
.viz-stat.blue::before { background: linear-gradient(180deg, #4a83b4, #2f5f8f); }
.viz-stat b { display: block; font-size: 21px; line-height: 1.15; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.viz-stat b i { margin-left: 2px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; }
.viz-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 10.5px; }

/* ---- 图表卡片 ---- */
.viz-body { display: grid; gap: 14px; }
.viz-block {
  min-width: 0;                                      /* 关键：允许在网格项内收缩，否则宽点阵会把整页撑出横向滚动条 */
  padding: 16px 17px 15px; border: 1px solid var(--line); border-radius: 16px;
  background: #fffdf9; box-shadow: 0 6px 16px rgba(75, 52, 29, .05);
}
.viz-block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 13px; }
.viz-block-head b { font-size: 12.5px; }
.viz-block-head small { color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.viz-empty { padding: 30px 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.9; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; color: var(--muted); font-size: 10.5px; }
.viz-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%; vertical-align: -1px; }
.viz-legend i.sq { border-radius: 3px; }
.viz-legend i.line { width: 16px; height: 3px; border-radius: 2px; vertical-align: 3px; }
.viz-note { margin: 13px 0 0; padding-top: 11px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.8; }

/* ---- 号码点阵 ---- */
.mx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; margin-bottom: 10px; color: var(--muted); font-size: 10.5px; }
.mx-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.mx-scroll { overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; }
.mx-scroll::-webkit-scrollbar { height: 9px; }
.mx-scroll::-webkit-scrollbar-track { border-radius: 5px; background: rgba(240, 233, 224, .8); }
.mx-scroll::-webkit-scrollbar-thumb { border-radius: 5px; background: rgba(168, 135, 76, .32); }
.mx-grid { min-width: 100%; }
.mx-row { display: flex; align-items: center; height: 19px; background: #fffdf9; }
.mx-row:nth-child(even) { background: #fbf8f3; }
.mx-row.head { height: 20px; background: #fffdf9; }
.mx-row.head .mx-count, .mx-row.head .mx-gap { color: var(--muted); font-weight: 400; }
.mx-row.sect { height: 24px; background: #f6f1e9; }
.mx-row.sect .mx-label { flex: 0 0 auto; width: auto; padding-right: 14px; }
.mx-label.sect-label { color: var(--ink); font-size: 10.5px; font-weight: 700; }
.mx-label { position: sticky; left: 0; z-index: 2; display: flex; align-items: center; flex: 0 0 38px; width: 38px; height: 100%; background: inherit; }
.mx-label.right { left: auto; }
.mx-num {
  width: 26px; height: 15px; line-height: 15px; border-radius: 5px; color: #fff;
  text-align: center; font-size: 9.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mx-num.red { background: linear-gradient(135deg, #d3544a, #b4322c); }
.mx-num.blue { background: linear-gradient(135deg, #4a83b4, #2f5f8f); }
.mx-head-text { color: var(--muted); font-size: 9.5px; }
.mx-track {
  position: relative; flex: 0 0 auto; height: 19px;
  background-image: linear-gradient(to right, rgba(226, 216, 203, .5) 1px, transparent 1px);
  background-size: var(--mx-cell, 8px) 100%;
}
.mx-dot {
  position: absolute; top: 50%; width: var(--mx-dot, 5px); height: var(--mx-dot, 5px);
  border-radius: 50%; transform: translate(-50%, -50%);
}
.mx-dot.red { background: var(--red); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.mx-dot.blue { background: var(--blue); box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.mx-count {
  position: sticky; right: 62px; z-index: 2; flex: 0 0 52px; width: 52px; height: 100%;
  padding-left: 10px; background: inherit; text-align: right;
  font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.mx-gap {
  position: sticky; right: 0; z-index: 2; flex: 0 0 62px; width: 62px; height: 100%;
  padding-left: 10px; background: inherit; text-align: right; color: var(--muted);
  font-size: 10px; font-variant-numeric: tabular-nums;
}
.mx-gap.now { color: #b4322c; font-weight: 700; }
.mx-axis { display: flex; align-items: center; height: 20px; margin-top: 3px; }
.mx-axis .mx-label { background: transparent; }
.mx-axis .mx-head-text { padding-left: 2px; }
.mx-axis-track { position: relative; flex: 0 0 auto; height: 20px; border-top: 1px solid var(--line); }
.mx-axis-tick {
  position: absolute; top: 1px; padding-top: 4px; color: var(--muted);
  font-size: 9.5px; font-variant-numeric: tabular-nums; white-space: nowrap; transform: translateX(-50%);
}

.mx-axis-tick.last { color: var(--ink); font-weight: 700; }

/* ---- 象限分布 ---- */
.quad-wrap { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 10px; max-width: 780px; }
.quad-col { padding-bottom: 3px; color: var(--muted); font-size: 11px; text-align: center; }
.quad-row {
  display: flex; align-items: center; justify-content: center; border-radius: 12px;
  background: rgba(250, 246, 240, .82); color: var(--muted); font-size: 10.5px; line-height: 1.35; text-align: center;
}
.quad-cell {
  position: relative; padding: 15px 12px 13px; border: 1px solid var(--line);
  border-radius: 15px; text-align: center; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
}
.quad-cell:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(75, 52, 29, .1); }
.quad-cell::after { content: ''; position: absolute; left: 12px; right: 12px; top: 0; height: 3px; border-radius: 0 0 3px 3px; background: currentColor; opacity: .55; }
.quad-cell b { display: block; color: var(--ink); font-size: 21px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.quad-cell b i { margin-left: 1px; color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; }
.quad-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.quad-legend { margin-top: 14px; }

/* ---- 分布概率 ---- */
.rate-cols { display: grid; grid-template-columns: 1fr; gap: 20px; }
.rate-sub { margin-bottom: 9px; color: var(--ink); font-size: 11.5px; font-weight: 700; }
.rate-list { display: grid; gap: 6px; }
.rate-row { display: flex; align-items: center; gap: 9px; }
.rate-num {
  flex: 0 0 27px; width: 27px; height: 21px; line-height: 21px; border-radius: 7px;
  color: #fff; text-align: center; font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.rate-num.red { background: linear-gradient(135deg, #d3544a, #b4322c); }
.rate-num.blue { background: linear-gradient(135deg, #4a83b4, #2f5f8f); }
.rate-track { position: relative; flex: 1; min-width: 80px; height: 14px; border-radius: 7px; background: rgba(240, 233, 224, .92); }
.rate-bar { display: block; height: 100%; border-radius: 7px; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .3); }
.rate-bar.red { background: linear-gradient(90deg, #eab0a8, var(--red)); }
.rate-bar.blue { background: linear-gradient(90deg, #aec8de, var(--blue)); }
.rate-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--ink); opacity: .34; }
.rate-val { flex: 0 0 46px; width: 46px; text-align: right; font-size: 10.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rate-dev { flex: 0 0 44px; width: 44px; text-align: right; font-size: 10px; font-variant-numeric: tabular-nums; }
.rate-dev.up { color: #b4322c; }
.rate-dev.down { color: #3f6f95; }
.rate-dev.flat { color: var(--muted); }

/* ---- 结构统计：条形与走势 ---- */
.shape-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.shape-key { flex: 0 0 78px; width: 78px; color: var(--ink); font-size: 11px; font-variant-numeric: tabular-nums; }
.shape-track { flex: 1; min-width: 80px; height: 15px; border-radius: 8px; background: rgba(240, 233, 224, .92); overflow: hidden; }
.shape-bar { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #eddcc0, var(--gold)); }
.shape-bar.alt { background: linear-gradient(90deg, #cbd7e5, #6f8fb0); }
.shape-val { flex: 0 0 96px; width: 96px; text-align: right; color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.spark-wrap { position: relative; margin-top: 6px; padding: 12px 13px 11px; border: 1px solid var(--line); border-radius: 14px; background: rgba(250, 246, 240, .58); }
.spark { display: block; width: 100%; height: 78px; color: var(--gold); }
.spark-line { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { stroke: none; }
.spark-mean { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 4 4; opacity: .28; }
.spark-dot { fill: #fff; stroke: currentColor; stroke-width: 2; }
.spark-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-top: 9px; color: var(--muted); font-size: 10.5px; }
.spark-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }

@media (min-width: 1000px) {
  .rate-cols { grid-template-columns: 1fr 1fr; }
}
/* ===== 登录 / 注册页（站点前门） ===== */
.auth-body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(circle at 18% -8%, #fffcf6 0, #f7f2ea 38%, #ece2d5 100%);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.auth-shell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 34px 18px 26px; box-sizing: border-box;
}
.auth-card {
  width: min(432px, 100%); padding: 32px 32px 26px;
  border: 1px solid rgba(220, 208, 194, .9); border-radius: 26px;
  background: var(--card); box-shadow: 0 24px 60px rgba(75, 52, 29, .13);
  backdrop-filter: blur(10px);
}
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.auth-mark {
  width: 50px; height: 50px; flex: 0 0 50px; border-radius: 16px;
  background: linear-gradient(145deg, #3a342d, var(--ink));
  color: #f6eddf; display: flex; align-items: center; justify-content: center;
  font-family: Georgia, "Songti SC", serif; font-size: 23px;
  box-shadow: 0 10px 22px rgba(37, 34, 30, .22);
}
.auth-title { margin: 5px 0 0; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 500; letter-spacing: -.02em; }
.auth-lead { margin: 0 0 20px; color: var(--muted); font-size: 12.5px; line-height: 1.85; }
.auth-lead b { color: var(--gold); font-weight: 700; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(250, 246, 240, .82); }
.auth-tab { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--muted); font-family: inherit; font-size: 13px; transition: background .16s ease, color .16s ease, box-shadow .16s ease; }
.auth-tab.active { background: #fffdf9; box-shadow: 0 3px 12px rgba(75, 52, 29, .1); color: var(--ink); font-weight: 700; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; letter-spacing: .02em; }
.auth-input {
  display: block; width: 100%; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px;
  outline: 0; background: #fffdf9; color: var(--ink); font-family: inherit; font-size: 13.5px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(190, 138, 58, .13); }
.auth-input-code { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; }
.auth-submit {
  display: block; width: 100%; margin-top: 6px; padding: 13px 18px;
  border: 0; border-radius: 13px;
  background: linear-gradient(160deg, #37312a, var(--ink)); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 650; letter-spacing: .02em;
  box-shadow: 0 12px 24px rgba(37, 34, 30, .2);
  transition: transform .1s ease, box-shadow .16s ease, opacity .16s ease;
}
.auth-submit:hover { box-shadow: 0 14px 28px rgba(37, 34, 30, .26); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[disabled] { opacity: .6; cursor: not-allowed; }
.auth-message { min-height: 18px; margin-top: 12px; color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.auth-message.ok { color: #41734a; }
.auth-message.err { color: #a8372f; }
.auth-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.auth-foot a { color: var(--muted); text-decoration: none; border-bottom: 1px solid rgba(128, 121, 111, .35); padding-bottom: 1px; }
.auth-foot a:hover { color: var(--ink); }
.auth-dot { color: #cbbfb1; }
.auth-beian { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; font-size: 10.5px; }
.auth-beian a { display: inline-flex; align-items: center; color: #9e9387; text-decoration: none; border-bottom: 1px solid rgba(158, 147, 135, .4); padding-bottom: 1px; }
.auth-beian a:hover { color: #6b6259; }
.auth-beian img { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; border: 0; }
.auth-note { margin: 14px 0 0; color: #a89d90; font-size: 10px; text-align: center; }
@media (max-width: 460px) {
  .auth-card { padding: 26px 22px 22px; border-radius: 22px; }
  .auth-title { font-size: 22px; }
}
.account-tab { border: 0; border-radius: 9px; padding: 9px; background: transparent; color: var(--muted); font-size: 13px; }
.account-tab.active { background: #fffdf9; box-shadow: 0 3px 12px rgba(75, 52, 29, .08); color: var(--ink); font-weight: 700; }
.account-input { display: block; width: 100%; margin-bottom: 9px; border: 1px solid var(--line); border-radius: 12px; padding: 11px; outline: 0; background: #fffdf9; color: var(--ink); font-size: 12px; }
.account-input:focus { border-color: var(--gold); }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 19px; }.method-grid > div { padding: 13px; border-radius: 12px; background: #f3ede5; }.method-grid b { font-size: 12px; }.method-grid p { margin: 6px 0 0; font-size: 11px; }
footer { padding-top: 25px; color: #9e9387; text-align: center; font-size: 10px; }
footer p { margin: 0; }
.beian { margin-top: 7px; }
.beian a { color: #9e9387; text-decoration: none; border-bottom: 1px solid rgba(158, 147, 135, .45); padding-bottom: 1px; transition: color .18s ease, border-color .18s ease; }
.beian a:hover { color: #6b6259; border-bottom-color: #6b6259; }
.beian a + a { margin-left: 10px; }
.beian img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; border: 0; }
.copyright { margin-top: 7px !important; color: #a89d90; font-size: 10px; letter-spacing: .01em; }
@media (max-width: 820px) { .page-shell { width: min(100% - 24px, 620px); padding-top: 28px; }.topbar { display: block; }.header-side { justify-items: start; }.header-badge { display: inline-block; margin-top: 18px; }.layout { display: block; }.control-panel, .result-panel, .history-panel, .method-panel, .viz-panel { margin-bottom: 14px; }.result-panel { min-height: 0; }.results-list { min-height: 360px; }.red-grid { gap: 6px; }.ball { width: 25px; height: 25px; } }
@media (max-width: 430px) { .page-shell { width: calc(100% - 18px); }.control-panel, .result-panel, .history-panel, .method-panel, .viz-panel { padding: 19px 16px; border-radius: 18px; }.result-actions { gap: 4px; }.small-button { padding: 7px 8px; }.method-grid { grid-template-columns: 1fr; }.red-grid { gap: 4px; }.ball-select { font-size: 10px; }.ticket-row { padding: 9px 8px; }.ball { width: 23px; height: 23px; font-size: 9px; } }
