.filter-pill-shell {
  position: relative;
  width: min(100%, 680px);
  margin: 0 0 18px;
}

.filter-pill-shell.is-compact {
  width: max-content;
  max-width: 100%;
  margin-bottom: 0;
}

.filter-pill-wrap {
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.filter-pill-wrap::-webkit-scrollbar {
  display: none;
}

.filter-pill-shell.has-overflow .filter-pill-wrap {
  padding-right: 50px;
}

.gallery-filter {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 22px;
  border: 1px solid rgba(120, 90, 70, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  color: rgba(92, 61, 46, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.gallery-filter:hover {
  color: rgba(61, 43, 31, 0.9);
  background: rgba(255, 255, 255, 0.54);
  border-color: rgba(120, 90, 70, 0.24);
}

.gallery-filter:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.62);
}

.gallery-filter:focus-visible {
  outline: 3px solid rgba(217, 123, 74, 0.34);
  outline-offset: 2px;
}

.gallery-filter.active,
.gallery-filter[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.72);
  color: #C4612A;
  border-color: rgba(217, 123, 74, 0.28);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 2px 8px rgba(92, 61, 46, 0.07);
}

.filter-pill-fade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: none;
  width: 64px;
  background: linear-gradient(90deg, rgba(255, 248, 239, 0), rgba(255, 248, 239, 0.66) 64%, rgba(255, 248, 239, 0.92));
  pointer-events: none;
}

.filter-pill-next {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 3;
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(92, 61, 46, 0.84);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.filter-pill-next:hover {
  color: #5C3D2E;
}

.filter-pill-next:focus-visible {
  outline: 3px solid rgba(217, 123, 74, 0.34);
  outline-offset: 2px;
}

.filter-pill-shell.has-overflow:not(.is-at-end) .filter-pill-fade,
.filter-pill-shell.has-overflow:not(.is-at-end) .filter-pill-next {
  display: flex;
}

@media (max-width: 760px) {
  .filter-pill-shell:not(.is-compact) {
    width: 100%;
  }
}
