:root {
  --bg: #f4f7fc;
  --surface: #ffffff;
  --navy: #10192f;
  --text: #1f2937;
  --muted: #6b7280;
  --chip-blue: #2563eb;
  --chip-light: #dbeafe;
  --border: #e5e7eb;
  --explore-top-offset: 90px;
  --mobile-bottom-nav-height: 0px;
  --explore-desktop-gutter: 20px;
  --mobile-event-rail-height: clamp(200px, 26dvh, 228px);
}

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

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
}

main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.explore-page {
  width: 100%;
  max-width: 100%;
  padding: 0;
  min-height: calc(100dvh - var(--explore-top-offset));
}

.explore-shell {
  width: calc(100% - (2 * var(--explore-desktop-gutter)));
  max-width: none;
  margin: 0 auto;
  height: calc(100dvh - var(--explore-top-offset));
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0 1.25rem;
  position: relative;
}

.controls-panel {
  position: relative;
  z-index: 26;
  background: #ffffff;
  border: 1px solid #d7e3f3;
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(15, 47, 99, 0.1), 0 2px 8px rgba(15, 23, 42, 0.04);
  padding: 0.85rem 0.95rem 0.8rem;
}

.toolbar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  justify-content: stretch;
  gap: 0.62rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
}

.search-bar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #cfdff2;
  border-radius: 16px;
  padding: 0.28rem 0.36rem;
  display: flex;
  gap: 0.62rem;
  align-items: center;
  min-height: 46px;
  width: 100%;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 3px rgba(15, 47, 99, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.search-bar:focus-within {
  border-color: #9ec2f8;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.52rem 0.75rem 0.52rem 0;
  font-size: 0.96rem;
  color: #172033;
}

.search-bar input::placeholder {
  color: #73849a;
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  margin-left: 0.5rem;
  flex: 0 0 auto;
}

.search-icon svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-bar input:focus {
  outline: none;
}

.icon-btn {
  border: 1px solid #d0ddf3;
  border-radius: 12px;
  background: #fff;
  color: #1e3a8a;
  height: 42px;
  width: 42px;
  cursor: pointer;
  font-size: 1rem;
}

.search-clear-btn {
  background: #eff6ff;
  height: 34px;
  width: 34px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.48rem;
  margin-top: 0.72rem;
  align-items: center;
}

.desktop-category-row {
  justify-content: center;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 0.08rem;
}

.date-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.chip,
.filter-pill {
  border: 1px solid #d9e2f2;
  border-radius: 999px;
  padding: 0.42rem 0.78rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.chip {
  background: #ffffff;
  color: color-mix(in srgb, var(--category-color-text, #1e40af) 78%, #64748b);
  border-color: color-mix(in srgb, var(--category-color-border, #d9e2f2) 45%, #e2e8f0);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-weight: 550;
  line-height: 1.05;
  min-height: 34px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgb(15 23 42 / 5%);
  transition:
    transform 0.18s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.chip-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  flex: 0 0 20px;
  object-fit: contain;
  display: block;
  opacity: 0.84;
  filter: saturate(0.9);
  transition:
    opacity 0.2s ease,
    filter 0.2s ease;
}

.chip-all {
  color: color-mix(in srgb, #1d4ed8 76%, #64748b);
  border-color: color-mix(in srgb, #c7d2fe 55%, #e2e8f0);
}

.chip:hover {
  background: color-mix(in srgb, var(--category-color-bg, #dbeafe) 38%, #ffffff);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgb(15 23 42 / 11%);
  border-color: color-mix(in srgb, var(--category-color-border, #bfdbfe) 62%, #cbd5e1);
}

.chip:hover .chip-icon {
  opacity: 0.95;
  filter: saturate(1);
}

.chip:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.chip-active {
  background: color-mix(in srgb, var(--category-color-bg, #dbeafe) 82%, #ffffff);
  color: color-mix(in srgb, var(--category-color-text, #1e40af) 92%, #0f172a);
  border-color: color-mix(in srgb, var(--category-color-border, #1d4ed8) 82%, var(--category-color-text, #1e40af));
  box-shadow: 0 9px 20px rgb(15 23 42 / 14%), 0 2px 8px color-mix(in srgb, var(--category-color-text, #2563eb) 24%, transparent);
  font-weight: 700;
  transform: translateY(-1px);
}

.chip-active .chip-icon {
  opacity: 1;
  filter: saturate(1.16) contrast(1.04);
}

.chip-active:hover {
  background: color-mix(in srgb, var(--category-color-bg, #dbeafe) 88%, #ffffff);
  border-color: color-mix(in srgb, var(--category-color-border, #1d4ed8) 88%, var(--category-color-text, #1e40af));
  box-shadow: 0 12px 24px rgb(15 23 42 / 16%), 0 4px 12px color-mix(in srgb, var(--category-color-text, #2563eb) 28%, transparent);
}

.chip-all.chip-active {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 12px 24px rgb(37 99 235 / 30%);
}

.chip-all.chip-active:hover {
  background: #1d4ed8;
  border-color: #1e40af;
}

.chip-all.chip-active .chip-icon {
  opacity: 1;
  filter: none;
}

.filter-pill {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  color: #334155;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  font-weight: 650;
  line-height: 1.1;
  box-shadow: 0 1px 3px rgba(15, 47, 99, 0.05);
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.filter-pill:hover {
  background: #f1f6ff;
  border-color: #c7d8ef;
  color: #0f2f63;
}

.filter-pill:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.saved-only-toggle {
  border-color: #c7d2fe;
  min-height: 46px;
  padding-inline: 1rem;
  justify-content: center;
  white-space: nowrap;
}

.saved-only-toggle.is-active {
  background: var(--chip-blue);
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 6px 16px rgb(37 99 235 / 22%);
}

.date-filter-trigger {
  min-width: 168px;
  min-height: 46px;
  padding-inline: 0.95rem;
  justify-content: space-between;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.date-filter-clear {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 8px;
}

.date-filter-clear:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.date-popover {
  position: fixed;
  top: 0;
  left: 0;
  width: min(460px, 88vw);
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
  border: 1px solid #d9e3f5;
  border-radius: 20px;
  box-shadow: 0 26px 52px rgb(15 23 42 / 18%), 0 3px 10px rgb(37 99 235 / 10%);
  overflow: hidden;
  z-index: 40;
}

.date-popover-section {
  padding: 0.9rem 1rem;
}

.date-popover-quick {
  border-bottom: 1px solid #e8eefb;
  background: linear-gradient(180deg, #f9fbff 0%, #f6f9ff 100%);
}

.date-popover-quick .date-filter-quick-row {
  padding: 0;
}

.date-popover-calendar {
  padding: 0.75rem 1.1rem 0.9rem;
  background: #fff;
  min-height: 310px;
  display: grid;
  place-items: center;
}

.date-popover-calendar .flatpickr-calendar {
  border: none;
  box-shadow: none;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.date-popover-actions {
  border-top: 1px solid #e8eefb;
  background: #f8fbff;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.75rem;
  padding-bottom: 0.85rem;
}

.date-popover-action {
  border: 1px solid #d4deef;
  border-radius: 11px;
  background: #fff;
  color: #334155;
  padding: 0.46rem 0.92rem;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.date-popover-action:hover {
  background: #f1f6ff;
  border-color: #bfd0ee;
}

.date-popover-action.ghost {
  color: #475569;
}

.date-popover-action.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 8px 16px rgb(37 99 235 / 26%);
}

.date-popover-action.primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.explore-content-dimmer {
  position: absolute;
  inset: 0;
  top: 130px;
  background: rgb(15 23 42 / 12%);
  backdrop-filter: blur(1px);
  border-radius: 18px;
  z-index: 18;
}


.date-filter-quick-row {
  display: flex;
  gap: 0.45rem;
  padding: 0.1rem;
  flex-wrap: wrap;
}

.date-filter-quick-btn {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.34rem 0.68rem;
  border-radius: 999px;
  border: 1px solid #d7e4fb;
  background: #eff4ff;
  color: #365381;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.14s ease, box-shadow 0.2s ease;
}

.date-filter-quick-btn:hover {
  background: #dbeafe;
  border-color: #bcd5fd;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.date-popover .date-filter-quick-btn.chip-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
  box-shadow: 0 8px 16px rgb(37 99 235 / 24%);
}

.flatpickr-calendar {
  border-radius: 14px;
  border: 1px solid #dbe3f3;
  box-shadow: 0 14px 30px rgb(15 23 42 / 16%);
}

.date-popover .flatpickr-calendar {
  background: transparent;
}

.date-popover .flatpickr-months {
  margin: 0 auto 0.62rem;
  width: 100%;
  max-width: 312px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.38rem;
  padding: 0.28rem 0.36rem;
  border-radius: 999px;
  border: 1px solid #dbe8fb;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 80%);
}

.date-popover .flatpickr-month {
  height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.date-popover .flatpickr-current-month {
  position: static;
  transform: none;
  width: auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  margin: 0 auto;
  padding: 0.22rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #d8e5fb;
  background: #fff;
  box-shadow: 0 4px 12px rgb(37 99 235 / 10%);
  font-size: 0.98rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.date-popover .flatpickr-current-month .flatpickr-monthDropdown-months {
  appearance: none;
  border: 1px solid #d8e5fb;
  border-radius: 999px;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8ff 100%);
  color: #1f3b6e;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.15;
  padding: 0.34rem 1.38rem 0.34rem 0.78rem;
  margin-right: 0.05rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.date-popover .flatpickr-current-month .flatpickr-monthDropdown-months:hover,
.date-popover .flatpickr-current-month .flatpickr-monthDropdown-months:focus-visible {
  background: #eaf2ff;
  border-color: #c6dafd;
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgb(191 219 254 / 35%);
  outline: none;
}

.date-popover .flatpickr-current-month .numInputWrapper {
  width: 6.8ch;
  border-radius: 999px;
  background: linear-gradient(180deg, #fafdff 0%, #f3f8ff 100%);
  border: 1px solid #d8e5fb;
  box-shadow: inset 0 1px 0 #fff;
  padding-right: 0;
}

.date-popover .flatpickr-current-month input.cur-year {
  width: 100%;
  border: none;
  background: transparent;
  color: #1f3b6e;
  padding: 0.34rem 0.5rem;
  border-radius: 999px;
  line-height: 1.15;
  text-align: center;
  -moz-appearance: textfield;
  font-weight: 700;
}

.date-popover .flatpickr-months .flatpickr-prev-month,
.date-popover .flatpickr-months .flatpickr-next-month {
  position: static;
  inset: auto;
  transform: none;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #3b82f6;
  background: #fff;
  border: 1px solid #d7e5fc;
  box-shadow: 0 4px 12px rgb(15 23 42 / 8%);
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.date-popover .flatpickr-months .flatpickr-prev-month:hover,
.date-popover .flatpickr-months .flatpickr-next-month:hover {
  background: #e8f0ff;
  border-color: #bcd5fd;
  color: #1d4ed8;
  box-shadow: 0 6px 14px rgb(37 99 235 / 18%);
}

.date-popover .flatpickr-months .flatpickr-prev-month svg,
.date-popover .flatpickr-months .flatpickr-next-month svg {
  width: 11px;
  height: 11px;
}

.date-popover .flatpickr-current-month .numInputWrapper span,
.date-popover .flatpickr-current-month .numInputWrapper:hover span {
  display: none;
}

.date-popover .flatpickr-current-month input.cur-year::-webkit-outer-spin-button,
.date-popover .flatpickr-current-month input.cur-year::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.date-popover .flatpickr-weekdays {
  margin-top: 0.2rem;
  width: 100%;
}

.date-popover span.flatpickr-weekday {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7c8aa3;
}

.date-popover .flatpickr-days {
  padding-top: 0.3rem;
  margin: 0 auto;
}

.date-popover .flatpickr-innerContainer,
.date-popover .flatpickr-rContainer,
.date-popover .dayContainer,
.date-popover .flatpickr-days {
  width: 307.875px;
  min-width: 307.875px;
  max-width: 307.875px;
}

.date-popover .flatpickr-day {
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  border-color: transparent;
}

.date-popover .flatpickr-day:hover {
  background: #edf4ff;
  border-color: #d7e6ff;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
  background: #2563eb;
  border-color: #2563eb;
}

.flatpickr-day.inRange {
  background: #dbeafe;
  border-color: #dbeafe;
  box-shadow: -5px 0 0 #dbeafe, 5px 0 0 #dbeafe;
}

.date-popover .flatpickr-day.startRange,
.date-popover .flatpickr-day.endRange {
  box-shadow: 0 8px 16px rgb(37 99 235 / 24%);
}

.date-popover .flatpickr-day.today {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.date-popover .flatpickr-day.today:hover {
  background: #e8f1ff;
}

.date-popover .flatpickr-day.today.selected,
.date-popover .flatpickr-day.today.startRange,
.date-popover .flatpickr-day.today.endRange {
  border-color: #2563eb;
  color: #fff;
}

.date-popover .flatpickr-day.prevMonthDay,
.date-popover .flatpickr-day.nextMonthDay {
  color: #b4bfd2;
}

.explore-content {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1rem;
  flex: 1;
  min-height: 0;
}

.events-column {
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid #dbe2ef;
  box-shadow: 0 10px 28px rgb(15 23 42 / 9%);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.events-list {
  max-height: 100%;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.results-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(168px, auto);
  align-items: center;
  column-gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.results-summary {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.2;
  color: #475569;
  font-weight: 600;
}

.sort-label {
  margin: 0;
  align-self: center;
  font-size: 0.8rem;
  line-height: 1.2;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.sort-dropdown {
  position: relative;
  min-width: 168px;
  align-self: center;
}

.sort-trigger {
  width: 100%;
  border: 1px solid #d5e2f4;
  border-radius: 999px;
  padding: 0.46rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  color: #1f2937;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 4%);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sort-trigger:hover {
  border-color: #bfd2ee;
  background-color: #f8fbff;
}

.sort-trigger:focus-visible {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 20%);
}

.sort-trigger-chevron {
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.16s ease;
}

.sort-dropdown.is-open .sort-trigger {
  border-radius: 14px 14px 12px 12px;
}

.sort-dropdown.is-open .sort-trigger-chevron {
  transform: rotate(-135deg) translateY(-1px);
}

.sort-menu {
  position: absolute;
  top: calc(100% - 8px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid #d5e2f4;
  border-top: none;
  border-radius: 0 0 14px 14px;
  background: #fff;
  box-shadow: 0 12px 24px rgb(15 23 42 / 12%);
  z-index: 30;
  opacity: 0;
  transform: translateY(-4px);
  animation: sort-menu-in 0.14s ease forwards;
}

.sort-option {
  border-radius: 10px;
  padding: 0.45rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.sort-option:hover,
.sort-option:focus-visible {
  outline: none;
  background: #eff6ff;
  color: #1d4ed8;
}

.sort-option.is-selected {
  background: #dbeafe;
  color: #1d4ed8;
}

.sort-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

@keyframes sort-menu-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.events-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.pagination-btn {
  border: 1px solid #d8e0f1;
  background: #fff;
  color: #334155;
  border-radius: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 0.45rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.pagination-btn.is-active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.events-column {
  max-height: 100%;
  overflow: visible;
}

.event-card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgb(15 23 42 / 9%);
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 30px rgb(15 23 42 / 14%);
}

.event-card-active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgb(59 130 246 / 18%), 0 14px 28px rgb(15 23 42 / 12%);
}

.event-banner {
  height: 118px;
  width: 100%;
  object-fit: cover;
  display: block;
}

.event-body {
  padding: 0.95rem 1rem 1rem;
}

.event-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.event-title-row h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.event-meta,
.event-venue {
  margin: 0;
  font-size: 0.88rem;
}

.event-meta {
  margin-top: 0.45rem;
  color: #334155;
}

.event-venue {
  margin-top: 0.2rem;
  color: var(--muted);
}


.event-category {
  margin: 0.38rem 0 0;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--category-color-border, #dbeafe);
  border-radius: 999px;
  background: var(--category-color-bg, #eff6ff);
  color: var(--category-color-text, #1d4ed8);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.12rem 0.52rem;
}


.event-address {
  margin: 0.16rem 0 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.event-empty-state {
  background: var(--surface);
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 1.1rem;
  color: #475569;
}

.event-empty-state h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1rem;
}

.event-empty-state p {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
}


.favorite-form {
  margin: 0;
}

.save-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1e3a8a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  min-width: 64px;
  min-height: 30px;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  line-height: 1.1;
  font-size: 0.78rem;
  font-weight: 600;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.save-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.save-btn.is-saved {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.save-btn.is-saved:hover {
  background: #bfdbfe;
  border-color: #60a5fa;
}

.map-column {
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgb(15 23 42 / 8%);
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  position: relative;
}

.map-loading-pill {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgb(255 255 255 / 94%);
  border: 1px solid rgb(148 163 184 / 45%);
  box-shadow: 0 10px 28px rgb(15 23 42 / 16%);
  color: #1e293b;
  font-size: 0.8rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.map-loading-pill__icon {
  font-size: 0.78rem;
  line-height: 1;
  opacity: 0.9;
  transform: translateY(-0.5px);
}

.map-loading-pill.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.map-loading-pill__dots {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
}

.map-loading-pill__dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #0f766e;
  opacity: 0.4;
  animation: map-loading-dot-bounce 0.8s ease-in-out infinite;
}

.map-loading-pill__dots span:nth-child(2) {
  animation-delay: 0.12s;
}

.map-loading-pill__dots span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes map-loading-dot-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.map-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  flex: 1 1 auto;
}

#map,
#explore-map {
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  :root {
    --explore-desktop-gutter: 16px;
  }

  .toolbar-row {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .search-bar {
    min-width: 0;
    max-width: none;
  }

  .date-popover {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
  }

  .explore-shell {
    min-height: auto;
    height: auto;
  }

  .explore-content-dimmer {
    display: none;
  }

  .explore-content {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .map-column {
    min-height: 340px;
    height: 45vh;
    order: -1;
  }

  .map-loading-pill {
    top: 10px;
    padding: 7px 10px;
    font-size: 0.76rem;
  }

  .events-column {
    max-height: none;
    overflow: visible;
  }

  .events-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 1024px) {
  :root {
    --explore-top-offset: 72px;
  }

  .site-header {
    z-index: 120;
  }

  .explore-shell {
    width: calc(100% - 1.1rem);
    padding-top: 0.45rem;
    padding-bottom: 0.75rem;
  }

  .controls-panel {
    border-radius: 18px;
    padding: 0.45rem 0.5rem;
  }

  .toolbar-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
    gap: 0.28rem;
    align-items: stretch;
  }

  .search-bar {
    grid-column: 1 / -1;
    min-width: 0;
    max-width: none;
    gap: 0.52rem;
    min-height: 36px;
    padding: 0.18rem;
  }

  .search-bar input {
    min-width: 0;
    font-size: 0.82rem;
    padding: 0.36rem 0.6rem;
  }

  .icon-btn {
    height: 34px;
    width: 34px;
  }

  .search-clear-btn {
    height: 28px;
    width: 28px;
  }

  .date-filter,
  .saved-only-toggle {
    width: 100%;
    min-width: 0;
  }

  .saved-only-toggle {
    min-height: 34px;
    padding-inline: 0.62rem;
    white-space: nowrap;
    justify-content: center;
    font-size: 0.76rem;
  }

  .date-filter-trigger {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding-inline: 0.64rem;
    font-size: 0.76rem;
  }

  .chip-row {
    margin-top: 0.3rem;
    gap: 0.38rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 0 0.06rem;
  }

  .chip-row::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0.28rem 0.62rem;
    font-size: 0.76rem;
    gap: 0.3rem;
  }

  .chip-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    flex-basis: 18px;
  }

  .explore-content {
    margin-top: 0.52rem;
  }
}

@media (max-width: 640px) {
  .controls-panel {
    padding: 0.38rem 0.42rem;
  }

  .toolbar-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.24rem;
  }

  .search-bar {
    min-height: 34px;
  }

  .search-bar input {
    font-size: 0.8rem;
    padding: 0.32rem 0.56rem;
  }

  .filter-pill,
  .date-filter-trigger,
  .saved-only-toggle {
    width: 100%;
  }
}


.events-popup {
  width: min(248px, calc(100vw - 34px));
  min-width: 224px;
  max-width: 272px;
  max-height: min(392px, calc(100vh - 132px));
  background: #fff;
  border: 1px solid #e6ebf5;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgb(15 23 42 / 14%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.events-popup-multi,
.events-popup-cluster {
  width: min(348px, calc(100vw - 34px));
  min-width: 292px;
  max-width: 348px;
}

.events-popup-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 14px 14px 0 0;
}

.events-popup-content {
  padding: 0.54rem;
}

.events-popup-title {
  margin: 0 0 0.34rem;
  font-size: 0.92rem;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.events-popup-meta {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
}

.events-popup-meta + .events-popup-meta {
  margin-top: 0.18rem;
}

.events-popup-meta-date span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  min-width: 0;
  flex: 1 1 auto;
}

.events-popup-meta-icon {
  font-size: 0.72rem;
  line-height: 1;
  opacity: 0.8;
  flex: 0 0 auto;
}

.events-popup-venue span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  min-width: 0;
  flex: 1 1 auto;
}

.events-popup-category {
  margin: 0.46rem 0 0;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--category-color-border, #dbeafe);
  border-radius: 999px;
  background: var(--category-color-bg, #eff6ff);
  color: var(--category-color-text, #1d4ed8);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.08rem 0.42rem;
}

.event-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.events-popup-view {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.48rem;
  width: 100%;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.4rem 0.52rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.events-popup-view:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.events-popup-directions {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.38rem 0.52rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.events-popup-directions:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.events-popup-single-actions {
  margin-top: 0.48rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.events-popup-single-actions .events-popup-view {
  margin-top: 0;
}

.events-popup-single-actions .events-popup-zoom {
  padding: 0.38rem 0.5rem;
}

.events-popup-multi {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.events-popup-multi-header {
  padding: 0.7rem 0.8rem 0.62rem;
  border-bottom: 1px solid #edf2fb;
  flex-shrink: 0;
}

.events-popup-multi-title {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.2;
  color: #0f172a;
}

.events-popup-multi-venue {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.events-popup-multi-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0.3rem 0.8rem 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.events-popup-cluster {
  max-height: min(462px, calc(100vh - 132px));
}

.events-popup-cluster-header {
  padding: 0.72rem 0.8rem 0.62rem;
}

.events-popup-cluster-list {
  padding: 0.3rem 0.8rem 0.56rem;
  gap: 0;
}

.events-popup-cluster-footer {
  border-top: 1px solid #edf2fb;
  padding: 0.62rem 0.8rem 0.72rem;
  background: #fff;
  flex-shrink: 0;
}

.events-popup-zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.events-popup-zoom:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.events-popup-mini-card {
  border: 0;
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.events-popup-mini-card:hover {
  background: #f8fbff;
}

.events-popup-mini-card-active {
  background: #f3f8ff;
}

.events-popup-mini-image {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 6;
  object-fit: cover;
}

.events-popup-mini-content {
  padding: 0.46rem 0.5rem 0.5rem;
}

.events-popup-mini-title {
  margin: 0 0 0.28rem;
  font-size: 0.8rem;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.events-popup-mini-card-cluster {
  display: flex;
  flex-direction: column;
  align-items: start;
  border-bottom: 1px solid #e9eef7;
  padding: 0.54rem 0;
}

.events-popup-mini-card-cluster:first-child {
  padding-top: 0.4rem;
}

.events-popup-mini-card-cluster:last-child {
  border-bottom: 0;
  padding-bottom: 0.2rem;
}

.events-popup-mini-main {
  width: 100%;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  align-items: start;
  gap: 0.56rem;
}

.events-popup-mini-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  display: block;
  align-self: start;
  background: #e2e8f0;
  border-radius: 10px;
}

.events-popup-mini-thumb-placeholder {
  background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
}

.events-popup-mini-content-cluster {
  padding: 0.02rem 0 0;
}

.events-popup-mini-title-cluster {
  margin-bottom: 0.26rem;
  font-size: 0.84rem;
  line-height: 1.28;
}

.events-popup-mini-content-cluster .events-popup-meta {
  font-size: 0.73rem;
}

.events-popup-mini-content-cluster .events-popup-meta + .events-popup-meta {
  margin-top: 0.12rem;
}

.events-popup-mini-card-actions {
  margin-top: 0.34rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 0.34rem;
  width: 100%;
}

.events-popup-mini-card-actions-bottom {
  padding-left: calc(84px + 0.56rem);
}

.events-popup-category-badge {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  border: 1px solid var(--category-color-border, #dbeafe);
  background: var(--category-color-bg, #eff6ff);
  color: var(--category-color-text, #1d4ed8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.events-popup-category-badge-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.events-popup-category-badge-fallback {
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.events-popup-view-compact {
  margin-top: 0;
  width: 100%;
  min-width: 0;
  font-size: 0.69rem;
  padding: 0.34rem 0.4rem;
  border-radius: 7px;
}

.events-popup-directions-compact {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.69rem;
  padding: 0.34rem 0.4rem;
  border-radius: 7px;
}

.events-popup-directions-spacer {
  display: block;
}

.events-popup-single {
  display: flex;
  flex-direction: column;
  min-height: 0;
  font-size: 0.8rem;
  color: #1f2937;
}

.events-popup-single .events-popup-content {
  overflow-y: auto;
}

.mapboxgl-popup {
  z-index: 24;
}

.mapboxgl-popup-content {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.mapboxgl-popup-close-button {
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: 1px solid #dbe5f6;
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  color: #475569;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 12px rgb(15 23 42 / 14%);
}

.mapboxgl-popup-close-button:hover {
  background: #fff;
  color: #0f172a;
}

.mapboxgl-popup-tip {
  display: none;
}

@media (max-width: 700px) {
  .events-popup {
    min-width: 216px;
    width: min(252px, calc(100vw - 26px));
    max-width: 270px;
  }

  .events-popup-multi,
  .events-popup-cluster {
    min-width: 216px;
    width: min(252px, calc(100vw - 26px));
    max-width: 270px;
  }
}


body.overlay-open {
  overflow: hidden;
}


.event-overlay-root {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.event-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 52%);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.event-overlay-shell {
  position: absolute;
  inset: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  pointer-events: none;
}

.event-overlay {
  width: min(900px, 92vw);
  max-height: 90dvh;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 26px 65px rgb(15 23 42 / 26%);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

.event-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.event-overlay-back,
.event-overlay-close {
  border: 1px solid #dbe7f5;
  background: #f8fbff;
  color: #102a56;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 16px rgb(15 23 42 / 6%);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.event-overlay-back {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.52rem 0.86rem;
}

.event-overlay-back-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.event-overlay-back:hover,
.event-overlay-close:hover,
.event-overlay-back:focus-visible,
.event-overlay-close:focus-visible {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
  box-shadow: 0 8px 20px rgb(37 99 235 / 12%);
}

.event-overlay-back:focus-visible,
.event-overlay-close:focus-visible {
  outline: 3px solid rgb(59 130 246 / 28%);
  outline-offset: 2px;
}

.event-overlay-back:hover,
.event-overlay-close:hover {
  transform: translateY(-1px);
}

.event-overlay-close {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.event-overlay-close svg {
  width: 1rem;
  height: 1rem;
}

.event-overlay-body {
  overflow-y: auto;
  padding: 1.2rem;
}

.event-overlay-image {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 1.1rem;
  box-shadow: 0 14px 36px rgb(15 23 42 / 10%);
}

.event-overlay-content {
  display: grid;
  gap: 1.05rem;
}

.event-overlay-header-block {
  display: grid;
  gap: 0.62rem;
}

.event-overlay-content h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  line-height: 1.2;
  color: #0f172a;
}

.event-overlay-save-form {
  margin: 0;
  min-width: 0;
}

.event-overlay-save-btn {
  width: 100%;
  min-height: 46px;
  padding: 0.72rem 1rem;
  font-size: 0.94rem;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.event-overlay-category {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  border: 1px solid var(--category-color-border, #dbeafe);
  background: var(--category-color-bg, #eff6ff);
  color: var(--category-color-text, #1d4ed8);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  padding: 0.22rem 0.65rem;
}

.event-overlay-info-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid #cfe3ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #f2f8ff 0%, #eaf4ff 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 72%), 0 10px 26px rgb(37 99 235 / 7%);
}

.event-overlay-info-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.58rem;
  align-items: flex-start;
  padding: 0.1rem;
}

.event-overlay-info-icon {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #fff;
  color: #1d4ed8;
  box-shadow: 0 4px 12px rgb(37 99 235 / 10%);
  font-size: 1rem;
}

.event-overlay-info-copy {
  min-width: 0;
  display: grid;
  gap: 0.16rem;
}

.event-overlay-info-label {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 800;
  color: #64748b;
}

.event-overlay-info-value {
  margin: 0;
  color: #0f172a;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.event-overlay-info-detail {
  margin: 0;
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.35;
  overflow-wrap: anywhere;
}


.event-overlay-dates {
  margin-top: 1.15rem;
}

.event-overlay-dates h3 {
  margin: 0 0 0.72rem;
  font-size: 1.05rem;
  color: #0f172a;
}

.event-overlay-date-cards {
  display: grid;
  gap: 0.72rem;
}

.event-overlay-date-card {
  border: 1px solid #d7e5fb;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f9ff 100%);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  box-shadow: 0 4px 14px rgb(15 23 42 / 5%);
}

.event-overlay-date-card-content {
  min-width: 0;
  display: grid;
  gap: 0.32rem;
}

.event-overlay-date-card-date {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

.event-overlay-date-card-time {
  margin: 0;
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.35;
}

.event-overlay-date-card-action {
  flex: 0 0 auto;
}

.event-overlay-date-card .occurrence-favorite-form .save-btn {
  min-height: 34px;
  min-width: 72px;
  padding: 0.38rem 0.8rem;
  border-radius: 10px;
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #fff;
  font-size: 0.8rem;
}

.event-overlay-date-card .occurrence-favorite-form .save-btn:hover {
  background: #eff6ff;
  border-color: #60a5fa;
}

.event-overlay-date-card .occurrence-favorite-form .save-btn.is-saved {
  background: #2563eb;
  border-color: #1d4ed8;
  color: #fff;
}

.event-overlay-date-card .occurrence-favorite-form .save-btn.is-saved:hover {
  background: #1d4ed8;
  border-color: #1e40af;
}

.event-overlay-description {
  padding-top: 0.15rem;
}

.event-overlay-description h3 {
  margin: 0 0 0.65rem;
  font-size: 1.08rem;
  color: #0f172a;
}

.event-overlay-description p {
  margin: 0.5rem 0 0;
  color: #475569;
  line-height: 1.65;
}

.event-description--formatted {
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.event-overlay-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  align-items: stretch;
}

.event-overlay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #1e3a8a;
  background: #1e3a8a;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border-radius: 14px;
  padding: 0.72rem 1rem;
  text-align: center;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.event-overlay-btn:hover,
.event-overlay-btn:focus-visible,
.event-overlay-save-btn:hover,
.event-overlay-save-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgb(30 58 138 / 14%);
}

.event-overlay-btn:focus-visible,
.event-overlay-save-btn:focus-visible {
  outline: 3px solid rgb(59 130 246 / 28%);
  outline-offset: 2px;
}

.event-overlay-btn-secondary {
  background: #0f5f9f;
  border-color: #0f5f9f;
}

.event-overlay-btn-outline,
.event-overlay-btn-share {
  background: #fff;
  border-color: #cbd5e1;
  color: #1e293b;
}

.event-overlay-btn-outline:hover,
.event-overlay-btn-outline:focus-visible,
.event-overlay-btn-share:hover,
.event-overlay-btn-share:focus-visible {
  background: #f8fbff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.event-overlay-share-status {
  grid-column: 1 / -1;
  min-height: 1.1rem;
  margin: -0.1rem 0 0;
  color: #1d4ed8;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}


@media (max-width: 1024px) {
  .event-overlay-root {
    inset: calc(var(--explore-top-offset) + env(safe-area-inset-top, 0px)) 0 0;
  }

  .event-overlay-shell {
    inset: 0.9rem 0.85rem calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 0.9rem);
    align-items: flex-start;
  }

  .event-overlay {
    width: min(900px, 100%);
    max-height: calc(100dvh - var(--explore-top-offset) - var(--mobile-bottom-nav-height) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 1.8rem);
  }

  .event-overlay-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}

@media (min-width: 768px) {
  .event-overlay-body {
    padding: 1.5rem;
  }
}

@media (max-width: 900px) {
  .event-overlay-info-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .event-overlay-shell {
    inset: 0.75rem 0.65rem calc(var(--mobile-bottom-nav-height) + env(safe-area-inset-bottom, 0px) + 0.75rem);
  }

  .event-overlay {
    border-radius: 18px;
  }

  .event-overlay-body {
    padding: 1rem;
  }

  .event-overlay-info-card,
  .event-overlay-actions {
    grid-template-columns: 1fr;
  }

  .event-overlay-info-card {
    padding: 0.85rem;
    gap: 0.72rem;
  }

  .event-overlay-date-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.6rem;
  }

  .event-overlay-date-card-action,
  .event-overlay-date-card .occurrence-favorite-form,
  .event-overlay-date-card .occurrence-favorite-form .save-btn {
    width: 100%;
  }

  .event-overlay-date-card .occurrence-favorite-form .save-btn {
    min-height: 38px;
  }
}

.auth-prompt-root {
  position: fixed;
  inset: 0;
  z-index: 110;
}

.auth-prompt-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(15 23 42 / 58%);
}

.auth-prompt-shell {
  position: absolute;
  inset: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.auth-prompt-modal {
  position: relative;
  width: min(440px, 92vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 48px rgb(15 23 42 / 28%);
  border: 1px solid #e2e8f0;
  padding: 1.3rem;
  pointer-events: auto;
}

.auth-prompt-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 1rem;
  cursor: pointer;
}

.auth-prompt-modal h2 {
  margin: 0;
  padding-right: 2rem;
  font-size: 1.3rem;
}

.auth-prompt-modal p {
  margin: 0.65rem 0 0;
  color: #475569;
}

.auth-prompt-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.auth-prompt-btn {
  border-radius: 10px;
  padding: 0.52rem 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.auth-prompt-btn-primary {
  background: #2563eb;
  color: #fff;
}

.auth-prompt-btn-secondary {
  background: #0f172a;
  color: #fff;
}

.auth-prompt-btn-ghost {
  background: #fff;
  border-color: #cbd5e1;
  color: #1e293b;
}

.mobile-events-rail { display:none; }

@media (max-width: 1024px) {
  .explore-page {
    min-height: calc(100dvh - var(--explore-top-offset) - var(--mobile-bottom-nav-height));
    height: calc(100dvh - var(--explore-top-offset) - var(--mobile-bottom-nav-height));
    overflow: hidden;
    padding-bottom: var(--mobile-bottom-nav-height);
  }
  .explore-shell {
    height: calc(100dvh - var(--explore-top-offset) - var(--mobile-bottom-nav-height));
    padding-bottom: 0;
    overflow: hidden;
  }
  .explore-content {
    grid-template-columns: 1fr;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .events-column { display:none; }
  .map-column {
    position: relative;
    min-height: 0;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .map-placeholder {
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }
  .mobile-events-rail {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 15;
    flex: 0 0 var(--mobile-event-rail-height);
    height: var(--mobile-event-rail-height);
    min-height: var(--mobile-event-rail-height);
    max-height: var(--mobile-event-rail-height);
    overflow-x: hidden;
    overflow-y: visible;
    gap: .14rem;
    padding: .32rem .58rem calc(.08rem + env(safe-area-inset-bottom, 0px) * 0.08);
    background: linear-gradient(to top, rgba(255,255,255,.98), rgba(255,255,255,.95) 56%, rgba(255,255,255,.62));
    backdrop-filter: blur(6px);
    border-top: 0;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
  }
  .mobile-rail-header { display:flex; flex-direction:column; gap:.08rem; }
  .mobile-rail-toolbar { display:flex; justify-content:space-between; align-items:center; gap:.45rem; min-height:1.8rem; margin-bottom:0; }
  .mobile-rail-pagination-slot { display:flex; align-items:center; min-width:0; }
  .mobile-rail-toolbar .results-summary,
  .mobile-rail-mode-label.results-summary {
    margin:0;
    font-size:.76rem;
    line-height:1.15;
    color: #0f2f63;
    font-weight: 700;
    letter-spacing: .01em;
    padding: .24rem .56rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 47, 99, 0.16);
    background: color-mix(in srgb, #dbeafe 60%, #ffffff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
  }
  .mobile-events-rail > * { max-width: 100%; }
  .mobile-rail-list {
    display:flex;
    flex: 1 1 auto;
    min-height: 0;
    gap:.52rem;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 .04rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .mobile-rail-list::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
  .mobile-rail-list .event-card-link { flex: 0 0 min(85vw, 410px); max-width: 410px; }
  .mobile-rail-list .event-card {
    margin-bottom:0;
    border-radius:13px;
    height: 148px;
    min-height: 148px;
    max-height: 148px;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    overflow: hidden;
  }
  .mobile-rail-list .event-banner { width: 108px; height: 148px; object-fit: cover; border-radius: 0; }
  .mobile-rail-list .event-body { padding:.52rem .62rem .5rem; display: grid; gap: .18rem; align-content: start; min-height: 0; }
  .mobile-rail-list .event-title-row h3,
  .mobile-rail-list .event-meta,
  .mobile-rail-list .event-venue,
  .mobile-rail-list .event-address {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-rail-list .event-title-row h3 { font-size:.82rem; line-height:1.28; -webkit-line-clamp: 2; }
  .mobile-rail-list .event-meta,.mobile-rail-list .event-venue,.mobile-rail-list .event-address,.mobile-rail-list .event-category { font-size:.71rem; margin-top: 0; line-height:1.3; }
  .mobile-rail-list .event-meta,.mobile-rail-list .event-venue,.mobile-rail-list .event-address { white-space: nowrap; }
  .mobile-rail-list .event-venue,.mobile-rail-list .event-address { -webkit-line-clamp: 1; }
  .mobile-rail-list .event-category {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    padding: .1rem .38rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-rail-list .favorite-form { flex: 0 0 auto; }
  .mobile-rail-list .save-btn { min-height:24px; min-width:50px; font-size:.68rem; padding: .22rem .46rem; }
  .mobile-rail-mode { display:flex; justify-content:space-between; align-items:center; gap:.35rem; font-size:.72rem; font-weight:600; color:#334155; margin-bottom:0; min-height:1.8rem; }
  .mobile-events-rail.is-pin-focused .mobile-rail-header { display:none; }
  .mobile-rail-mode #mobile-events-pagination { justify-content:flex-end; }
  .mobile-rail-mode-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: min(100%, calc(100% - 2.8rem));
    min-width: 0;
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
  }
  .mobile-rail-mode[hidden] { display: none !important; }
  .mobile-rail-mode-close {
    margin-left: .12rem;
    border: 0;
    background: #e2e8f0;
    color: #0f172a;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
  }
  .mobile-rail-mode-close:active { transform: scale(.97); }
  .mobile-rail-list.mobile-rail-list-single { justify-content: center; }
  #mobile-events-pagination {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0;
    border-top: 0;
    justify-content: flex-end;
    align-items: center;
    gap: .35rem;
    overflow: visible;
    flex-wrap: nowrap;
  }
  #mobile-events-pagination:empty { display: none; }
  #mobile-events-pagination .pagination-btn {
    min-width: 2rem;
    min-height: 1.9rem;
    padding: .22rem .5rem;
    border-radius: 999px;
    border-color: rgba(15, 47, 99, 0.22);
    color: #0f2f63;
    background: color-mix(in srgb, #dbeafe 38%, #ffffff);
  }
  #mobile-events-pagination .pagination-btn:disabled { opacity:.46; background:#f1f5f9; color:#94a3b8; border-color:#e2e8f0; }
  .mobile-rail-page-indicator { font-size:.71rem; color:#0f2f63; min-width:4rem; text-align:center; font-weight:700; letter-spacing:.01em; }
  .mobile-events-rail .event-empty-state { padding:.65rem .8rem; border-radius:12px; max-height: 100%; overflow: hidden; }
  .mobile-events-rail .event-empty-state h3 { font-size:.88rem; }
  .mobile-events-rail .event-empty-state p { font-size:.78rem; margin-top:.25rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
}

.mobile-filters-btn,
.mobile-filter-summary { display: none; }
.mobile-filters-panel[hidden] { display: none; }

@media (max-width: 1024px) {
  .toolbar-row { grid-template-columns: minmax(0,1fr) auto; align-items:center; }
  .toolbar-row .search-bar { grid-column: auto; }
  .toolbar-row .date-filter, .toolbar-row .saved-only-toggle { display:none; }
  .mobile-filters-btn { display:inline-flex; border:1px solid #cfdff2; border-radius:14px; padding:0.42rem 0.76rem; background:linear-gradient(180deg, #ffffff 0%, #f7fbff 100%); min-height:44px; align-items:center; gap:.42rem; color:#0f2f63; font-weight:700; box-shadow:0 1px 3px rgba(15, 47, 99, 0.05); white-space:nowrap; }
  .mobile-filters-btn:focus-visible { outline:2px solid #2563eb; outline-offset:2px; }
  .desktop-category-row { justify-content:flex-start; }
  .mobile-filter-summary { display:block; margin: 0.34rem 0 0; padding-left:1.15rem; font-size:0.76rem; font-weight:500; line-height:1.3; letter-spacing:.008em; color:#5f748f; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23506884' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.59 13.41 11 23l-9.59-9.59a2 2 0 0 1-.58-1.41V3a2 2 0 0 1 2-2h8.99a2 2 0 0 1 1.41.58L23 11l-2.41 2.41z'/%3E%3Ccircle cx='7.25' cy='7.25' r='1.1' fill='%23506884' stroke='none'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-size:.78rem .78rem; background-position:left .06rem center; }

.filter-btn-icon {
  display: inline-flex;
  width: 0.92rem;
  height: 0.92rem;
  color: currentColor;
}

.filter-btn-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
  .mobile-filters-panel { position: fixed; inset: 0; z-index: 9999; background:#fff; }
  .mobile-filters-panel:not([hidden]) { display:block; pointer-events:auto; }
  .mobile-filters-panel-inner {
    position: relative;
    height:100dvh;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    background:#f8fafc;
  }
  .mobile-filters-header { position: sticky; top: 0; z-index: 3; display:flex; justify-content:space-between; align-items:center; padding: .95rem .9rem .75rem; border-bottom:1px solid #e2e8f0; background:#fff; }
  .mobile-filters-header h2 { margin:0; font-size:1.05rem; }
  .mobile-filters-content {
    flex:1;
    min-height: 0;
    overflow-y:auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: .55rem .9rem calc(var(--mobile-bottom-nav-height) + 1rem + env(safe-area-inset-bottom, 0px));
    background:#f8fafc;
  }
  .mobile-filters-close { border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; font-size: 1.2rem; font-weight: 700; min-width: 2.5rem; min-height: 2.5rem; line-height: 1; display:inline-flex; align-items:center; justify-content:center; color:#0f172a; }
  .mobile-filter-section { margin-bottom: .7rem; background:#fff; border:1px solid #e2e8f0; border-radius:14px; padding:.6rem .7rem; }
  .mobile-filter-section h3 { margin: 0 0 .35rem; font-size: .9rem; }
  .mobile-filter-section-title-pill {
    display: inline-flex;
    align-items: center;
    margin: 0 0 .42rem;
    padding: .24rem .56rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 47, 99, 0.16);
    background: color-mix(in srgb, #dbeafe 60%, #ffffff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
    color: #0f2f63;
    font-size: .76rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: .01em;
  }
  .mobile-filter-section .chip-row, .mobile-date-quick-row { display:flex; flex-wrap:wrap; gap:.42rem; overflow:visible; }
  .mobile-filter-section .chip { flex: 0 0 auto; }
  .mobile-sort-options { display:grid; gap:.35rem; }
  .mobile-sort-option { border:1px solid #d9e2f2; border-radius:10px; background:#fff; text-align:left; padding:.55rem .65rem; color:#334155; }
  .mobile-sort-option.is-selected { border-color:#3b82f6; background:#eff6ff; color:#1d4ed8; font-weight:600; }
  .mobile-filters-actions { display:flex !important; position: static !important; visibility: visible !important; opacity: 1 !important; justify-content:space-between; gap:0.5rem; margin: 0; padding: .35rem 0 1rem; background: transparent; }
  .mobile-filters-actions .date-popover-action { flex:1 1 0; min-width:0; white-space:nowrap; min-height: 2.75rem; padding-inline:.5rem; }
  .mobile-date-calendar .flatpickr-calendar { box-shadow:none; border:1px solid #e2e8f0; width:100%; max-width:100%; }
  .mobile-date-calendar .flatpickr-innerContainer,
  .mobile-date-calendar .flatpickr-rContainer,
  .mobile-date-calendar .flatpickr-days { width: 100%; min-width: 0; }
  .mobile-date-calendar .flatpickr-day { max-width: none; }
  .explore-page.mobile-filters-open, .explore-page.mobile-filters-open .explore-shell { overflow: hidden; }
  body.mobile-filters-lock { overflow: hidden; touch-action: none; }
}

@media (max-width: 1024px) {
  .controls-panel { padding: .72rem .78rem .68rem; }
  .toolbar-row { gap: .48rem; }
  .toolbar-row .search-bar { min-height: 44px; padding: .3rem .34rem; }
  .mobile-filter-summary::before { content: 'Showing:'; color: #506884; font-weight: 650; margin-right: .3rem; }
}

.event-overlay-description .event-description {
  color: #475569;
  line-height: 1.6;
}

.event-description--formatted h4 {
  margin: 0.55rem 0;
  font-size: 1rem;
}

.event-description--formatted a,
.event-description--formatted img,
.event-description--formatted iframe,
.event-description--formatted video {
  display: none;
}
