/* Soft Gallery: the original warm-paper, charcoal and brass palette. */
.collection-switcher {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 24px;
  padding: 8px;
  border: 1px solid #d7d1c5;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 10px 28px #403a2c09;
}
.collection-switcher .collection-tabs {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 1;
  min-width: 0;
  gap: 8px;
  margin: 0;
  border: 0;
  overflow: visible;
}
.collection-indicator {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc((100% - 16px) / 3);
  border-radius: 17px;
  background: var(--ink);
  pointer-events: none;
  transition: transform 320ms cubic-bezier(.22, .8, .25, 1);
}
.collection-tabs[data-active-index="1"] .collection-indicator { transform: translateX(calc(100% + 8px)); }
.collection-tabs[data-active-index="2"] .collection-indicator { transform: translateX(calc(200% + 16px)); }
.collection-switcher .collection-tab {
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 64px;
  padding: 15px 12px;
  border-radius: 17px;
  background: transparent;
  color: #665e50;
  font-size: 1rem;
  line-height: 1.6;
  white-space: normal;
  text-align: center;
  transition: color 220ms ease;
}
.collection-switcher .collection-tab::after { display: none; }
.collection-switcher .collection-tab:hover { color: var(--ink); }
.collection-switcher .collection-tab.active { color: var(--paper); }
.collection-switcher .collection-tab > span {
  flex-shrink: 0;
  min-width: 28px;
  padding: 3px 7px;
  border: 1px solid transparent;
  background: #eae5db;
  color: #665e50;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  transition: background 220ms ease, color 220ms ease;
}
.collection-switcher .collection-tab.active > span {
  border-color: transparent;
  background: #ffffff1f;
  color: var(--paper);
}
.collection-switcher #saved-filter {
  position: relative;
  flex-shrink: 0;
  min-height: 50px;
  margin: 0;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  color: #615640;
  font-size: .9375rem;
  transition: background 220ms ease, color 220ms ease;
}
.collection-switcher #saved-filter::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: -6px;
  width: 1px;
  background: var(--line);
}
.collection-switcher #saved-filter:hover { background: var(--warm); }
.collection-switcher #saved-filter[aria-pressed="true"] {
  background: #eae4d7;
  border-color: #bda984;
  color: var(--ink);
}
.collection-switcher #saved-count {
  min-width: 20px;
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
}
.collection-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.collection-hint {
  margin: 0;
  font-size: var(--text-meta);
  line-height: 1.8;
  color: #5a5345;
}
.collection-tools .project-search {
  width: 270px;
  max-width: none;
  min-height: 48px;
  flex: 0 0 270px;
  gap: 10px;
  padding: 8px 17px;
  border: 1px solid #cfc7b9;
  border-radius: 999px;
  background: var(--paper);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.collection-tools .project-search:focus-within {
  border-color: #a68b5e;
  box-shadow: 0 0 0 3px #a68b5e1a;
}
.collection-tools .project-search input {
  padding: 3px 0;
  min-height: 28px;
  font-size: 1rem;
  line-height: 1.6;
}
.collection-tools .project-search input::placeholder { font-size: 1rem; }
.projects .project-toolbar { margin: 0 0 25px; padding: 0; border: 0; }
.projects .project-toolbar .filters {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin: 0;
}
.projects .project-toolbar .filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 46px;
  padding: 9px 17px;
  border: 1px solid #d1c9bb;
  border-radius: 999px;
  background: var(--paper);
  color: #615a4d;
  font-size: 1rem;
  line-height: 1.6;
  white-space: normal;
  text-align: center;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.projects .project-toolbar .filter::before {
  content: '';
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8a6c3d;
  opacity: 0;
  transform: scale(.5);
  transition: opacity 180ms ease, transform 180ms ease;
}
.projects .project-toolbar .filter:hover { border-color: #b4a48a; transform: translateY(-2px); }
.projects .project-toolbar .filter.active { border-color: #a68b5e; background: #e7e1d5; color: var(--ink); }
.projects .project-toolbar .filter.active::before { opacity: 1; transform: scale(1); }

@media (max-width: 900px) {
  .collection-switcher { flex-wrap: wrap; gap: 8px; }
  .collection-switcher .collection-tabs { flex-basis: 100%; }
  .collection-switcher #saved-filter { width: 100%; padding-block: 10px; }
  .collection-switcher #saved-filter::before { top: -4px; left: 12px; right: 12px; bottom: auto; width: auto; height: 1px; }
}
@media (max-width: 600px) {
  .collection-switcher { margin-top: 0; margin-bottom: 22px; padding: 7px; border-radius: 22px; }
  .collection-switcher .collection-tab { flex-direction: column; min-height: 92px; padding: 12px 5px; gap: 6px; font-size: .9375rem; }
  .collection-switcher .collection-tab > span { font-size: .8125rem; }
  .collection-tools { flex-direction: column; align-items: stretch; gap: 13px; margin-bottom: 16px; }
  .collection-tools .project-search { width: 100%; flex: auto; }
  .projects .project-toolbar .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .projects .project-toolbar .filter { min-width: 0; min-height: 48px; padding: 9px 10px; gap: 6px; font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) {
  .collection-indicator, .collection-switcher .collection-tab,
  .collection-switcher .collection-tab > span, .collection-switcher #saved-filter,
  .collection-tools .project-search, .projects .project-toolbar .filter,
  .projects .project-toolbar .filter::before { transition: none; }
  .projects .project-toolbar .filter:hover { transform: none; }
}
