/* ==========================================================================
   彩研所 · components.css
   布局骨架 / 卡片 / 表格 / 按钮 / 滑块 / 号码球 / 图表容器 / 玄学卡片
   ========================================================================== */

/* ---------------- 页头：桅杆 / 谱系 / 分层 ---------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-elev) 92%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.masthead {
  border-bottom: 1px solid var(--border);
}
.masthead-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 10px var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.brand { display: flex; align-items: center; gap: var(--space-3); flex: 0 0 auto; }

.brand-seal {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 2px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
  letter-spacing: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.08em;
  font-family: var(--font-serif);
  font-weight: 700;
}
.brand-text small {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-mute);
  white-space: nowrap;
}

/* 今日纪元 */
.epoch {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--text-dim);
  font-size: 12.5px;
}
.epoch-kicker {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.epoch-gz {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.06em;
}
.epoch-dot { color: var(--accent-2); opacity: 0.7; }
.epoch-term { color: var(--accent); font-weight: 600; }
.epoch-moon, .epoch-lunar, .epoch-wd { color: var(--text-dim); }

/* 谱系（彩种） */
.catalog { border-bottom: 1px solid var(--border); }
.catalog-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.catalog-kicker {
  flex: 0 0 auto;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--text-mute);
}

.lottery-tabs {
  display: flex;
  gap: var(--space-4);
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.lottery-tabs::-webkit-scrollbar { display: none; }

.catalog-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.catalog-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-mute);
  writing-mode: horizontal-tb;
}
.catalog-items { display: flex; gap: 2px; }

.lottery-tab {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.lottery-tab:hover { color: var(--text); }
.lottery-tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: transparent;
  box-shadow: none;
  font-weight: 700;
}

/* 主题切换 */
.theme-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: 0.08em;
}
.theme-toggle:hover { border-color: var(--border-strong); color: var(--text); }
.theme-icon {
  width: 12px; height: 12px; border-radius: 1px;
  background: conic-gradient(from 90deg, var(--accent-2) 0 50%, var(--text-mute) 50% 100%);
  box-shadow: inset 0 0 0 1px var(--bg-elev);
}

/* 研究分层导航 */
.main-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }

.nav-layer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 6px 12px 0;
  border-right: 1px solid var(--border);
}
.nav-layer:last-child { border-right: 0; }
.nav-layer.is-active { background: linear-gradient(180deg, var(--accent-soft), transparent); }
.nav-layer-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--text-mute);
  padding: 0 12px 1px;
  white-space: nowrap;
}
.nav-layer-items { display: flex; }

.nav-item {
  flex: 0 0 auto;
  padding: 4px 12px 9px;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.nav-item:hover { color: var(--text); }
.nav-item[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.app-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-6);
  outline: none;
}

.view-head { margin-bottom: var(--space-5); }
.view-kicker {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.view-kicker-zh {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--accent);
}
.view-kicker-en {
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--text-mute);
  text-transform: uppercase;
}
.view-head h1 { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.view-title { font-family: var(--font-serif); }
.view-desc { color: var(--text-dim); font-size: 13px; margin: 0; max-width: 72em; }

/* 页脚 */
.app-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
}
.disclaimer {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.7;
}
.disclaimer strong { color: var(--accent); }
.disclaimer em { font-style: normal; color: var(--accent); font-weight: 600; }

/* ---------------- 布局栅格 ---------------- */
.grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.grid-2 { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
.grid-auto { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elev-2), var(--bg-elev));
}
.card-title { font-size: 13.5px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; letter-spacing: 0.04em; }
.card-title .dot { width: 5px; height: 5px; border-radius: 1px; background: var(--accent); flex: 0 0 auto; transform: rotate(45deg); }
.card-sub { font-size: 12px; color: var(--text-mute); }
.card-body { padding: var(--space-4); }
.card-body.tight { padding: var(--space-3); }
.card-body.flush { padding: 0; }
.card + .card { margin-top: 0; }

/* KPI */
.kpi {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.kpi-label { font-size: 11.5px; color: var(--text-mute); letter-spacing: 0.02em; }
.kpi-value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-value.sm { font-size: 16px; }
.kpi-sub { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi--accent { border-left: 3px solid var(--accent); }
.kpi--gold { border-left: 3px solid var(--accent-2); }
.kpi--info { border-left: 3px solid var(--info); }
.kpi--ok { border-left: 3px solid var(--ok); }

/* ---------------- 号码球 ---------------- */
.ball-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ball {
  --sz: 34px;
  width: var(--sz); height: var(--sz);
  border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: calc(var(--sz) * 0.42);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: var(--ball-red);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.15);
  flex: 0 0 auto;
  line-height: 1;
}
.ball.sm { --sz: 26px; }
.ball.lg { --sz: 44px; }
.ball--blue { background: var(--ball-blue); }
.ball--gold { background: var(--ball-gold); }
.ball--hit {
  box-shadow: 0 0 0 2px var(--ok), inset 0 -2px 4px rgba(0,0,0,.18);
}
.ball--miss { opacity: .38; filter: grayscale(.3); }
.ball--gap {
  box-shadow: 0 0 0 2px var(--warn), inset 0 -2px 4px rgba(0,0,0,.18);
}
.ball--ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px dashed var(--border-strong);
  box-shadow: none;
}
.ball-sep { color: var(--text-mute); font-weight: 700; padding: 0 2px; }

/* ---------------- 表格 ---------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-m);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
table.data-table th,
table.data-table td {
  padding: 8px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data-table th {
  position: sticky; top: 0;
  background: var(--bg-elev-2);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 12px;
  text-align: right;
  z-index: 1;
}
table.data-table th:first-child,
table.data-table td:first-child { text-align: left; }
table.data-table tbody tr:hover { background: var(--bg-hover); }
table.data-table tbody tr.is-click { cursor: pointer; }
table.data-table tbody tr.is-selected { background: var(--accent-soft); }
table.data-table tbody tr.is-selected:hover { background: var(--accent-soft); }
table.data-table tbody tr.is-total { font-weight: 700; background: var(--bg-elev-2); }
table.data-table tbody tr.is-total:hover { background: var(--bg-elev-2); }
table.data-table tbody tr.is-total td { border-top: 1px solid var(--border); }
table.data-table tbody tr:last-child td { border-bottom: 0; }
table.data-table td.num { font-family: var(--font-mono); }
table.data-table .row-em { color: var(--accent); font-weight: 600; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--bg-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 86%, #000); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--bg-hover); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* 分段控件 */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.seg-item {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-size: 12.5px;
  white-space: nowrap;
}
.seg-item:hover { color: var(--text); }
.seg-item[aria-pressed="true"] {
  background: var(--bg-elev);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

/* ---------------- 标签 / 徽章 ---------------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-sunken);
  color: var(--text-dim);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.chip--ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip--warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip--danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chip--info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.chip--accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip--gold { background: var(--accent-2-soft); color: var(--accent-2); border-color: transparent; }

.ai-kicker {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 12px;
}

.admin-login-wrap { max-width: 420px; margin: 32px auto; }
.admin-login { margin-top: 8px; }

.review-ticket { padding-bottom: 4px; margin-bottom: 10px; border-bottom: 1px dashed var(--border); }
.review-ticket:last-child { border-bottom: 0; margin-bottom: 0; }
.chip--miss { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.chip--gap { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.review-learn-list {
  margin: 0;
  padding-left: 1.25em;
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
}
.review-learn-list li { margin: 0.3em 0; }

.compound-shift {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.compound-shift p {
  margin: 0 0 6px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.65;
}
.compound-shift p:last-child { margin-bottom: 0; }

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: var(--radius-s);
  font-size: 11px;
  font-weight: 600;
  background: var(--bg-sunken);
  color: var(--text-dim);
}

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.field-hint { font-size: 11px; color: var(--text-mute); }

input[type="text"], input[type="password"], input[type="url"], input[type="date"], input[type="number"], select, textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 13px;
}
textarea { min-height: 120px; resize: vertical; font-family: var(--font-mono); font-size: 12px; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* 滑块 */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  outline: none;
  margin: 8px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elev);
  box-shadow: var(--shadow-1);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg-elev);
  cursor: pointer;
}
input[type="range"]:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }

.weight-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px dashed var(--border);
}
.weight-row:last-child { border-bottom: 0; }
.weight-name { font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.weight-name .w-hint { font-size: 11px; color: var(--text-mute); }
.weight-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  min-width: 34px;
  text-align: right;
}
.weight-row input[type="range"] { grid-column: 1 / -1; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 36px; height: 20px; border-radius: var(--radius-pill);
  background: var(--border-strong); position: relative; transition: background .15s;
  flex: 0 0 auto;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(16px); }

/* ---------------- 图表容器 ---------------- */
.chart-box {
  width: 100%;
  min-height: 120px;
  overflow: hidden;
}
.chart-box svg { display: block; width: 100%; height: auto; }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--text-dim);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.legend-swatch.round { border-radius: 50%; }

.chart-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.chart-toolbar .spacer { flex: 1 1 auto; }

/* 大号池图表（如快乐8 80 个号）：窄屏横向滚动 + 超高图纵向滚动兜底 */
.chart-scroll { overflow-x: auto; }
.chart-scroll-y { overflow: auto; max-height: 640px; }
.chart-scroll > .chart-box { min-width: 0; }

/* 热力矩阵 */
.heatmap-grid { display: grid; gap: 2px; min-width: 0; }
.hm-cell {
  aspect-ratio: 1 / 1;
  border-radius: 3px;
  display: grid; place-items: center;
  font-size: 9px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.hm-axis {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-mute);
  margin-top: 4px;
}

/* ---------------- 玄学维度 · 四柱卡片 ---------------- */
.meta-cards { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.meta-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: var(--space-3);
  background:
    linear-gradient(160deg, var(--accent-soft), transparent 60%),
    var(--bg-elev-2);
  overflow: hidden;
}
.meta-card::after {
  content: "";
  position: absolute; right: -18px; bottom: -18px;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent-2-soft);
}
.meta-card-label {
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.meta-card-value {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  line-height: 1.25;
}
.meta-card-value.sm { font-size: 15px; letter-spacing: 0.02em; font-family: var(--font-sans); }
.meta-card-note { font-size: 11px; color: var(--text-mute); margin-top: 4px; }

.pillars { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.pillar {
  flex: 1 1 72px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: var(--space-2) 4px;
  background: var(--bg-elev-2);
}
.pillar .p-name { font-size: 11px; color: var(--text-mute); }
.pillar .p-gan,
.pillar .p-zhi {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  display: block;
}
.pillar .p-gan { color: var(--accent); }
.pillar .p-zhi { color: var(--accent-2); }

/* 修行感：干支圆盘徽记（纯 CSS） */
.ganzhi-seal {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--accent-2);
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 4px var(--bg-elev), var(--shadow-1);
  flex: 0 0 auto;
}

/* ---------------- 提示条 ---------------- */
.notice {
  display: flex; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-m);
  font-size: 12.5px;
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
  color: var(--text-dim);
  line-height: 1.6;
}
.notice--warn { border-color: var(--warn); background: var(--warn-soft); color: var(--text); }
.notice--danger { border-color: var(--danger); background: var(--danger-soft); color: var(--text); }
.notice--info { border-color: var(--info); background: var(--info-soft); color: var(--text); }
.notice strong { color: var(--text); }
.notice .notice-icon { font-size: 16px; line-height: 1.3; flex: 0 0 auto; }

/* ---------------- 空状态 ---------------- */
.empty {
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}

/* ---------------- 加载 / 提示 ---------------- */
.loading-mask {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center; align-content: center; gap: var(--space-3);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(3px);
}
.spinner {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  animation: lt-spin .8s linear infinite;
}
@keyframes lt-spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: var(--text-dim); margin: 0; }

.llm-wait { text-align: center; padding: 6px 4px 2px; }
.llm-wait-steps { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.llm-wait-step {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text-mute);
  font-size: 12px;
}
.llm-wait-step.is-active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.llm-wait-step.is-done {
  color: var(--ok);
  border-color: transparent;
  background: var(--ok-soft);
}
.llm-wait .spinner { margin: 0 auto 10px; }
.llm-wait-elapsed {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}
.llm-wait-hint { font-size: 12px; color: var(--text-dim); margin: 0 0 12px; }
.llm-wait-actions { display: flex; justify-content: center; }

.log-clip {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono);
  font-size: 12px;
  max-height: 240px;
  overflow: auto;
  padding: 10px 12px;
  background: var(--bg-elev-2);
  border-radius: var(--radius-m);
  border: 1px solid var(--border-strong);
  margin: 0;
}

.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 95;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg-elev);
  font-size: 13px;
  box-shadow: var(--shadow-3);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- 工具类 ---------------- */
.row { display: flex; align-items: center; gap: var(--space-3); }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: var(--space-3); }
.muted { color: var(--text-mute); }
.dim { color: var(--text-dim); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--font-mono); }
.tabular { font-variant-numeric: tabular-nums; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.text-gold { color: var(--accent-2); }
.hidden { display: none !important; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: var(--space-4) 0; }

/* 归因条 */
.attr-row { display: flex; align-items: center; gap: var(--space-2); font-size: 12px; }
.attr-bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  overflow: hidden;
  min-width: 40px;
}
.attr-fill { height: 100%; border-radius: var(--radius-pill); }
.attr-label { min-width: 88px; color: var(--text-dim); }
.attr-val { min-width: 40px; text-align: right; font-family: var(--font-mono); color: var(--text-dim); }

/* 推荐号码条目 */
.pick-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.pick-line:last-child { border-bottom: 0; }
.pick-index {
  width: 26px; height: 26px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--text-dim);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.pick-reason {
  flex: 1 1 100%;
  font-size: 11.5px;
  color: var(--text-mute);
  line-height: 1.7;
  margin-top: 2px;
}
.pick-reason .tag {
  display: inline-block;
  margin-right: 6px;
  padding: 0 6px;
  border-radius: var(--radius-s);
  background: var(--accent-2-soft);
  color: var(--accent-2);
  font-weight: 600;
}

.sig-flag { font-weight: 700; }
.sig-flag.yes { color: var(--danger); }
.sig-flag.no { color: var(--text-mute); }
