/* 49 主题 · 资料中心（/ziliao）
   375 基准；间距取 5 的倍数；颜色 / 字号 / 圆角 / 阴影全部取 tokens.css 变量 */

/* ---------- NavBar 右侧期号 ---------- */
.t49-zl-page .t49-nav__side--right {
  width: auto;
  max-width: 120px;
}
.t49-zl__issue {
  padding-left: var(--space-5);
  font-size: var(--font-size-12);
  color: var(--color-text-tertiary);
  white-space: nowrap;
}

/* ---------- 20 栏目锚点条：吸顶横滑 ---------- */
.t49-zl__anchors {
  position: sticky;
  top: var(--nav-h);
  z-index: 30;
  gap: var(--space-5);
  padding: var(--space-10);
  background: var(--color-bg-card);
  border-bottom: 0.5px solid var(--color-divider);
}
.t49-zl__anchors .t49-seg__item {
  height: 30px;
  padding: 0 var(--space-10);
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  font-size: var(--font-size-13);
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.t49-zl__anchors .t49-seg__item.is-active {
  background: var(--gradient-primary);
  color: var(--color-text-inverse);
  font-weight: 600;
}
.t49-zl__anchors .t49-seg__item:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

/* ---------- 栏目卡 ---------- */
.t49-zl__card {
  scroll-margin-top: calc(var(--nav-h) + 50px);
  animation: t49-fade var(--dur-base) var(--ease-standard);
}
.t49-zl__card:target {
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-card);
}
.t49-zl__hd {
  display: flex;
  align-items: center;
  gap: var(--space-10);
  padding: var(--space-10) var(--space-10) 0;
}
.t49-zl__hd-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.t49-zl__title {
  margin: 0;
  min-width: 0;
  font-size: var(--font-size-15);
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.t49-zl__copy {
  flex: none;
  height: 24px;
  padding: 0 var(--space-10);
  border-radius: var(--radius-16);
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  font-size: var(--font-size-12);
  line-height: 24px;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.t49-zl__copy.is-done {
  background: var(--color-ball-green-soft);
  color: var(--color-primary);
}
.t49-zl__bd {
  padding: var(--space-10);
}

/* ---------- 本期内容：号码球 / 标签 / 纯文本 ---------- */
.t49-zl__content {
  min-height: 24px;
  display: flex;
  align-items: center;
}
.t49-zl__flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
}
.t49-zl__flow--balls {
  justify-content: flex-start;
}
.t49-zl__chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 var(--space-10);
  border-radius: var(--radius-4);
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  font-size: var(--font-size-13);
  line-height: 1;
  white-space: nowrap;
}
.t49-zl__chip--zodiac {
  background: var(--color-ball-green-soft);
  color: var(--color-primary);
  font-weight: 600;
}
.t49-zl__chip--green {
  background: var(--color-ball-green-soft);
  color: var(--color-ball-green);
}
.t49-zl__chip--blue {
  background: var(--color-ball-blue-soft);
  color: var(--color-ball-blue);
}
.t49-zl__chip--red {
  background: var(--color-ball-red-soft);
  color: var(--color-ball-red);
}
.t49-zl__chip--num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--color-text-primary);
  letter-spacing: 1px;
}
.t49-zl__raw {
  font-size: var(--font-size-15);
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 1px;
  word-break: break-all;
}
.t49-zl__muted {
  font-size: var(--font-size-13);
  color: var(--color-text-placeholder);
}

/* ---------- 视觉分派 1：波色 chip（实心圆点 + 对应色文字） ---------- */
.t49-zl-ball {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 var(--space-10);
  border-radius: var(--radius-16);
  font-size: var(--font-size-13);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.t49-zl-ball__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.t49-zl-ball__txt {
  letter-spacing: 0;
}
.t49-zl-ball--red {
  background: var(--color-ball-red-soft);
  color: var(--color-ball-red);
  color: color-mix(in srgb, var(--color-ball-red) 68%, var(--color-text-primary));
}
.t49-zl-ball--red .t49-zl-ball__dot { background: var(--color-ball-red); }
.t49-zl-ball--blue {
  background: var(--color-ball-blue-soft);
  color: var(--color-ball-blue);
  color: color-mix(in srgb, var(--color-ball-blue) 68%, var(--color-text-primary));
}
.t49-zl-ball--blue .t49-zl-ball__dot { background: var(--color-ball-blue); }
.t49-zl-ball--green {
  background: var(--color-ball-green-soft);
  color: var(--color-ball-green);
  color: color-mix(in srgb, var(--color-ball-green) 68%, var(--color-text-primary));
}
.t49-zl-ball--green .t49-zl-ball__dot { background: var(--color-ball-green); }

/* ---------- 视觉分派 2：生肖 chip（16×16 线性图标 + 生肖字） ---------- */
.t49-zl-zodiac {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 var(--space-10);
  border-radius: var(--radius-16);
  background: var(--color-ball-green-soft);
  color: var(--color-primary);
  font-size: var(--font-size-13);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.t49-zl-zodiac__ico {
  flex: none;
  width: 16px;
  height: 16px;
}
.t49-zl-zodiac__txt {
  letter-spacing: 0;
}

/* ---------- 视觉分派 3：金字塔阶梯（逐行递增居中，球体随行放大） ---------- */
.t49-zl__content--pyramid {
  display: block;
}
.t49-zl-pyramid {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  width: 100%;
}
.t49-zl-pyramid__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 100%;
}
.t49-zl-pyramid__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
}
.t49-zl-pyramid__row .t49-ball {
  --ball: calc(14px + (var(--row, 1) - 1) * 1.6px);
}
.t49-zl-pyramid__row--zod {
  gap: 3px;
}
.t49-zl-pyramid__row--zod .t49-zl-zodiac {
  height: 22px;
  padding: 0 6px;
  gap: 3px;
  font-size: var(--font-size-12);
}
.t49-zl-pyramid__row--zod .t49-zl-zodiac__ico {
  width: 12px;
  height: 12px;
}

/* ---------- 结果行：等宽排版 ---------- */
.t49-zl__result {
  margin: var(--space-10) 0 0;
  padding: var(--space-5) var(--space-10);
  border-radius: var(--radius-4);
  background: var(--color-bg-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: var(--font-size-13);
  color: var(--color-text-secondary);
  letter-spacing: 1px;
  overflow-x: auto;
  white-space: nowrap;
}

/* ---------- 近 10 期（原生 details，默认收起） ---------- */
.t49-zl__hist {
  margin-top: var(--space-10);
  border-top: 0.5px solid var(--color-divider);
}
.t49-zl__hist summary {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-10) 0 var(--space-5);
  font-size: var(--font-size-12);
  color: var(--color-text-tertiary);
  list-style: none;
  cursor: pointer;
}
.t49-zl__hist summary::-webkit-details-marker { display: none; }
.t49-zl__hist-title { font-weight: 500; }
.t49-zl__hist-hint { color: var(--color-text-placeholder); }
.t49-zl__hist-arrow {
  margin-left: auto;
  transition: transform var(--dur-fast) var(--ease-standard);
}
.t49-zl__hist[open] .t49-zl__hist-arrow { transform: rotate(180deg); }
.t49-zl__hist[open] .t49-zl__hist-hint { display: none; }
.t49-zl__hist-list {
  margin: 0;
  padding: 0 0 var(--space-5);
  list-style: none;
}
.t49-zl__hist-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: var(--space-10);
  padding: var(--space-5) 0;
  border-top: 0.5px dashed var(--color-divider);
  font-size: var(--font-size-12);
}
.t49-zl__hist-issue {
  color: var(--color-text-tertiary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}
.t49-zl__hist-val {
  min-width: 0;
  color: var(--color-text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-all;
}
.t49-zl__hist-res {
  color: var(--color-text-placeholder);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

/* ---------- 页脚说明 ---------- */
.t49-zl__note {
  margin: var(--space-15) var(--space-15) 0;
  font-size: var(--font-size-12);
  line-height: 1.7;
  color: var(--color-text-tertiary);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .t49-zl__anchors .t49-seg__item,
  .t49-zl__copy,
  .t49-zl__hist-arrow,
  .t49-zl__card {
    transition: none;
    animation: none;
  }
}
