/*!
 * components.css · 组件样式
 * 依赖：tokens.css、base.css、layout.css
 * 硬规则：禁止字面色值，一律 var(--token)
 */

/* ============================================================
 * 卡片
 * ========================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
}

.card + .card {
  margin-top: var(--space-5);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.card__title {
  font-size: var(--font-card);
  font-weight: 600;
  line-height: var(--lh-snug);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.card__hint {
  font-size: var(--font-note);
  color: var(--text-muted);
}

/* 左侧色条卡片（首页彩种卡） */
.card--accent-red { border-left: 4px solid var(--brand-red); }
.card--accent-gold { border-left: 4px solid var(--brand-gold); }

/* ============================================================
 * 按钮
 * ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--font-body);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              filter var(--dur-fast) var(--ease-out);
}

.btn:disabled {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-hover));
  color: var(--text-on-brand);
  border-color: var(--brand-red);
}

.btn--primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn--gold {
  background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-light));
  color: var(--text-primary);
  border-color: var(--brand-gold);
}

[data-theme="light"] .btn--gold {
  color: #FFFFFF;
}

.btn--gold:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn--ghost {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn--ghost:hover:not(:disabled) {
  border-color: var(--border-gold);
}

.btn--link {
  min-height: auto;
  padding: 0;
  background: none;
  color: var(--brand-gold);
  font-weight: 500;
}

.btn--link:hover:not(:disabled) {
  color: var(--brand-gold-light);
}

.btn--sm {
  min-height: 30px;
  padding: 0 var(--space-3);
  font-size: var(--font-note);
  border-radius: var(--radius-sm);
}

.btn--danger {
  background: var(--bg-elevated);
  color: var(--status-err);
  border-color: var(--status-err);
}

.btn--danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--status-err) 14%, var(--bg-elevated));
}

.btn--block {
  width: 100%;
}

/* 按钮组 */
.btn-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* loading 态 */
.btn.is-loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid var(--text-on-brand);
  border-top-color: transparent;
  border-radius: 50%;
  animation: pi-spin 700ms linear infinite;
}

@keyframes pi-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
 * 表单控件
 * ========================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--font-note);
  color: var(--text-secondary);
}

.field__row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.input {
  min-height: 40px;
  padding: 0 var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--font-body);
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.input:focus {
  border-color: var(--brand-gold);
}

.input:disabled {
  opacity: 0.5;
}

.input--num {
  width: 116px;
  text-align: center;
}

.input--tiny {
  width: 58px;
  min-height: 36px;
  text-align: center;
  padding: 0 var(--space-1);
}

.input--invalid {
  border-color: var(--status-err);
}

/* 滑杆 */
.slider {
  flex: 1 1 240px;
  min-width: 160px;
  height: 24px;
  background: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track-bg);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--brand-gold);
  border: 2px solid var(--bg-surface);
  box-shadow: var(--shadow-card);
}

.slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--track-bg);
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-gold);
  border: 2px solid var(--bg-surface);
}

.slider:disabled {
  opacity: 0.5;
}

/* 开关 */
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-note);
  color: var(--text-secondary);
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch__track {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--track-bg);
  border: 1px solid var(--border-subtle);
  transition: background-color var(--dur-base) var(--ease-out);
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition: transform var(--dur-base) var(--ease-out),
              background-color var(--dur-base) var(--ease-out);
}

.switch input:checked + .switch__track {
  background: color-mix(in srgb, var(--brand-gold) 55%, var(--track-bg));
}

.switch input:checked + .switch__track::after {
  transform: translateX(18px);
  background: var(--brand-gold);
}

.switch input:focus-visible + .switch__track {
  box-shadow: var(--focus-ring);
}

/* 分档位选择 */
.tier-group {
  display: inline-flex;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.tier-group__btn {
  padding: 6px var(--space-3);
  font-size: var(--font-badge);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-subtle);
  transition: background-color var(--dur-fast) var(--ease-out);
}

.tier-group__btn:last-child {
  border-right: none;
}

.tier-group__btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--brand-gold) 26%, var(--bg-elevated));
  color: var(--brand-gold);
  font-weight: 600;
}

/* ============================================================
 * 球体（44 / 38px，渐变高光 32% 28%）
 * ========================================================== */
.ball-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  min-height: var(--ball-size);
}

.ball-row__sep {
  margin: 0 var(--space-1);
  color: var(--text-muted);
  font-size: var(--font-card);
  font-weight: 600;
}

.ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ball-size);
  height: var(--ball-size);
  border-radius: var(--radius-ball);
  border: 1px solid var(--ball-stroke);
  box-shadow: var(--ball-shadow);
  color: #FFFFFF;
  font-size: var(--ball-font);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  user-select: none;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  animation: pi-ball-in var(--dur-slow) var(--ease-out) both;
}

.ball--red { background: var(--ball-red); }
.ball--blue { background: var(--ball-blue); }
.ball--gold { background: var(--ball-gold); }

.ball--sm {
  width: 28px;
  height: 28px;
  font-size: var(--font-badge);
  border-width: 1px;
}

.ball--clickable { cursor: pointer; }

.ball--clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--ball-shadow-hover);
}

.ball--picked {
  box-shadow: 0 0 0 2px var(--brand-gold), var(--ball-shadow);
  filter: brightness(1.12);
}

.ball--dan {
  box-shadow: 0 0 0 2px var(--brand-gold), 0 0 0 4px var(--bg-surface), var(--ball-shadow);
}

@keyframes pi-ball-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 数字块（排列五 / 七星彩前区） */
.digit-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--digit-block-w);
  height: var(--digit-block-h);
  border-radius: 10px;
  background: var(--ball-digit);
  border: 1px solid var(--ball-stroke);
  box-shadow: var(--ball-shadow);
  color: var(--brand-gold);
  font-family: var(--font-mono);
  font-size: var(--font-digit);
  font-weight: 700;
  line-height: 1;
  user-select: none;
  transition: transform var(--dur-fast) var(--ease-out);
  animation: pi-ball-in var(--dur-slow) var(--ease-out) both;
}

.digit-block--clickable { cursor: pointer; }

.digit-block--clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--ball-shadow-hover);
}

.digit-block--picked {
  box-shadow: 0 0 0 2px var(--brand-gold), var(--ball-shadow);
  color: var(--brand-gold-light);
}

/* 号码区标签 */
.zone-label {
  font-size: var(--font-badge);
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
}

.zone-block + .zone-block {
  margin-top: var(--space-4);
}

/* ============================================================
 * 指标卡
 * ========================================================== */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.metric {
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  min-width: 0;
}

.metric__label {
  font-size: var(--font-badge);
  color: var(--text-muted);
  line-height: 1;
}

.metric__value {
  margin-top: var(--space-2);
  font-size: var(--font-metric);
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-gold);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.metric__value--text {
  font-size: var(--font-card);
}

.metric__sub {
  margin-top: var(--space-1);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* 诚实性常驻提示 */
.honesty-note {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-subtle);
  font-size: var(--font-note);
  line-height: var(--lh-note);
  color: var(--text-secondary);
}

/* ============================================================
 * 溯源区
 * ========================================================== */
.digit-stream {
  font-family: var(--font-mono);
  font-size: var(--font-note);
  line-height: 1.9;
  word-break: break-all;
  padding: var(--space-3);
  background: var(--code-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.digit-stream__ch {
  display: inline-block;
  padding: 0 1px;
  border-radius: 2px;
}

.digit-stream__ch--used {
  background: var(--highlight-digit-bg);
  color: var(--highlight-digit-fg);
  font-weight: 700;
}

.trace-table {
  width: 100%;
  margin-top: var(--space-4);
  border-collapse: collapse;
  font-size: var(--font-note);
  font-variant-numeric: tabular-nums;
}

.trace-table th,
.trace-table td {
  padding: 6px var(--space-2);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.trace-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--font-badge);
}

.trace-table td.num {
  font-family: var(--font-mono);
}

.trace-table tr.is-used td {
  background: color-mix(in srgb, var(--brand-red) 10%, transparent);
}

.trace-table tr.is-skip td {
  color: var(--text-muted);
}

.trace-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
 * 历史记录
 * ========================================================== */
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.history-item__meta {
  flex: 0 0 auto;
  min-width: 88px;
  font-size: var(--font-badge);
  color: var(--text-muted);
  line-height: 1.5;
}

.history-item__numbers {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.history-item__stats {
  flex: 1 1 100%;
  font-size: 11.5px;
  color: var(--text-muted);
}

.history-item__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out);
}

.icon-btn:hover:not(:disabled) {
  color: var(--brand-gold);
  background: var(--bg-surface);
}

.icon-btn[aria-pressed="true"] {
  color: var(--brand-gold);
}

.icon-btn--danger:hover:not(:disabled) {
  color: var(--status-err);
}

/* ============================================================
 * 徽标 / 角标
 * ========================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px var(--space-2);
  border-radius: 999px;
  font-size: var(--font-badge);
  line-height: 1.6;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.badge--gold {
  color: var(--brand-gold);
  border-color: var(--border-gold);
  background: color-mix(in srgb, var(--brand-gold) 14%, var(--bg-elevated));
}

.badge--ok {
  color: var(--status-ok);
  border-color: color-mix(in srgb, var(--status-ok) 45%, transparent);
  background: color-mix(in srgb, var(--status-ok) 14%, var(--bg-elevated));
}

.badge--err {
  color: var(--status-err);
  border-color: color-mix(in srgb, var(--status-err) 45%, transparent);
  background: color-mix(in srgb, var(--status-err) 14%, var(--bg-elevated));
}

.badge--warn {
  color: var(--status-warn);
  border-color: color-mix(in srgb, var(--status-warn) 45%, transparent);
  background: color-mix(in srgb, var(--status-warn) 14%, var(--bg-elevated));
}

.badge--soon {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  color: var(--brand-gold);
  border-color: var(--border-gold);
  background: color-mix(in srgb, var(--brand-gold) 18%, var(--bg-elevated));
}

/* ============================================================
 * 首页彩种卡
 * ========================================================== */
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 148px;
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--brand-red);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  color: var(--text-primary);
  text-decoration: none;
  transition: transform var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out);
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-pop);
  text-decoration: none;
  color: var(--text-primary);
}

.game-card--gold { border-left-color: var(--brand-gold); }

.game-card--soon {
  filter: saturate(0.55);
}

.game-card__icon {
  width: 34px;
  height: 34px;
  color: var(--brand-red);
}

.game-card--gold .game-card__icon { color: var(--brand-gold); }

.game-card__name {
  font-size: var(--font-card);
  font-weight: 600;
}

.game-card__desc {
  font-size: var(--font-note);
  color: var(--text-secondary);
  line-height: var(--lh-note);
}

.game-card__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--font-badge);
  color: var(--text-muted);
}

/* ============================================================
 * Toast
 * ========================================================== */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
  pointer-events: none;
  width: min(92vw, 460px);
}

.toast {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--brand-gold);
  box-shadow: var(--shadow-pop);
  font-size: var(--font-note);
  line-height: var(--lh-note);
  color: var(--text-primary);
  animation: pi-toast-in var(--dur-base) var(--ease-out) both;
  overflow-wrap: anywhere;
}

.toast--err { border-left-color: var(--status-err); }
.toast--warn { border-left-color: var(--status-warn); }
.toast--ok { border-left-color: var(--status-ok); }

.toast.is-leaving {
  animation: pi-toast-out var(--dur-base) var(--ease-out) both;
}

@keyframes pi-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pi-toast-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(8px); }
}

/* ============================================================
 * 弹窗
 * ========================================================== */
.modal__head {
  padding: var(--space-5) var(--space-6) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.modal__body {
  padding: var(--space-5) var(--space-6);
  font-size: var(--font-note);
  line-height: var(--lh-body);
  color: var(--text-secondary);
}

.modal__body strong {
  color: var(--text-primary);
}

.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6) var(--space-5);
  flex-wrap: wrap;
}

.modal__list {
  margin: var(--space-3) 0;
  padding-left: var(--space-5);
  list-style: disc;
}

.modal__list li {
  margin-bottom: var(--space-1);
}

/* ============================================================
 * 空状态
 * ========================================================== */
.empty {
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--font-note);
  line-height: var(--lh-note);
}

.empty__title {
  color: var(--text-secondary);
  font-size: var(--font-body);
  font-weight: 600;
  margin-bottom: var(--space-1);
}

/* ============================================================
 * 免责声明
 * ========================================================== */
.disclaimer {
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid var(--brand-red);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-size: var(--font-note);
  line-height: var(--lh-note);
  color: var(--text-secondary);
}

.disclaimer strong {
  color: var(--text-primary);
}

.disclaimer--inline {
  margin-top: var(--space-5);
}

/* ============================================================
 * 进度条（100 万位专家档）
 * ========================================================== */
.progress {
  margin-top: var(--space-3);
}

.progress__track {
  height: 8px;
  border-radius: 4px;
  background: var(--track-bg);
  overflow: hidden;
}

.progress__fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  background: var(--track-fill);
  transition: width var(--dur-base) var(--ease-out);
}

.progress__label {
  margin-top: var(--space-2);
  font-size: var(--font-badge);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

/* ============================================================
 * 表格（批量多注紧凑表格）
 * ========================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-note);
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: var(--space-2) var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: var(--font-badge);
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--bg-elevated);
}

.data-table__numbers {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
 * 内联 SVG 图标通用
 * ========================================================== */
.icon {
  display: inline-block;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm { width: 15px; height: 15px; }
.icon--md { width: 18px; height: 18px; }
.icon--lg { width: 34px; height: 34px; }
.icon--fill { fill: currentColor; stroke: none; }

/* ============================================================
 * 我的存档（cloud-panel.js）
 * 仅复用既有 token，不引入新设计语言
 * ========================================================== */
.archive {
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.archive__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.archive__head-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.archive__title {
  margin: 0;
  font-size: var(--font-note);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

/* 状态灯 */
.archive-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  background: var(--status-idle);
}

.archive-dot--ok { background: var(--status-ok); }
.archive-dot--warn { background: var(--status-warn); }
.archive-dot--err { background: var(--status-err); }

.archive__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* 数字对比 */
.archive__nums {
  display: flex;
  align-items: stretch;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.archive__num {
  flex: 1 1 0;
  min-width: 0;
}

.archive__num-label {
  font-size: var(--font-badge);
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.archive__num-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.archive__num-sub {
  font-size: var(--font-badge);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive__num-sep {
  width: 1px;
  background: var(--border-subtle);
  flex: 0 0 auto;
}

/* 容量条 */
.archive__cap { margin-bottom: var(--space-3); }

.archive__cap-head {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-badge);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.archive__cap-text {
  font-variant-numeric: tabular-nums;
}

.archive-cap {
  height: 4px;
  border-radius: 999px;
  background: var(--track-bg);
  overflow: hidden;
}

.archive-cap__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--track-fill);
  transition: width 0.3s ease;
}

.archive-cap--warn .archive-cap__fill {
  background: var(--status-warn);
}

.archive-cap--full .archive-cap__fill {
  background: var(--status-err);
}

/* 提示文案 */
.archive-note {
  margin: 0 0 var(--space-3);
  font-size: var(--font-badge);
  line-height: 1.6;
  color: var(--text-secondary);
}

.archive-note--warn { color: var(--status-warn); }
.archive-note b { color: inherit; }

/* 页脚 */
.archive__foot {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--font-badge);
  color: var(--text-muted);
}

.archive__foot-hint {
  margin-left: auto;
  color: var(--text-muted);
  opacity: 0.75;
}

.archive__uid {
  margin-left: var(--space-1);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  color: var(--brand-gold);
  font-size: var(--font-badge);
  letter-spacing: 0.08em;
}

@media (max-width: 640px) {
  .archive__nums { gap: var(--space-3); }
  .archive__num-value { font-size: 22px; }
  .archive__foot-hint { margin-left: 0; width: 100%; }
}
