.top-stack {
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.top-stack > * {
  pointer-events: auto;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 10px 10px 10px 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.search-pill .icon-btn .material-symbols-outlined {
  color: var(--ink-soft);
}

.search-pill input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-base);
  color: var(--ink);
}

.search-pill input::placeholder {
  color: var(--ink-soft);
  opacity: 0.75;
}

.search-pill .divider {
  width: 1.5px;
  height: 22px;
  background: var(--line);
  flex: none;
}

.search-pill .locate {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--marigold);
  flex: none;
}

.search-pill .locate .material-symbols-outlined {
  color: var(--ink);
}

.search-pill .locate:hover {
  background: var(--marigold-deep);
}

.filters-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-scroll-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.filter-scroll-btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.filter-scroll-btn.hidden {
  display: none;
}

#filters {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  flex: 1;
  min-width: 0;
  padding: 2px;
}

#filters::-webkit-scrollbar {
  display: none;
}

#filters button {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex: none;
  scroll-snap-align: start;
  background: var(--surface);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  font-size: var(--text-xs);
  font-weight: 600;
  box-shadow: 0 6px 14px -10px rgba(46, 27, 15, 0.4);
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

#filters button .material-symbols-outlined {
  font-size: 18px;
}

#filters button:hover {
  border-color: var(--marigold);
}

#filters button.active {
  background: var(--marigold);
  color: var(--ink);
  border-color: transparent;
}

#filters button#Saved.active {
  background: var(--sage);
  color: var(--surface);
}
