:root {
  --control-sidebar-width: clamp(300px, 24vw, 360px);
}

.control-sidebar {
  --control-sidebar-font-title: 17px;
  --control-sidebar-font-body: 13.5px;
  --control-sidebar-font-compact: 13px;
  --control-sidebar-font-meta: 12px;
  --control-sidebar-font-label: 11px;
  --control-sidebar-font-micro: 10px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--control-sidebar-width);
  z-index: 14;
  background: #fbfbf8;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.04);
  /* Match docs/style.css body stack so labels like Scale don't fall back to a different UI font. */
  font-family: "Inter", "Noto Sans Hebrew", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--control-sidebar-font-body);
  line-height: 1.4;
  color: #1f2937;
}

.control-sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.control-sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 14px 12px;
  background: linear-gradient(135deg, var(--app-accent-deep) 0%, var(--app-accent) 100%);
  color: #fff;
}

.control-sidebar-heading h2 {
  margin: 0;
  font-size: var(--control-sidebar-font-title);
  font-weight: 700;
  line-height: 1.2;
}

.control-sidebar-heading p {
  margin: 4px 0 0;
  font-size: var(--control-sidebar-font-meta);
  opacity: 0.88;
}

.control-sidebar-header .info-btn {
  flex-shrink: 0;
  margin-top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.control-sidebar-header .info-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.control-sidebar-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 18px;
}

.control-sidebar-legend {
  flex: 0 0 auto;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px 14px 14px;
  background: #f7f6f1;
}

.control-section {
  padding: 12px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.control-section:last-child {
  border-bottom: none;
}

.control-section .section-title,
.control-section .subsection-title {
  font-family: inherit;
  font-size: var(--control-sidebar-font-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  margin-bottom: 8px;
}

.walk-filter-block + .walk-filter-block {
  margin-top: 10px;
}

.metric-options {
  display: flex;
  gap: 6px;
}

.metric-options.segmented-options,
.radius-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  transition: background 0.15s ease;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #374151;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
  flex: 1;
  justify-content: center;
}

.radio-option:active {
  transform: scale(0.96);
}

.segmented-options > label {
  border: none;
  background: transparent;
  border-radius: 6px;
  color: #6b7280;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.segmented-options > label:hover {
  border-color: transparent;
  color: #374151;
}

.segmented-options > label:active {
  transform: scale(0.96);
}

.radio-option input {
  display: none;
}

.radio-option input:checked ~ span {
  color: var(--app-accent);
}

.radio-option:has(input:checked) {
  border-color: var(--app-accent);
  background: #eff6ff;
}

.segmented-options > label:has(input:checked) {
  border-color: transparent;
  background: #fff;
  color: var(--app-accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.segment-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #374151;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  flex: 1;
  justify-content: center;
}

.radio-option:hover {
  border-color: #93c5fd;
}

.segmented-options > label input {
  display: none;
}

.filter-dropdown {
  position: relative;
}

.filter-btn {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.filter-btn:active {
  transform: scale(0.98);
}

.filter-btn-label-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35em;
  min-width: 0;
  text-align: left;
}

.filter-label-prefix {
  color: #6b7280;
  flex-shrink: 0;
}

.filter-btn:hover {
  border-color: var(--app-accent);
}

.filter-btn svg {
  color: #9ca3af;
  transition: transform 0.2s;
}

.filter-btn.open svg {
  transform: rotate(180deg);
}

.filter-popup {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  z-index: 200;
  max-height: min(360px, calc(100vh - 240px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
  padding: 6px;
}

.filter-popup.show {
  display: block;
}

.filter-popup::-webkit-scrollbar {
  width: 6px;
}

.filter-popup::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

.filter-popup::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.filter-popup::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

#filter-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-items--weighted {
  gap: 4px;
}

.filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 150;
}

.filter-backdrop.show {
  display: block;
}

.filter-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: #374151;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-item:hover {
  background: var(--row-accent-soft, #f9fafb);
}

.filter-item:has(input:checked) {
  background: var(--row-accent-soft, rgba(59, 130, 246, 0.08));
  border-color: var(--row-accent-strong, rgba(59, 130, 246, 0.45));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.filter-items--weighted .filter-item {
  padding: 10px 12px;
  border-radius: 10px;
}

.filter-items--weighted .filter-item .filter-type-pill {
  font-size: var(--control-sidebar-font-compact);
  padding: 4px 10px;
}

.filter-item input {
  width: 14px;
  height: 14px;
  accent-color: var(--row-accent, var(--app-accent));
  cursor: pointer;
  flex-shrink: 0;
}

.filter-type-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--pill-border, rgba(107, 114, 128, 0.3));
  background: var(--pill-bg, rgba(107, 114, 128, 0.12));
  color: var(--pill-color, #374151);
  font-weight: 600;
  line-height: 1.3;
}

.filter-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 4px 0;
}

.radius-opt,
.mode-opt {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.radius-opt {
  padding: 6px 0;
  font-weight: 500;
  color: #6b7280;
}

.radius-opt:hover {
  color: #374151;
}

.radius-opt.active,
.mode-opt.active {
  background: #fff;
  color: var(--app-accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.radius-opt:active,
.mode-opt:active {
  transform: scale(0.96);
}

.mode-toggle {
  display: flex;
  gap: 4px;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 3px;
  transition: background 0.15s ease;
}

.mode-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  color: #6b7280;
  font-size: var(--control-sidebar-font-meta);
  line-height: 1.2;
}

.mode-opt svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.mode-opt.active svg {
  transform: scale(1.05);
}

.hint {
  font-size: var(--control-sidebar-font-micro);
  color: #9ca3af;
  margin-top: 6px;
}

.indicators-tree {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.indicator-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.indicator-subs {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  transition: grid-template-rows 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-subs.is-open {
  grid-template-rows: 1fr;
}

.indicator-subs-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
  transition: padding-top 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-subs.is-open .indicator-subs-inner {
  padding-top: 2px;
  padding-bottom: 2px;
}

.indicator-subgroup {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.indicator-detail-subs {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  transition: grid-template-rows 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator-detail-subs.is-open {
  grid-template-rows: 1fr;
}

.indicator-detail-subs-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow: hidden;
  margin-inline-start: 18px;
  padding-inline-start: 6px;
  border-inline-start: 1px solid rgba(15, 23, 42, 0.1);
}

.indicator-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease;
}

.indicator-row--sub {
  margin-left: 12px;
  background: #fafaf8;
}

.indicator-row--diagnostic {
  margin-left: 0;
}

.indicator-row--overall {
  border-color: rgba(37, 99, 235, 0.18);
  background: #f8fbff;
}

.indicator-row--category {
  background: #fcfcfb;
}

.indicator-row--category:hover {
  background: #f8fafc;
}

.indicator-row--category .indicator-label-wrap {
  cursor: pointer;
}

.indicator-row--aux {
  margin-top: 6px;
  padding: 4px;
  background: #f6f8fb;
  border-style: dashed;
  transition: background 0.15s ease;
}

.indicator-row--aux .segmented-options {
  width: 100%;
}

.indicator-row--aux .segmented-options > label:hover {
  color: var(--app-accent);
}

.indicator-group--survey {
  margin-top: 6px;
}

.survey-category-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  background: var(--survey-category-color);
  color: var(--survey-category-color);
  font-size: 12px;
  line-height: 1;
}

.survey-category-swatch[data-shape="diamond"] {
  transform: rotate(45deg);
}

.survey-category-swatch[data-shape="triangle"] {
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.survey-category-swatch[data-shape="heart"] {
  width: 11px;
  height: 11px;
  background: transparent;
  color: var(--survey-category-color);
}

.survey-category-swatch[data-shape="circle"] {
  border-radius: 50%;
}

.survey-overlay-scope {
  margin: 4px 8px 2px 20px;
  font-size: var(--control-sidebar-font-meta);
  color: #9ca3af;
  line-height: 1.3;
}

.indicator-label-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.indicator-label-wrap .horizon-icon {
  flex-shrink: 0;
  display: inline-block;
  background-color: var(--horizon-icon-color, #64748b);
  -webkit-mask-image: var(--horizon-icon-url);
  mask-image: var(--horizon-icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  /* Optical weight at 14–16px without growing the hit box */
  filter:
    drop-shadow(0.45px 0 0 var(--horizon-icon-color, #64748b))
    drop-shadow(-0.45px 0 0 var(--horizon-icon-color, #64748b))
    drop-shadow(0 0.45px 0 var(--horizon-icon-color, #64748b))
    drop-shadow(0 -0.45px 0 var(--horizon-icon-color, #64748b));
}

.indicator-row--category .indicator-label-wrap .horizon-icon {
  width: 19px;
  height: 19px;
}

.indicator-row--sub .indicator-label-wrap .horizon-icon {
  width: 17px;
  height: 17px;
  filter:
    drop-shadow(0.55px 0 0 var(--horizon-icon-color, #64748b))
    drop-shadow(-0.55px 0 0 var(--horizon-icon-color, #64748b))
    drop-shadow(0 0.55px 0 var(--horizon-icon-color, #64748b))
    drop-shadow(0 -0.55px 0 var(--horizon-icon-color, #64748b));
}

.indicator-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.28s ease, color 0.15s ease, background 0.15s ease;
}

.indicator-row--subcategory:not([data-detail-parent-id]) .indicator-label-wrap::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.indicator-collapse-btn:hover {
  color: var(--app-accent);
  background: rgba(37, 99, 235, 0.08);
}

.indicator-collapse-btn:active {
  transform: scale(0.92);
}

.indicator-collapse-btn.is-expanded {
  transform: rotate(90deg);
}

.indicator-collapse-btn.is-expanded:active {
  transform: rotate(90deg) scale(0.92);
}

.indicator-label {
  flex: 1;
  min-width: 0;
  color: #1f2937;
  line-height: 1.3;
}

.indicators-weighted-block {
  margin-bottom: 4px;
}

.indicators-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 6px;
}

.indicators-section-head .section-title {
  margin-bottom: 0;
}

.indicator-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.indicator-actions-cols {
  display: grid;
  grid-template-columns: 34px 40px;
  gap: 10px;
  align-items: center;
  justify-items: center;
}

.indicator-heat-spacer {
  display: block;
  width: 100%;
  height: 1px;
  visibility: hidden;
  pointer-events: none;
}

.indicator-actions-cols--titles {
  flex-shrink: 0;
}

.indicator-action-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: var(--control-sidebar-font-micro);
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
  cursor: default;
}

#indicators-section.is-neighborhood-scale .indicator-action-title--view,
#indicators-section.is-neighborhood-scale .indicator-show-btn {
  display: none;
}

#indicators-section.is-neighborhood-scale .indicator-actions-cols,
#indicators-section.is-neighborhood-scale .indicator-actions-cols--titles {
  grid-template-columns: 40px;
}

.indicator-show-btn,
.indicator-heat-btn {
  width: 100%;
  justify-content: center;
}

.indicator-btn--icon-only {
  padding: 4px 6px;
  gap: 0;
}

.indicator-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  font-size: var(--control-sidebar-font-label);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.indicator-btn:hover:not(:disabled) {
  border-color: #93c5fd;
  color: var(--app-accent);
}

.indicator-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.indicator-btn.is-active {
  border-color: var(--app-accent);
  background: #eff6ff;
  color: var(--app-accent);
}

.indicator-show-btn.is-mixed {
  border-style: dashed;
  background: repeating-linear-gradient(
    135deg,
    #fff,
    #fff 3px,
    #eff6ff 3px,
    #eff6ff 6px
  );
  color: var(--app-accent);
}

.indicator-btn.is-disabled,
.indicator-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.control-sidebar-legend .legend-title {
  font-size: var(--control-sidebar-font-meta);
  font-weight: 700;
  color: #374151;
  margin-bottom: 2px;
}

.control-sidebar-legend .legend-subtitle {
  font-size: var(--control-sidebar-font-label);
  color: #6b7280;
  margin-bottom: 8px;
}

.control-sidebar-legend .legend-empty {
  font-size: var(--control-sidebar-font-meta);
  color: #6b7280;
}

.legend-block + .legend-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.legend-gradient {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #dc2626, #ea580c, #ca8a04, #65a30d, #16a34a);
  margin-bottom: 4px;
}

.legend-gradient--kids-population {
  background: linear-gradient(
    to right,
    #bfdbfe,
    #93c5fd 15%,
    #60a5fa 35%,
    #2563eb 60%,
    #1e3a8a
  );
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.legend-item-chip {
  font-size: var(--control-sidebar-font-micro);
  color: #4b5563;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 2px 6px;
  line-height: 1.2;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: var(--control-sidebar-font-micro);
  color: #9ca3af;
}

.legend-axis-groups {
  display: flex;
  width: 100%;
  font-size: var(--control-sidebar-font-micro);
  color: #8b97aa;
  line-height: 1.2;
}

.legend-axis-group {
  position: relative;
  min-width: 0;
  padding-top: 8px;
  text-align: center;
  white-space: nowrap;
  cursor: help;
}

.legend-axis-group::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  right: 2px;
  border-top: 1px solid rgba(100, 116, 139, 0.42);
}

.legend-axis-group::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 5px;
  background: rgba(100, 116, 139, 0.46);
}

.legend-axis-group:last-child::after {
  box-shadow: calc(100% - 1px) 0 0 rgba(100, 116, 139, 0.46);
}

.legend-axis-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: block;
  max-width: 120px;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.94);
  color: #fff;
  font-size: var(--control-sidebar-font-micro);
  font-weight: 600;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: normal;
}

.legend-axis-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(17, 24, 39, 0.94);
}

.legend-axis-group:hover .legend-axis-tooltip,
.legend-axis-group:focus .legend-axis-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .indicator-actions-cols {
    gap: 6px;
  }

  .indicator-row {
    gap: 4px;
  }

  #amenity-filter-section {
    flex: 1.2;
  }

  #radius-section {
    flex: 1;
  }

  .hint {
    display: none;
  }

  .filter-dropdown {
    position: relative;
    z-index: 100;
  }

  .filter-btn {
    width: 100%;
    padding: 0 12px;
    font-size: 13px;
    height: 40px;
    min-height: 40px;
    border-radius: 10px;
    background: #f5f5f5;
    border: none;
    font-weight: 500;
    color: #374151;
  }

  .filter-btn:active {
    background: #ebebeb;
  }

  .radius-toggle {
    background: #f0f0f0;
    border-radius: 10px;
    height: 40px;
    padding: 3px;
  }

  .radius-opt {
    font-size: 13px;
    border-radius: 8px;
    padding: 0;
    line-height: 34px;
  }

  .radius-opt:active {
    background: rgba(255, 255, 255, 0.5);
  }

  .mode-toggle {
    height: 36px;
    padding: 3px;
    border-radius: 10px;
    background: #f0f0f0;
  }

  .mode-opt {
    font-size: 12px;
    border-radius: 8px;
    padding: 0;
    gap: 3px;
  }

  .mode-opt svg {
    width: 12px;
    height: 12px;
  }

  .filter-popup {
    display: none;
    flex-direction: column;
    max-height: 70vh;
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    padding: 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    z-index: 200;
    overflow: hidden;
  }

  .filter-popup.show {
    display: flex;
  }

  .filter-popup::before {
    content: "";
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 12px auto 12px;
  }

  .filter-popup #filter-items {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 4px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }

  .filter-item {
    padding: 14px 12px;
    font-size: 15px;
    min-height: 48px;
    border-radius: 8px;
  }

  .filter-type-pill {
    padding: 4px 10px;
  }

  .filter-item:active {
    background: #f5f5f5;
  }

  .filter-item input {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }
}

@media (max-width: 360px) {
  .filter-btn {
    font-size: 12px;
    padding: 0 10px;
    height: 36px;
    min-height: 36px;
  }

  .radius-toggle {
    height: 36px;
    padding: 2px;
  }

  .radius-opt {
    font-size: 11px;
    line-height: 32px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .filter-btn,
  .filter-item,
  .info-btn,
  .radius-opt {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .indicator-subs,
  .indicator-subs-inner,
  .indicator-detail-subs,
  .indicator-detail-subs-inner,
  .indicator-collapse-btn,
  .indicator-btn,
  .indicator-row,
  .mode-opt,
  .mode-opt svg,
  .radius-opt,
  .segmented-options > label,
  .filter-btn,
  .metric-options.segmented-options,
  .radius-toggle {
    transition: none;
  }
}
