.deck-stats {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.stats-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.78rem;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--trans-interactive);
}
.stats-toggle:hover { border-color: var(--accent); color: var(--text); }
.stats-toggle-icon  { font-size: 0.72rem; }

.deck-count-label {
  align-self: center;
  margin-left: auto;
  color: var(--text-mid);
  font-size: 0.85rem;
  transition: color 0.2s;
}
.deck-count-complete { color: var(--blue);   font-weight: 600; }
.deck-count-over     { color: var(--accent); font-weight: 600; }

.stats-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 1000px;
  padding: 0 12px 10px;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}
.deck-stats.collapsed .stats-body { max-height: 0; padding-bottom: 0; }

.stats-row2                  { display: flex; gap: 10px; }
.stats-row2 > .stats-section { flex: 1; min-width: 0; }

.stats-section { padding-top: 8px; border-top: 1px solid var(--border); }
.stats-section:first-child,
.stats-row2 > .stats-section { padding-top: 0; border-top: none; }

.stats-title     { margin-bottom: 4px; color: var(--text-dim); font-size: 0.72rem; }
.stats-title-sub { margin-left: 4px; color: var(--text-mid); font-weight: 400; }

@media (max-width: 500px) {
  .stats-row2                                    { flex-direction: column; gap: 8px; }
  .stats-row2 > .stats-section + .stats-section  { padding-top: 8px; border-top: 1px solid var(--border); }
}

/* マナカーブ */
.stats-curve { display: flex; gap: 2px; height: 60px; }
.curve-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.curve-count {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12px;
  color: var(--text-mid);
  font-size: 0.72rem;
}
.curve-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.curve-bar {
  width: 100%;
  min-height: 0;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 2px 2px 0 0;
  transition: height 0.2s, background 0.2s;
}
.curve-bar.curve-bar-peak { background: var(--accent); }
.curve-cost {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12px;
  color: var(--text-dim);
  font-size: 0.72rem;
}

/* インク色 */
.stats-colors      { display: flex; flex-direction: column; gap: 4px; }
.stats-color-item  { display: flex; align-items: center; gap: 4px; }
.stats-color-label { flex: 1; color: var(--text-mid); font-size: 0.72rem; }
.stats-num         { color: var(--text); font-size: 0.75rem; font-weight: 600; }

/* タイプ */
.stats-types      { display: flex; flex-direction: column; gap: 4px; }
.stats-type-item  { display: flex; align-items: center; gap: 4px; }
.stats-type-label { flex-shrink: 0; width: 4.5em; color: var(--text-mid); font-size: 0.72rem; }
.stats-type-sub   { opacity: 0.75; }
.stats-type-bar {
  flex: 1;
  height: 4px;
  overflow: hidden;
  background: var(--border2);
  border-radius: 2px;
}
.stats-type-bar-fill {
  height: 100%;
  min-width: 4px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s;
}

/* キャラクタークラス */
.stats-classifications {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.stats-class-more { color: var(--text-dim); font-size: 0.72rem; }
.stats-class-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--border);
  border-radius: 10px;
  font-size: 0.72rem;
}
.stats-class-name  { color: var(--text-mid); }
.stats-class-count { color: var(--text); font-weight: 700; }

/* インクウェル */
.inkwell-ratio-bar {
  height: 6px;
  margin-bottom: 5px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 3px;
}
.inkwell-ratio-fill {
  height: 100%;
  background: var(--inkable);
  border-radius: 3px;
  transition: width 0.3s;
}
.inkwell-ratio-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
}
.inkwell-label-inkable { color: var(--inkable); }
.inkwell-label-non     { color: var(--text-dim); }
.inkwell-pct           { font-size: 0.72rem; opacity: 0.7; }
