:root {
  --color-bg: #f7f7f7;          /* Bright Snow */
  --color-flag-red: #ca2e1d;
  --color-bright-gold: #fad62a;
  --color-fresh-sky: #59b5e7;
  --color-twilight-indigo: #253551;

  --color-card-bg: #ffffff;
  --color-text: #000000;
  --color-text-muted: #4a4a4a;

  --font-heading: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-meta: Helvetica, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/* Several components below set their own `display` (flex/grid), which would
   otherwise win over the browser's default [hidden] rule at equal
   specificity since this stylesheet loads after the UA one. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin: 0;
}

button {
  font-family: inherit;
}

/* ---------- header ---------- */

.site-header {
  background: #ffffff;
  color: var(--color-twilight-indigo);
  padding: 20px 24px 16px;
  border-bottom: 2px solid rgba(37, 53, 81, 0.12);
}

.site-header__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header__brand {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-width: 0;
}

.site-header__eyebrow {
  margin: 0;
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-flag-red);
  font-weight: 500;
}

.site-header__title {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  letter-spacing: -0.01em;
  margin-top: 2px;
  color: var(--color-twilight-indigo);
}

.site-header__logo-link {
  display: block;
  line-height: 0;
  flex-shrink: 0;
}

.site-header__logo {
  display: block;
  width: 48px;
  height: 48px;
}

.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  /* Optically aligns the pill's bottom with the baseline of "Plan Your
     Day" (where "P" sits) instead of the full text box (which reaches
     lower, to the bottom of "y"'s descender). Scales with
     .site-header__title's own clamp() so it stays correct at any
     viewport width — measured as ~0.378em of the title's font-size. */
  margin-bottom: clamp(0.53rem, 1.51vw, 0.72rem);
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 53, 81, 0.08);
  color: var(--color-twilight-indigo);
  white-space: nowrap;
}

.conn-pill--offline {
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
}

.conn-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-fresh-sky);
}

.conn-pill__dot--offline {
  background: var(--color-flag-red);
}

.tabs {
  display: flex;
  gap: 6px;
  max-width: 1200px;
  margin: 16px auto 0;
  background: rgba(37, 53, 81, 0.08);
  padding: 4px;
  border-radius: 999px;
}

.tabs__btn {
  flex: 1;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 6px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(37, 53, 81, 0.75);
  cursor: pointer;
}

.tabs__btn--active {
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
}

/* ---------- install prompt banner ---------- */

.install-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
}

.install-banner__text {
  flex: 1;
  margin: 0;
}

.install-banner__action {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
  white-space: nowrap;
}

.install-banner__dismiss {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border: none;
  background: none;
  color: var(--color-twilight-indigo);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px;
}

/* ---------- layout ---------- */

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}

/* ---------- sidebar & rail (wide layout only; see media query below) ---------- */

.sidebar {
  display: none;
}

.sidebar__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.sidebar__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-twilight-indigo);
}

.sidebar__result-count {
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.sidebar .chip-filters__group {
  margin-top: 18px;
}

.chip-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chip-col--row {
  flex-direction: row;
  gap: 4px;
}

.chip-col--row .chip-side {
  flex: 1;
  min-width: 0;
  justify-content: center;
  padding: 8px 4px;
  font-size: 0.8rem;
  text-align: center;
}

.chip-side {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1.5px solid rgba(37, 53, 81, 0.16);
  background: #ffffff;
  color: var(--color-twilight-indigo);
  text-align: left;
}

.chip-side--active {
  border-color: var(--color-twilight-indigo);
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
  font-weight: 500;
}

.chip-side__dot {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 3px;
}

.rail {
  display: contents;
}

.rail-tabs {
  display: none;
}

.rail-tabs__btn {
  flex: 1;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px 6px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: rgba(37, 53, 81, 0.08);
  color: rgba(37, 53, 81, 0.75);
}

.rail-tabs__btn--active {
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
}

@media (min-width: 1024px) {
  .tabs {
    display: none;
  }

  body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .site-header {
    flex-shrink: 0;
  }

  main {
    flex: 1;
    min-height: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr) 380px;
    grid-template-rows: 100%;
  }

  .sidebar {
    display: block;
    grid-column: 1;
    grid-row: 1;
    height: 100%;
    padding: 24px 22px;
    border-right: 2px solid rgba(37, 53, 81, 0.12);
    overflow-y: auto;
  }

  #chip-filters {
    display: none;
  }

  #status-message {
    grid-column: 2;
    grid-row: 1;
  }

  .card-grid {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    align-content: start;
    overflow-y: auto;
    padding: 24px;
  }

  .rail {
    display: flex;
    flex-direction: column;
    grid-column: 3;
    grid-row: 1;
    height: 100%;
    background: #f2f3f6;
    border-left: 2px solid rgba(37, 53, 81, 0.12);
    min-height: 0;
  }

  .rail-tabs {
    display: flex;
    gap: 8px;
    padding: 16px;
    background: var(--color-bg);
    flex-shrink: 0;
  }

  .rail .map-view,
  .rail .plan-view {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: none;
    padding: 0 16px 20px;
  }

  .rail .map {
    height: 45vh;
    min-height: 300px;
  }
}

/* ---------- chip filters ---------- */

.chip-filters {
  background: var(--color-card-bg);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.chip-filters__label {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(37, 53, 81, 0.75);
  margin-bottom: 6px;
}

/* Sidebar sections: the label is a button that collapses its options. */
.chip-filters__label--toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
}

.chip-filters__label--toggle::after {
  content: '▴';
  color: rgba(37, 53, 81, 0.5);
}

.chip-filters__label--toggle[aria-expanded='false']::after {
  content: '▾';
}

.chip-filters__label--toggle[aria-expanded='false'] {
  margin-bottom: 0;
}

.section-count {
  margin-left: 6px;
  color: var(--color-twilight-indigo);
  font-weight: 700;
}

.chip-filters__group + .chip-filters__group {
  margin-top: 12px;
}

/* Narrow layout: Day / Group Type / County / Medium / New to the Tour sit
   behind this button; search stays visible above it. */
.filters-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1.5px solid rgba(37, 53, 81, 0.25);
  background: #ffffff;
  color: var(--color-twilight-indigo);
  cursor: pointer;
  box-sizing: border-box;
  text-align: left;
}

.filters-toggle::after {
  content: '▾';
  color: var(--color-twilight-indigo);
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.filters-toggle--open::after {
  content: '▴';
}

.filters-toggle--active {
  border-color: var(--color-twilight-indigo);
}

.chip-filters__panel {
  margin-top: 12px;
}

.search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1.5px solid rgba(37, 53, 81, 0.25);
  background: #ffffff;
  color: var(--color-text);
  box-sizing: border-box;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-twilight-indigo);
}

.filter-multiselect {
  position: relative;
}

.filter-multiselect__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 9px 13px;
  border-radius: 10px;
  border: 1.5px solid rgba(37, 53, 81, 0.25);
  background: #ffffff;
  color: var(--color-text);
  cursor: pointer;
  box-sizing: border-box;
  text-align: left;
}

.filter-multiselect__btn::after {
  content: '▾';
  color: rgba(37, 53, 81, 0.5);
  flex-shrink: 0;
}

.filter-multiselect__panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-height: 260px;
  overflow-y: auto;
  z-index: 30;
  padding: 6px 0;
}

.filter-multiselect__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  font-size: 0.88rem;
  color: var(--color-text);
  cursor: pointer;
}

.filter-multiselect__option:hover {
  background: #f5f5f5;
}

.filter-multiselect__clear {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 13px;
  border: none;
  background: none;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
  font-family: var(--font-meta);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--color-flag-red);
  cursor: pointer;
}

.chip-row-wrap {
  position: relative;
}

/* Hints that the chip row scrolls further right — only shown when there's
   actually more to scroll to (see updateChipRowFade in app.js), and hidden
   again once scrolled to the end, so it never implies content that isn't
   there. */
.chip-row-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 2px;
  width: 32px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--color-card-bg));
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.chip-row-wrap--scrollable::after {
  opacity: 1;
}

.chip-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  /* Breathing room between the chips and the visible scrollbar below them. */
  padding-bottom: 10px;
}

.chip {
  flex-shrink: 0;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  white-space: nowrap;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  border: 1.5px solid rgba(37, 53, 81, 0.25);
  background: #ffffff;
  color: var(--color-twilight-indigo);
}

.chip--active {
  border-color: var(--color-twilight-indigo);
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
}

.chip-filters__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.link-btn {
  display: inline-block;
  border: none;
  background: none;
  font-family: var(--font-meta);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--color-flag-red);
  cursor: pointer;
  text-decoration: underline;
  padding: 7px 0;
  margin: -7px 0;
}

.link-btn--red {
  color: var(--color-flag-red);
}

.status-message {
  text-align: center;
  padding: 40px 16px;
  color: var(--color-text-muted);
  font-size: 1rem;
}

.status-message--error {
  color: var(--color-flag-red);
  font-weight: 600;
}

/* ---------- card grid & card ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  gap: 20px;
}

.list-group-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 -6px;
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(37, 53, 81, 0.15);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-twilight-indigo);
}

.list-group-heading:first-child {
  margin-top: 0;
}

.list-group-heading__count {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(37, 53, 81, 0.6);
}

.card {
  background: var(--color-card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.card__photo-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 0;
  background: #e8e8e8;
  flex-shrink: 0;
}

.group-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-meta);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}

.group-badge--inline {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
}

.gallery {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery__track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.gallery__slide--loading {
  position: relative;
}

.gallery__slide--loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid rgba(37, 53, 81, 0.15);
  border-top-color: var(--color-twilight-indigo);
  border-radius: 50%;
  animation: gallery-spin 0.8s linear infinite;
}

@keyframes gallery-spin {
  to {
    transform: rotate(360deg);
  }
}

.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery__arrow:hover {
  background: rgba(0, 0, 0, 0.65);
}

.gallery__arrow--prev {
  left: 8px;
}

.gallery__arrow--next {
  right: 8px;
}

.gallery__dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.gallery__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.gallery__dot--active {
  background: #ffffff;
}

.card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__photo--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  background: var(--color-twilight-indigo);
}

.card__photo-placeholder-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.35;
  color: #ffffff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.card__photo--branded {
  object-fit: cover;
}

/* Artist Group / Gallery / Museum cards: show the whole photo (usually a
   logo) instead of cropping it to fill the frame. #fafafa matches the
   Photo Gallery section's letterbox fill for a consistent look. */
.card__photo-wrap--contain {
  background: #fafafa;
}

.card__photo-wrap--contain .card__photo:not(.card__photo--branded) {
  object-fit: contain;
}

.card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tag-solid {
  font-family: var(--font-meta);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--color-twilight-indigo);
  color: var(--color-bg);
}

.tag-accent {
  font-family: var(--font-meta);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-twilight-indigo);
  background: var(--color-fresh-sky);
  border: 1.5px solid var(--color-fresh-sky);
  padding: 3px 8px;
  border-radius: 999px;
}

.card__name {
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--color-twilight-indigo);
  letter-spacing: -0.01em;
  cursor: pointer;
}

.status-ribbon {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 7px;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
  font-family: var(--font-meta);
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 9px 4px 7px;
  border-radius: 3px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.card__members {
  margin: 8px 0 0;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--color-text);
}

.card__members a {
  color: var(--color-flag-red);
}

.card__members strong {
  color: var(--color-twilight-indigo);
}

.card__bio {
  margin: 7px 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(0, 0, 0, 0.66);
}

.read-more-link {
  display: inline-block;
  align-self: flex-start;
  margin: 6px 0 0;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-flag-red);
  cursor: pointer;
}

.read-more-link:hover {
  text-decoration: underline;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1.5px dashed rgba(37, 53, 81, 0.18);
}

.card__days {
  font-family: var(--font-meta);
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--color-twilight-indigo);
}

.add-btn {
  font-family: var(--font-meta);
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
  white-space: nowrap;
}

.add-btn--active {
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
}

/* ---------- map view ---------- */

.map-view {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.map {
  width: 100%;
  height: 60vh;
  min-height: 380px;
  background: #e8e8e8;
}

.map-legend {
  background: #ffffff;
  padding: 14px 16px;
}

.map-legend__title {
  font-family: var(--font-meta);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(37, 53, 81, 0.75);
  margin-bottom: 10px;
}

.map-legend__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 12px;
}

.map-legend__item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.85rem;
  color: var(--color-twilight-indigo);
}

.map-legend__swatch {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lone checkbox filter (First-year participants only): no heading needed. */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 0.85rem;
  color: var(--color-twilight-indigo);
  cursor: pointer;
}

.map-legend__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-twilight-indigo);
  cursor: pointer;
}

.map-legend__note {
  margin-top: 11px;
  font-family: var(--font-meta);
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  color: rgba(37, 53, 81, 0.75);
}

.map-info {
  font-family: var(--font-body);
  min-width: 160px;
}

.map-info__title {
  display: block;
  margin-bottom: 6px;
  color: var(--color-twilight-indigo);
  font-size: 0.85rem;
}

.map-info__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-info__item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 4px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-flag-red);
  cursor: pointer;
  border-radius: 4px;
}

.map-info__item:hover {
  background: var(--color-bg);
  text-decoration: underline;
}

/* Which kind of stop it is (Gallery, Artist Group…), on its own line under
   the name. inline-block keeps the hover underline off it. */
.map-info__type {
  display: inline-block;
  width: 100%;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(37, 53, 81, 0.65);
}

/* ---------- My Day (plan) view ---------- */

.plan-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan-header {
  background: var(--color-twilight-indigo);
  border-radius: 16px;
  padding: 16px 18px;
  color: var(--color-bg);
  border-bottom: 5px solid var(--color-bright-gold);
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-header__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.plan-header__summary {
  font-family: var(--font-meta);
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--color-bright-gold);
  margin-top: 4px;
}

.plan-header__share {
  flex-shrink: 0;
  margin-left: auto; /* right-align, opposite the day title and stop count */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bright-gold);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.day-tabs {
  display: flex;
  gap: 6px;
  background: rgba(37, 53, 81, 0.09);
  padding: 4px;
  border-radius: 999px;
}

.day-tabs__btn {
  flex: 1;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 4px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: rgba(37, 53, 81, 0.75);
  cursor: pointer;
}

.day-tabs__btn--active {
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
}

.plan-stops {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-stop {
  display: flex;
  gap: 12px;
  background: var(--color-card-bg);
  border-radius: 14px;
  padding: 13px 14px;
  box-shadow: 0 2px 0 rgba(37, 53, 81, 0.1);
}

.plan-stop__order {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.plan-stop__num {
  flex-shrink: 0;
  width: 28px;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.1rem;
  line-height: 1.2;
  color: var(--color-twilight-indigo);
  text-align: center;
}

.reorder-btn {
  width: 28px;
  height: 24px;
  flex-shrink: 0;
  border: none;
  border-radius: 4px;
  background: rgba(37, 53, 81, 0.08);
  color: var(--color-twilight-indigo);
  font-size: 0.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reorder-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.plan-stop__body {
  flex: 1;
  min-width: 0;
}

.plan-stop__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-twilight-indigo);
  line-height: 1.2;
  padding: 4px 0;
  cursor: pointer;
}

.plan-stop__meta {
  font-family: var(--font-meta);
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: rgba(37, 53, 81, 0.75);
  margin-top: 4px;
}

.plan-stop__drive {
  font-family: var(--font-meta);
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: rgba(0, 0, 0, 0.55);
  margin-top: 3px;
}

.plan-stop__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  justify-content: center;
  flex-shrink: 0;
}

.swap-btn {
  text-align: center;
  text-decoration: none;
  font-family: var(--font-meta);
  letter-spacing: 0.06em;
  font-size: 0.65rem;
  color: var(--color-twilight-indigo);
  border: 1.5px solid rgba(37, 53, 81, 0.25);
  background: transparent;
  border-radius: 999px;
  padding: 7px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.remove-btn {
  font-family: var(--font-meta);
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  color: var(--color-flag-red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 2px;
}

.plan-route {
  margin-bottom: 12px;
}

.plan-route[hidden] {
  display: none;
}

.plan-route__btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 13px;
  border-radius: 14px;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
}

.plan-route__note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: rgba(37, 53, 81, 0.75);
}

.plan-route__note[hidden] {
  display: none;
}

.plan-empty {
  text-align: center;
  padding: 44px 20px;
  background: var(--color-card-bg);
  border-radius: 14px;
}

.plan-empty__dot {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--color-bright-gold);
  margin: 0 auto 14px;
}

.plan-empty__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-twilight-indigo);
}

.plan-empty__hint {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.6);
  margin: 7px 0 0;
}

.privacy-note {
  margin: 14px 0 0;
  font-size: 0.74rem;
  line-height: 1.55;
  color: rgba(37, 53, 81, 0.6);
}

/* Narrow layout: a quiet line at the very bottom of the page. The wide
   layout shows the same line in the sidebar instead. */
.privacy-note--footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 90px;
  text-align: center;
}

@media (min-width: 1024px) {
  .privacy-note--footer {
    display: none;
  }
}

.plan-note {
  position: relative;
  border: 2px dashed rgba(37, 53, 81, 0.28);
  border-radius: 14px;
  padding: 8px 40px 8px 12px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(37, 53, 81, 0.75);
}

.plan-note__text {
  margin: 0;
}

.plan-note__close {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--color-twilight-indigo);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.map-offline-note {
  border: 2px dashed rgba(37, 53, 81, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(37, 53, 81, 0.75);
}

.plan-map-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.plan-map {
  width: 100%;
  height: 220px;
  background: #e8e8e8;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
  border: none;
  padding: 11px 18px 11px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 53, 81, 0.35);
}

@media (min-width: 1024px) {
  #back-to-top-directory {
    right: 400px;
  }
}

.share-incoming {
  background: #ffffff;
  border: 2px solid var(--color-twilight-indigo);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--color-twilight-indigo);
}

.share-incoming__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

/* ---------- share panel ---------- */

.share-panel {
  background: var(--color-card-bg);
  border: 2px solid var(--color-twilight-indigo);
  border-radius: 16px;
  padding: 14px 15px;
  box-shadow: 0 4px 0 rgba(37, 53, 81, 0.15);
}

.share-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.share-panel__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-twilight-indigo);
}

.share-panel__link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  background: rgba(37, 53, 81, 0.07);
  border-radius: 10px;
  padding: 9px 11px;
}

.share-panel__link {
  font-family: var(--font-meta);
  letter-spacing: 0.02em;
  font-size: 0.75rem;
  color: var(--color-twilight-indigo);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.copy-btn {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
}

.copy-btn--done {
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
}

.share-panel__tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.share-tile {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--color-twilight-indigo);
  border: 1.5px solid rgba(37, 53, 81, 0.25);
  border-radius: 10px;
  padding: 9px 4px;
  cursor: pointer;
  background: #ffffff;
  text-decoration: none;
  display: block;
}

.share-tile--disabled,
.share-tile:disabled {
  opacity: 0.35;
  cursor: default;
}

.share-panel__email {
  margin-top: 12px;
  border-top: 1.5px dashed rgba(37, 53, 81, 0.2);
  padding-top: 12px;
}

.share-panel__email-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-twilight-indigo);
}

.share-panel__email-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.share-panel__email-row input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-twilight-indigo);
  background: #ffffff;
  border: 1.5px solid rgba(37, 53, 81, 0.3);
  border-radius: 10px;
  padding: 10px 11px;
  outline: none;
}

.email-send-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
  border: none;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
}

.email-send-btn--sent {
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
}

.share-panel__sent-note {
  margin-top: 10px;
  font-family: var(--font-meta);
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: var(--color-twilight-indigo);
  background: var(--color-bright-gold);
  border-radius: 8px;
  padding: 8px 10px;
}

.share-panel__note {
  font-family: var(--font-meta);
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  color: rgba(37, 53, 81, 0.75);
  margin-top: 10px;
  line-height: 1.5;
}

/* ---------- detail overlay ---------- */

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.detail-overlay__photo {
  position: relative;
  height: 46vh;
  min-height: 260px;
  flex-shrink: 0;
  background: #e8e8e8;
}

/* Same treatment as .card__photo-wrap--contain, for the detail hero. */
.detail-overlay__photo--contain {
  background: #fafafa;
}

.detail-overlay__photo--contain .card__photo:not(.card__photo--branded) {
  object-fit: contain;
}

/* Zero-height sticky anchor: the bar floats over the photo without taking
   space, and stays at the top of the screen while the page scrolls. */
.detail-topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  height: 0;
  flex-shrink: 0;
}

.detail-topbar__inner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  transition: background 0.15s, padding 0.15s;
}

.detail-topbar--solid .detail-topbar__inner {
  padding: 8px 16px;
  background: rgba(250, 250, 250, 0.97);
  border-bottom: 1px solid #e5e5e5;
}

.detail-topbar__left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.detail-topbar__circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--color-twilight-indigo);
  border: 1px solid rgba(37, 53, 81, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 53, 81, 0.25);
}

.detail-topbar__add {
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(37, 53, 81, 0.14);
  border-radius: 999px;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 53, 81, 0.25);
}

/* Added: the yellow goes away, since the action is done. */
.detail-topbar__add--active {
  background: rgba(255, 255, 255, 0.94);
}

.detail-overlay__body {
  flex: 1;
  padding: 20px 24px 40px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* Previous / Next bar pinned to the bottom of the detail page. */
.detail-nav {
  position: sticky;
  bottom: 0;
  z-index: 5;
  flex-shrink: 0;
  padding: 10px 24px calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 250, 250, 0.97);
  border-top: 1px solid #e5e5e5;
}

.detail-nav[hidden] {
  display: none;
}

.detail-nav__inner {
  display: flex;
  gap: 16px;
  /* Same width as the page content above (720px body minus its 24px sides). */
  max-width: 672px;
  margin: 0 auto;
}

/* Wider screens: fixed-width buttons pushed to the two edges of the content
   column, so there is a generous gap between them instead of two wide buttons
   nearly touching. */
@media (min-width: 640px) {
  .detail-nav__inner {
    justify-content: space-between;
  }

  .detail-nav__inner .detail-nav__btn {
    flex: 0 1 260px;
  }
}

.detail-nav__btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 14px;
  border: 2px solid var(--color-twilight-indigo);
  border-radius: 14px;
  background: #ffffff;
  color: var(--color-twilight-indigo);
  cursor: pointer;
  text-align: left;
}

.detail-nav__btn--next {
  text-align: right;
}

.detail-nav__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.detail-nav__dir {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.detail-nav__name {
  font-size: 0.72rem;
  line-height: 1.3;
  color: rgba(37, 53, 81, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep the "↑ Top" button clear of the Previous/Next bar. */
#back-to-top-detail {
  bottom: 96px;
}

.detail-back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.85rem;
}

.detail-name {
  font-size: 1.6rem;
  color: var(--color-twilight-indigo);
  margin-top: 10px;
}

.detail-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-social-link {
  display: inline-block;
  padding: 3px 0;
  font-size: 0.9rem;
  color: var(--color-flag-red);
  text-decoration: none;
}

.detail-social-link:hover {
  text-decoration: underline;
}

/* Registrants' free-text answers: single line breaks they typed are kept
   (HTML otherwise collapses them), and blank lines split the text into
   separate paragraphs with room between them (see paragraphsHtml). */
.keep-line-breaks,
.detail-bio__para {
  white-space: pre-line;
}

.detail-bio__para {
  margin: 0;
}

.detail-bio__para + .detail-bio__para {
  margin-top: 1em;
}

.detail-section .keep-line-breaks + .keep-line-breaks {
  margin-top: 0.8em;
}

.detail-bio {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.7);
  margin-top: 12px;
}

.detail-bio a {
  color: var(--color-flag-red);
}

.detail-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e5e5;
}

.detail-external-note {
  border: 2px dashed rgba(37, 53, 81, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(37, 53, 81, 0.75);
}

.detail-section__label {
  font-family: var(--font-meta);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(37, 53, 81, 0.75);
  margin-bottom: 4px;
}

.detail-section p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--color-text);
}

.detail-section .photo-gallery__hint {
  font-family: var(--font-meta);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  line-height: 1.5;
  color: rgba(37, 53, 81, 0.65);
  margin: 2px 0 0;
}

/* Every uploaded photo shown in full via object-fit: contain, unlike the
   cropped hero photo above — #fafafa fills the letterboxed space so an
   image that doesn't match the box's aspect ratio isn't padded with a
   jarring color. */
.photo-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 4px;
}

.photo-gallery__item {
  flex: 0 0 200px;
  width: 200px;
  aspect-ratio: 4 / 3;
  background: #fafafa;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.photo-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  cursor: pointer;
}

/* ---------- photo lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bright-gold);
  color: var(--color-twilight-indigo);
  border: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__arrow--prev {
  left: 16px;
}

.lightbox__arrow--next {
  right: 16px;
}

.lightbox__count {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-meta);
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--color-twilight-indigo);
  color: var(--color-twilight-indigo);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
}

.directions-btn:hover {
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
}

/* ---------- add-to-day picker modal ---------- */

.picker-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(37, 53, 81, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.picker-modal__card {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.picker-modal__note {
  font-size: 0.95rem;
  color: var(--color-twilight-indigo);
  margin: 0 0 16px;
  line-height: 1.5;
}

.picker-modal__actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.picker-modal__btn {
  flex: 1;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: var(--color-twilight-indigo);
  color: var(--color-bright-gold);
}
