:root {
  color-scheme: light dark;

  /* Core Brand & Surfaces (Light) */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --accent-text: #0369a1;
  --primary-light: #e0f2fe;
  --primary-focus: rgba(2, 132, 199, 0.25);

  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-subtle: #f3f4f6;
  --border: #e5e7eb;
  --border-subtle: #f1f5f9;
  --border-strong: #94a3b8;

  --text: #0f172a;
  --text-muted: #475569;

  /* Semantic Status Tokens */
  --accent-free: #15803d;
  --accent-free-bg: #f0fdf4;
  --accent-warn: #92400e;
  --accent-warn-bg: #fffbeb;
  --accent-warn-border: #fde68a;

  /* Elevation & Shape */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.18);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Strict 3-Size Body Scale */
  --text-lg: 1.0625rem;
  --text-base: 0.875rem;
  --text-sm: 0.8125rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 160ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #0284c7;
    --primary-hover: #0ea5e9;
    --accent-text: #7dd3fc;
    --primary-light: rgba(56, 189, 248, 0.15);
    --primary-focus: rgba(56, 189, 248, 0.3);

    --bg: #0b1120;
    --surface: #111827;
    --surface-subtle: #1e293b;
    --border: #1f2937;
    --border-subtle: #1e293b;
    --border-strong: #475569;

    --text: #f8fafc;
    --text-muted: #94a3b8;

    --accent-free: #86efac;
    --accent-free-bg: rgba(22, 163, 74, 0.16);
    --accent-warn: #fcd34d;
    --accent-warn-bg: rgba(245, 158, 11, 0.16);
    --accent-warn-border: rgba(245, 158, 11, 0.35);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
    --shadow-sm: 0 8px 20px -4px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
  }
}

@media (forced-colors: active) {
  :root {
    --primary: Highlight;
    --primary-hover: Highlight;
    --accent-text: LinkText;
    --bg: Canvas;
    --surface: Canvas;
    --surface-subtle: Canvas;
    --border: CanvasText;
    --border-subtle: CanvasText;
    --border-strong: CanvasText;
    --text: CanvasText;
    --text-muted: GrayText;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: var(--text-base);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.5;
  text-align: start;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.skip-link:focus-visible {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

:where(a, button, input, [tabindex="0"]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  border-radius: var(--radius-sm);
}

.brand-mark {
  flex-shrink: 0;
  display: block;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.brand-badge {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.suggest-header-link,
.filter-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-block-size: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.suggest-header-link:hover,
.filter-header-btn:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

.filter-header-btn.active {
  background: var(--primary-light);
  border-color: color-mix(in oklab, var(--primary) 35%, transparent);
  color: var(--accent-text);
  font-weight: 600;
}

.filter-count-badge {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.filter-count-badge.hidden {
  display: none !important;
}

.location-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-block-size: 36px;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  max-width: 210px;
  min-width: 0;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.location-switcher-btn:hover {
  background: var(--surface-subtle);
  border-color: var(--text-muted);
}

.location-pin-icon {
  color: var(--accent-text);
  flex-shrink: 0;
}

.location-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.caret-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Main Layout */
.main-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.main-layout:focus {
  outline: none;
}

/* Unified Discovery Toolbar */
.discovery-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.discovery-tabs-section {
  min-width: 0;
}

.discovery-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.discovery-tabs::-webkit-scrollbar {
  display: none;
}

.discovery-tab {
  position: relative;
  flex: none;
  min-block-size: 42px;
  padding: 0.55rem 0.1rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.discovery-tab:hover {
  color: var(--text);
}

.discovery-tab[aria-selected="true"],
.discovery-tab.active {
  color: var(--text);
}

.discovery-tab[aria-selected="true"]::after,
.discovery-tab.active::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--primary);
}

/* Connected Segmented Radius Control */
.radius-bar-section {
  padding-bottom: 0.5rem;
  flex-shrink: 0;
}

.radius-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.radius-pill {
  min-width: 54px;
  min-block-size: 30px;
  padding: 0.3rem 0.7rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.radius-pill:hover {
  color: var(--text);
}

.radius-pill.active,
.radius-pill[aria-checked="true"] {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

/* Feed Meta Row */
.feed-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: 0.5rem 0;
}

.feed-meta-row:has(.loading-label.hidden),
.feed-meta-row:has(.loading-label[style*="display: none"]),
.feed-meta-row:empty {
  display: none !important;
}

.loading-label,
.result-count-label {
  font-weight: 500;
}

.loading-label.hidden,
.result-count-label.hidden {
  display: none !important;
}

/* Feed Container */
.feed-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .feed-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .feed-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* Minimalist 4-Tier Listing Card */
.activity-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.125rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
  height: 100%;
  cursor: pointer;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-strong);
}

.activity-card-unverified {
  cursor: default;
}

.activity-card-unverified:hover {
  transform: none;
  box-shadow: var(--shadow-xs);
  border-color: var(--border);
}

/* Deep-link Activity Highlight Pulse */
.activity-card.highlight-pulse {
  animation: card-pulse 2s var(--ease-out);
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-focus), var(--shadow-sm);
}

@keyframes card-pulse {
  0% {
    transform: scale(1.015);
    box-shadow: 0 0 0 6px var(--primary-focus), var(--shadow-sm);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 transparent, var(--shadow-xs);
  }
}

/* Tier 1: Flat Typographic Metadata */
.card-tier-1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-sm);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  border-radius: 6px;
}

.badge-sport,
.badge-category {
  color: var(--text-muted);
  text-transform: capitalize;
  padding: 0;
  background: transparent;
}

.badge-cost {
  color: var(--text-muted);
  padding: 0.1rem 0.45rem;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.badge-cost.badge-free {
  background: var(--accent-free-bg);
  color: var(--accent-free);
  border-color: transparent;
  font-weight: 600;
}

.badge-unverified {
  background: var(--accent-warn-bg);
  color: var(--accent-warn);
  border: 1px solid var(--accent-warn-border);
  padding: 0.1rem 0.45rem;
}

.badge-distance {
  color: var(--accent-text);
  font-weight: 600;
  margin-left: auto;
  white-space: nowrap;
  padding: 0;
  background: transparent;
}

/* Tier 2: Title, Schedule & Description */
.card-tier-2 {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
  max-width: 100%;
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 650;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.card-schedule {
  font-size: var(--text-base);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.4;
  min-width: 0;
}

.schedule-icon {
  flex-shrink: 0;
  margin-top: 0.18rem;
  color: var(--text-muted);
}

.card-description {
  font-size: var(--text-base);
  color: var(--text-muted);
  line-height: 1.5;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.card-contact {
  font-size: var(--text-sm);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

.card-address {
  font-size: var(--text-base);
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}

/* Tier 3: Hairline Divider & Outbound Location */
.card-tier-3 {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-base);
  line-height: 1.4;
  min-width: 0;
  max-width: 100%;
}

.card-venue-row,
.card-organizer-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
}

.venue-icon,
.organizer-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.card-venue-row {
  cursor: pointer;
  border-radius: 6px;
  padding: 0.15rem 0.25rem;
  margin: -0.15rem -0.25rem;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.card-venue-row:hover {
  background-color: var(--surface-subtle);
}

.venue-name {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  transition: color var(--duration-fast) var(--ease-out);
}

.venue-name:hover,
.venue-name:focus-visible,
.card-venue-row:hover .venue-name {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.venue-card .card-venue-row,
.organizer-card .card-venue-row {
  align-items: flex-start;
}

.venue-card .card-venue-row .venue-name,
.organizer-card .card-venue-row .venue-name {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
}

.venue-card .card-venue-row .venue-icon,
.organizer-card .card-venue-row .venue-icon {
  margin-top: 0.18rem;
}

.organizer-name {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

/* Secondary Source Reference links row */
.card-secondary-sources {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
  font-size: var(--text-sm);
  line-height: 1.4;
  color: var(--text-muted);
  min-width: 0;
  max-width: 100%;
}

.secondary-sources-label {
  font-weight: 500;
  flex-shrink: 0;
}

.secondary-sources-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.secondary-source-link {
  color: var(--accent-text);
  font-weight: 500;
  text-decoration: none;
  padding: 0.1rem 0.15rem;
  border-radius: 4px;
}

.secondary-source-link:hover,
.secondary-source-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.secondary-source-sep {
  color: var(--text-muted);
}

/* Tier 4: Quiet Footer */
.card-tier-4 {
  margin-top: auto;
  padding-top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.suggest-edit-link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 100%;
  transition: color var(--duration-fast) var(--ease-out);
}

.suggest-edit-link:hover {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-block-size: 42px;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  transition: background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-outline:hover {
  background: var(--surface-subtle);
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--surface-subtle);
  color: var(--text-muted);
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: 650;
  color: var(--text);
  text-wrap: balance;
}

.empty-state-message {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 42ch;
  text-wrap: pretty;
}

.empty-state-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 280px;
  margin-top: 0.5rem;
}

/* Location Gate Modal / Overlay */
.location-gate-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.location-gate-overlay.hidden {
  display: none !important;
}

.location-gate-card {
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 440px;
  width: 100%;
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  position: relative;
}

.gate-hero-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--accent-text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gate-title {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  font-weight: 700;
  text-align: center;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.gate-subtitle {
  font-size: var(--text-base);
  color: var(--text-muted);
  text-align: center;
  text-wrap: pretty;
}

.gate-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0.15rem 0;
}

.gate-divider::before,
.gate-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.gate-divider span {
  padding: 0 0.75rem;
}

.suburb-search-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.input-with-icon {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  transition: border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}

.input-with-icon:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.search-icon {
  color: var(--text-muted);
  margin-right: 0.55rem;
  flex-shrink: 0;
}

.input-with-icon input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-size: var(--text-base);
  padding: 0.7rem 0;
  color: var(--text);
}

.input-with-icon input::placeholder {
  color: var(--text-muted);
}

.suburb-suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin-top: 6px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
  z-index: 200;
  display: none;
}

.suburb-suggestions-list.visible {
  display: block;
}

.suggestion-item {
  padding: 0.65rem 0.85rem;
  font-size: var(--text-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--duration-fast) var(--ease-out);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
  background: var(--primary-light);
  color: var(--accent-text);
}

.suggestion-postcode {
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  background: var(--surface-subtle);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}

.gate-quick-presets {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.presets-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-preset {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  min-block-size: 32px;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.chip-preset:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--accent-text);
}

.gate-close-btn,
.filter-close-btn {
  background: transparent;
  border: none;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--text);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.gate-close-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
}

.gate-close-btn:hover,
.filter-close-btn:hover {
  background: var(--surface-subtle);
  color: var(--text);
}

/* Dedicated Multi-Category Sport Filter View (/#filters) */
.filter-view-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
}

.filter-view-overlay.hidden {
  display: none !important;
}

.filter-view-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: min(86dvh, 720px);
  margin: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filter-view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.filter-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.filter-view-title {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.filter-view-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1 1 auto;
}

.filter-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.filter-section-title {
  font-size: var(--text-lg);
  font-weight: 650;
  color: var(--text);
  margin: 0;
}

.filter-sport-subcategories {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.filter-instructions {
  font-size: var(--text-base);
  color: var(--text-muted);
}

.sport-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sport-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-block-size: 38px;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    color var(--duration-fast) var(--ease-out);
}

.sport-filter-chip:hover {
  background: var(--surface-subtle);
  border-color: var(--border-strong);
}

.sport-filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.chip-icon {
  font-size: 1rem;
  line-height: 1;
}

.filter-view-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  gap: 0.75rem;
  flex-shrink: 0;
}

.filter-view-footer .btn {
  flex: 1;
}

/* Responsive / Small Screen Breakpoints */
@media (max-width: 640px) {
  .suggest-btn-text,
  .filter-btn-text,
  .brand-badge {
    display: none;
  }

  .header-container {
    padding: 0.55rem 0.9rem;
    gap: 0.5rem;
  }

  .header-actions {
    gap: 0.35rem;
    flex-shrink: 1;
  }

  .suggest-header-link,
  .filter-header-btn {
    padding: 0.4rem 0.55rem;
    min-block-size: 36px;
    flex-shrink: 0;
  }

  .location-switcher-btn {
    max-width: min(180px, 46vw);
    padding: 0.4rem 0.65rem;
    font-size: var(--text-sm);
    gap: 0.3rem;
    flex-shrink: 1;
  }

  .main-layout {
    padding: 0.85rem 0.9rem 2rem;
    gap: 0.85rem;
  }

  .discovery-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    border-bottom: none;
  }

  .discovery-tabs-section {
    border-bottom: 1px solid var(--border);
  }

  .discovery-tabs {
    gap: 0.5rem;
    justify-content: space-between;
  }

  .discovery-tab {
    flex: 1 0 auto;
    padding: 0.5rem 0.35rem 0.65rem;
  }

  .radius-bar-section {
    padding-bottom: 0;
  }

  .radius-pill-group {
    display: flex;
    width: 100%;
  }

  .radius-pill {
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0.4rem;
  }

  .feed-container {
    gap: 0.85rem;
  }

  .activity-card {
    padding: 1rem;
    gap: 0.65rem;
  }

  /* Location Gate Responsive */
  .location-gate-overlay {
    padding: 0.75rem;
  }

  .location-gate-card {
    padding: 1.5rem 1.25rem;
    gap: 0.9rem;
    max-height: calc(100dvh - 1.5rem);
    border-radius: var(--radius-lg);
  }

  /* Full-height Filter Sheet on Mobile */
  .filter-view-overlay {
    padding: 0;
  }

  .filter-view-modal {
    max-width: 100%;
    max-height: 100dvh;
    height: 100%;
    border-radius: 0;
    border: none;
  }

  .filter-view-header {
    padding: 0.9rem 1rem;
  }

  .filter-view-body {
    padding: 1rem;
    gap: 1rem;
  }

  .sport-filter-chip {
    padding: 0.4rem 0.75rem;
    font-size: var(--text-sm);
  }

  .filter-view-footer {
    padding: 0.85rem 1rem;
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom));
    gap: 0.6rem;
  }
}

@media (max-width: 360px) {
  .brand-name {
    font-size: 1.05rem;
  }

  .brand-badge {
    display: none;
  }

  .location-switcher-btn {
    max-width: 118px;
    padding: 0.35rem 0.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
