.view-toolbar {
  margin-bottom: 1.5rem;
}

.view-toolbar__presets {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.chip {
  padding: 0.4rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: color-mix(in srgb, var(--surface) 50%, transparent);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip--active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}

.view-toolbar__grid {
  max-width: 420px;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.view-tile__name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.view-tile__description {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.view-tile__count {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.view-tile__error {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--bad);
}

.view-tile__footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.view-tile__link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* --- View detail page ------------------------------------------------------ */

.view-detail__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.view-detail__count {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.view-detail__count-value {
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1;
}

.view-detail__count-value--bad {
  color: var(--bad);
}

.view-detail__count-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.view-detail__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.view-detail__legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.view-swatch {
  width: 14px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.view-detail__empty,
.view-detail__error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.view-detail__error {
  color: var(--bad);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}
