:root {
  color-scheme: light;
  --page-bg: #eef1e7;
  --panel: rgba(255, 255, 255, 0.985);
  --panel-solid: #ffffff;
  --card: #ffffff;
  --card-soft: #f6f8fb;
  --pill: #ffffff;
  --text: #17243a;
  --muted: #66758b;
  --line: #dde6ef;
  --navy: #123254;
  --navy-2: #1b4a78;
  --blue-dark: #0f79be;
  --control-bg: #ffffff;
  --control-text: #17324e;
  --popup-bg: #ffffff;
  --modal-overlay: rgba(8, 18, 31, 0.66);
  --shadow: 0 18px 52px rgba(16, 32, 51, 0.22);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page-bg: #182331;
  --panel: rgba(31, 44, 60, 0.985);
  --panel-solid: #1f2c3c;
  --card: #27384b;
  --card-soft: #223144;
  --pill: #2b3d52;
  --text: #f3f8ff;
  --muted: #c0ccda;
  --line: #486079;
  --navy: #12263b;
  --navy-2: #23527d;
  --blue-dark: #68c3f2;
  --control-bg: #24374b;
  --control-text: #f4f9ff;
  --popup-bg: #26384a;
  --modal-overlay: rgba(8, 15, 24, 0.72);
  --shadow: 0 20px 58px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  background: var(--page-bg);
  font-family: Arial, Helvetica, sans-serif;
  overscroll-behavior: none;
}

body.modal-open {
  overflow: hidden;
}

a,
button {
  font: inherit;
}

button {
  border: 0;
}

#map {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--page-bg);
}

.leaflet-pane.leaflet-basemap-pane {
  opacity: 1;
  filter: saturate(1.13) contrast(1.06) brightness(0.99);
}

html[data-theme="dark"] .leaflet-pane.leaflet-basemap-pane {
  filter:
    invert(0.88)
    sepia(0.12)
    saturate(0.72)
    hue-rotate(172deg)
    brightness(0.78)
    contrast(0.94);
}

.leaflet-pane.leaflet-labels-pane {
  opacity: 0.95;
  filter: saturate(1.02) contrast(1.05);
}

html[data-theme="dark"] .leaflet-pane.leaflet-labels-pane {
  opacity: 0.92;
  filter:
    invert(0.88)
    sepia(0.10)
    saturate(0.70)
    hue-rotate(172deg)
    brightness(0.86)
    contrast(1.03);
}

.site-header {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1100;
  width: min(720px, calc(100vw - 430px));
  min-height: 88px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 54px;
  align-items: center;
  column-gap: 15px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(18, 50, 84, 0.985), rgba(27, 74, 120, 0.985));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(16, 32, 51, 0.22);
  backdrop-filter: blur(10px);
}

html[data-theme="dark"] .site-header {
  background: linear-gradient(135deg, rgba(17, 40, 63, 0.99), rgba(27, 76, 116, 0.99));
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.34);
}

.txk-logo {
  width: 100%;
  max-width: 150px;
  max-height: 56px;
  display: block;
  object-fit: contain;
  justify-self: start;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.17));
}

.brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-copy > strong {
  color: #ffffff;
  font-size: clamp(27px, 1.9vw, 31px);
  line-height: 1.03;
  letter-spacing: -0.032em;
  font-weight: 800;
  white-space: nowrap;
}

.brand-copy > span {
  margin-top: 7px;
  color: #dce8f5;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.ambassador-star {
  width: 54px;
  height: 54px;
  display: block;
  object-fit: contain;
  justify-self: end;
  filter: drop-shadow(0 3px 4px rgba(38, 30, 67, 0.18));
}

.info-panel {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 28px;
  z-index: 1050;
  width: min(374px, calc(100vw - 28px));
  overflow: hidden;
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(16, 32, 51, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(9px);
}

html[data-theme="dark"] .info-panel {
  border-color: #334256;
}

.panel-content {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 18px 18px 20px;
}

.panel-handle {
  display: none;
}

.map-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 11px;
  margin: 0 0 10px;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: var(--text);
  background: var(--pill);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.legend-pill img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.ambassador-banner {
  width: min(96%, 292px);
  height: auto;
  display: block;
  margin: 11px auto 2px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(112, 80, 166, 0.17));
}

.meetup-card {
  padding: 20px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(17, 35, 55, 0.04);
}

html[data-theme="dark"] .meetup-card {
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.22);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

.meetup-card h1 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.14;
}

.meetup-details {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.meetup-details div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.meetup-details span {
  color: var(--muted);
  font-size: 12px;
}

.meetup-details strong {
  color: var(--text);
  font-size: 13px;
}

.meetup-description {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.52;
}

.primary-links,
.social-links {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.social-button {
  width: 100%;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 13px;
  padding: 12px 17px;
  color: #ffffff;
  border-radius: 16px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.social-button:hover {
  filter: brightness(0.97);
}

.social-button:active {
  transform: scale(0.988);
}

.social-mark {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
}

.campfire-button {
  background: linear-gradient(135deg, #0d9de4, #0b80c4);
  box-shadow: 0 10px 22px rgba(11, 128, 196, 0.18);
}

.campfire-mark {
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
}

.campfire-mark img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18));
}

.about-social {
  background: linear-gradient(135deg, #17365a, #0f2742);
  box-shadow: 0 10px 22px rgba(15, 39, 66, 0.15);
}

.conduct-social {
  background: linear-gradient(135deg, #7b53a6, #5f3d88);
}

.discord {
  background: #5865f2;
}

.facebook {
  background: #1877f2;
}

.instagram {
  background: linear-gradient(110deg, #833ab4, #d62976, #f77737);
}

.poi-icon {
  background: transparent;
  border: 0;
}

.poi-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 7px rgba(25, 39, 57, 0.44)) saturate(1.26) brightness(1.07);
}

html[data-theme="dark"] .poi-icon img {
  filter: drop-shadow(0 3px 9px rgba(0, 0, 0, 0.72)) saturate(1.36) brightness(1.15);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: var(--text);
  background: var(--popup-bg);
}

.poi-popup strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.poi-popup span {
  color: var(--muted);
  font-size: 12px;
}

.leaflet-control-zoom {
  margin-top: 126px !important;
  border: 0 !important;
  box-shadow: 0 7px 22px rgba(16, 32, 51, 0.18) !important;
}

.leaflet-control-zoom a,
.leaflet-control-map-tools > button {
  color: var(--control-text) !important;
  background: var(--control-bg) !important;
  border-color: var(--line) !important;
}

.leaflet-control-map-tools {
  position: relative !important;
  display: flex;
  flex-direction: column;
  margin: 7px 0 0 10px !important;
  overflow: visible;
  border-radius: 4px;
  box-shadow: 0 7px 22px rgba(16, 32, 51, 0.18);
}

.leaflet-control-map-tools > button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.leaflet-control-map-tools > button + button {
  border-top: 1px solid var(--line) !important;
}

.leaflet-control-map-tools > button:hover {
  filter: brightness(0.95);
}

.map-attribution {
  position: fixed;
  left: 7px;
  bottom: 6px;
  z-index: 1000;
  max-width: 58vw;
  overflow: hidden;
  padding: 3px 6px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 9px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: 0 3px 10px rgba(15, 29, 44, 0.10);
}

.map-attribution a {
  color: var(--text);
  text-decoration: none;
}



.panel-footer {
  margin-top: auto;
  padding: 20px 8px 2px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.01em;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: var(--modal-overlay);
  backdrop-filter: blur(7px);
}

.modal-backdrop[hidden] {
  display: none;
}

.about-modal,
.conduct-modal {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

.about-modal {
  width: min(620px, 100%);
  max-height: min(760px, calc(100dvh - 36px));
}

.conduct-modal {
  width: min(900px, 100%);
  height: min(850px, calc(100dvh - 36px));
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 15px;
  background: var(--panel-solid);
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 26px;
}

.modal-eyebrow {
  margin: 0;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  color: var(--text);
  background: var(--card-soft);
  border-radius: 12px;
  cursor: pointer;
  font-size: 27px;
  line-height: 1;
}

.modal-body {
  overflow-y: auto;
  padding: 18px 20px 8px;
}

.modal-body p {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
}

.modal-disclaimer {
  padding: 14px;
  color: var(--muted) !important;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

.modal-done {
  min-height: 50px;
  margin: 10px 20px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #17365a, #0f2742);
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

.pdf-frame-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 18px;
  background: var(--card-soft);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.pdf-pages {
  display: grid;
  gap: 14px;
}

.pdf-load-error {
  padding: 18px;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.pdf-page-image {
  width: 100%;
  height: auto;
  display: block;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(17, 35, 55, 0.10);
}

.conduct-actions {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 10px;
  padding: 14px 18px 18px;
  background: var(--panel-solid);
}

.modal-open-pdf,
.conduct-done {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
}

.modal-open-pdf {
  color: var(--text);
  background: var(--card-soft);
  border: 1px solid var(--line);
}

.conduct-done {
  color: #ffffff;
  background: linear-gradient(135deg, #7b53a6, #5f3d88);
}

@media (max-width: 1100px) {
  .site-header {
    width: min(670px, calc(100vw - 410px));
    grid-template-columns: 138px minmax(0, 1fr) 48px;
    column-gap: 12px;
  }

  .txk-logo {
    max-width: 138px;
  }

  .brand-copy > strong {
    font-size: 24.5px;
  }

  .brand-copy > span {
    font-size: 14px;
  }

  .ambassador-star {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 820px) {
  .site-header {
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    width: calc(100vw - 16px);
    min-height: 78px;
    grid-template-columns: 104px minmax(0, 1fr) 40px;
    column-gap: 9px;
    padding: 10px 12px;
    border-radius: 20px;
  }

  .txk-logo {
    max-width: 104px;
    max-height: 49px;
  }

  .brand-copy > strong {
    font-size: clamp(17px, 4.5vw, 20.5px);
    line-height: 1.04;
    letter-spacing: -0.032em;
    white-space: nowrap;
  }

  .brand-copy > span {
    margin-top: 5px;
    font-size: clamp(10.5px, 2.95vw, 12.5px);
    line-height: 1.14;
    white-space: normal;
  }

  .ambassador-star {
    width: 40px;
    height: 40px;
  }

  .info-panel {
    top: auto;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    width: auto;
    max-height: 66dvh;
    border-radius: 22px;
    transition: transform 0.22s ease;
  }

  .info-panel.collapsed {
    transform: translateY(calc(100% - 52px));
  }

  .panel-handle {
    width: 100%;
    height: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    color: var(--text);
    background: var(--panel-solid);
    border-bottom: 1px solid var(--line);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
  }

  .panel-handle span {
    width: 46px;
    height: 5px;
    background: #8795a7;
    border-radius: 999px;
  }

  .panel-handle strong {
    font-size: 12px;
  }

  .panel-content {
    height: calc(66dvh - 52px);
    padding: 14px 14px 44px;
  }

  .map-legend {
    margin-bottom: 9px;
  }

  .ambassador-banner {
    width: min(98%, 310px);
    margin-top: 10px;
    margin-bottom: 1px;
  }

  .meetup-card {
    padding: 16px;
    border-radius: 20px;
  }

  .meetup-card h1 {
    font-size: 21px;
  }

  .social-button {
    min-height: 56px;
  }

  .leaflet-control-zoom {
    margin-top: 108px !important;
  }

  .map-attribution {
    top: 90px;
    right: 8px;
    bottom: auto;
    left: auto;
    max-width: 47vw;
    font-size: 7px;
  }

  .about-modal,
  .conduct-modal {
    max-height: calc(100dvh - 22px);
    border-radius: 21px;
  }

  .conduct-modal {
    height: calc(100dvh - 22px);
  }

  .modal-header {
    padding: 17px 17px 13px;
  }

  .modal-header h2 {
    font-size: 23px;
  }

  .modal-body {
    padding: 16px 17px 6px;
  }

  .modal-body p {
    font-size: 14px;
    line-height: 1.56;
  }

  .modal-done {
    margin: 9px 17px 17px;
  }

  .pdf-frame-wrap {
    padding: 8px;
  }

  .pdf-pages {
    gap: 8px;
  }

  .pdf-page-image {
    border-radius: 9px;
  }

  .conduct-actions {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .modal-open-pdf,
  .conduct-done {
    min-height: 48px;
  }
  .panel-footer {
    padding-top: 17px;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .site-header {
    grid-template-columns: 94px minmax(0, 1fr) 34px;
    column-gap: 7px;
  }

  .txk-logo {
    max-width: 94px;
  }

  .brand-copy > strong {
    font-size: 16.25px;
  }

  .brand-copy > span {
    font-size: 10.25px;
  }

  .ambassador-star {
    width: 34px;
    height: 34px;
  }
}





/* v24: the outside-of-park shading is now drawn by a real Leaflet mask. */
.leaflet-pane.leaflet-dim-pane {
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .leaflet-pane.leaflet-dim-pane {
  mix-blend-mode: normal;
}


/* POI popup thumbnails and purple TXK Rally Point */
.poi-popup {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.poi-popup-image {
  width: 58px;
  height: 58px;
  min-width: 58px;
  display: block;
  object-fit: cover;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 13px rgba(17, 35, 55, 0.24);
}

.poi-popup-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.poi-popup-copy strong {
  margin: 0 0 3px;
}

.poi-popup-copy span {
  color: var(--muted);
}

.poi-popup-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}



/* Campsite Gym popup styling */
.campsite-popup .poi-popup-copy strong {
  color: #9c27b0;
}

.meetup-location-popup .poi-popup-image {
  border-color: #e8899a;
  background: #e8899a;
}

.meetup-location-popup .poi-popup-copy p {
  color: #6b4a70;
  font-weight: 700;
}

html[data-theme="dark"] .campsite-popup .poi-popup-copy strong {
  color: #d998ed;
}

html[data-theme="dark"] .meetup-location-popup .poi-popup-copy p {
  color: #e1c3e8;
}


/* v28 Campsite Gym icons and readable Ambassador popup logo */
.specialgym-icon img {
  filter: drop-shadow(0 4px 9px rgba(48, 45, 80, 0.52));
}

.campsite-popup {
  min-width: 300px;
  gap: 14px;
}

.campsite-popup .poi-popup-image {
  width: 88px;
  height: 88px;
  min-width: 88px;
  padding: 3px;
  object-fit: contain;
  background: #ffffff;
  border: 3px solid #78c9ed;
  border-radius: 50%;
  box-shadow: 0 5px 16px rgba(24, 45, 68, 0.24);
}

.campsite-popup .poi-popup-copy strong {
  color: #9c27b0;
}

.genuine-campsite-popup .poi-popup-image {
  border-color: #a94fc0;
}

.meetup-location-popup .poi-popup-copy p {
  color: #6b4a70;
  font-weight: 750;
}

html[data-theme="dark"] .campsite-popup .poi-popup-copy strong {
  color: #dda0ec;
}

html[data-theme="dark"] .campsite-popup .poi-popup-image {
  background: #ffffff;
}

@media (max-width: 430px) {
  .campsite-popup {
    min-width: 245px;
  }

  .campsite-popup .poi-popup-image {
    width: 72px;
    height: 72px;
    min-width: 72px;
  }
}


/* v30 circular button logos matching the Campfire button */
.social-logo-mark {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.social-logo-mark img {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18));
}

.about-social .social-logo-mark img {
  background: #111111;
}

@media (max-width: 430px) {
  .social-logo-mark,
  .social-logo-mark img {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
}


/* v32 clickable POI legend filters */
.legend-filter {
  appearance: none;
  font-family: inherit;
  cursor: pointer;
  transition:
    transform 150ms ease,
    opacity 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.legend-filter:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 13px rgba(24, 48, 74, 0.12);
}

.legend-filter:active {
  transform: translateY(0);
}

.legend-filter:focus-visible {
  outline: 3px solid rgba(27, 151, 217, 0.34);
  outline-offset: 2px;
}

.map-legend.is-filtered .legend-filter:not(.is-active) {
  opacity: 0.48;
}

.legend-filter[data-filter="pokestop"].is-active {
  color: #075f91;
  background: #dff5ff;
  border-color: #52bfe9;
  box-shadow: 0 0 0 3px rgba(82, 191, 233, 0.18);
}

.legend-filter[data-filter="gym"].is-active {
  color: #6d5200;
  background: #fff1b8;
  border-color: #e8ba28;
  box-shadow: 0 0 0 3px rgba(232, 186, 40, 0.18);
}

.legend-filter[data-filter="powerspot"].is-active {
  color: #7a174f;
  background: #f6ddec;
  border-color: #b84f89;
  box-shadow: 0 0 0 3px rgba(184, 79, 137, 0.17);
}

html[data-theme="dark"] .legend-filter[data-filter="pokestop"].is-active {
  color: #dff7ff;
  background: #195673;
  border-color: #62c7ed;
}

html[data-theme="dark"] .legend-filter[data-filter="gym"].is-active {
  color: #fff6cf;
  background: #665514;
  border-color: #e7c449;
}

html[data-theme="dark"] .legend-filter[data-filter="powerspot"].is-active {
  color: #ffe8f5;
  background: #6c2850;
  border-color: #d06b9f;
}

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

@media (max-width: 820px) {
  .legend-filter {
    min-height: 43px;
    padding: 8px 12px;
  }
}


/* v33 selectable map styles */
.map-style-toggle-control {
  font-family: Arial, sans-serif;
  font-size: 17px !important;
}

.map-style-toggle-control[aria-expanded="true"] {
  color: #ffffff !important;
  background: #187fbd !important;
}

.map-style-menu {
  position: absolute;
  top: 64px;
  left: 41px;
  z-index: 10000;
  width: 178px;
  padding: 7px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-solid) 97%, transparent);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 14px 34px rgba(15, 30, 48, 0.26);
  backdrop-filter: blur(13px);
}

.map-style-menu[hidden] {
  display: none;
}

.map-style-option {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 140ms ease;
}

.map-style-option:hover,
.map-style-option:focus-visible {
  background: var(--pill);
  border-color: var(--line);
  outline: none;
}

.map-style-option:active {
  transform: scale(0.985);
}

.map-style-option.is-active {
  color: #0d6f9e;
  background: #e5f6ff;
  border-color: #65bee6;
}

html[data-theme="dark"] .map-style-option.is-active {
  color: #dff6ff;
  background: #205570;
  border-color: #5bbce4;
}

.map-style-option-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.map-style-check {
  justify-self: center;
  opacity: 0;
  font-size: 15px;
}

.map-style-option.is-active .map-style-check {
  opacity: 1;
}

.map-style-swatch {
  width: 28px;
  height: 28px;
  display: block;
  overflow: hidden;
  border: 2px solid #ffffff;
  border-radius: 7px;
  box-shadow:
    0 0 0 1px rgba(38, 59, 79, 0.18),
    0 3px 7px rgba(31, 48, 65, 0.18);
}

.map-style-swatch-pokemon {
  background:
    linear-gradient(145deg, transparent 43%, rgba(85, 185, 232, 0.9) 44% 51%, transparent 52%),
    linear-gradient(35deg, transparent 46%, rgba(255, 210, 78, 0.95) 47% 54%, transparent 55%),
    #bfe9b6;
}

.map-style-swatch-clean {
  background:
    repeating-linear-gradient(28deg, transparent 0 7px, rgba(153, 162, 171, 0.34) 8px 9px),
    #f4f4f1;
}

.map-style-swatch-streets {
  background:
    linear-gradient(90deg, transparent 42%, #f5c14e 43% 55%, transparent 56%),
    linear-gradient(28deg, transparent 42%, #8dc7e3 43% 49%, transparent 50%),
    #eadfca;
}

.map-style-swatch-terrain {
  background:
    repeating-radial-gradient(circle at 75% 30%, transparent 0 5px, rgba(115, 93, 62, 0.42) 6px 7px),
    linear-gradient(145deg, #b9dc9f, #e0d39c);
}

.map-style-swatch-satellite {
  background:
    linear-gradient(145deg, rgba(21, 65, 97, 0.2), rgba(10, 46, 74, 0.05)),
    radial-gradient(circle at 70% 32%, #7fac61 0 24%, transparent 25%),
    linear-gradient(125deg, #315a3b 0 42%, #245c75 43% 57%, #6f8c4c 58%);
}

/* Prevent the global dark-map filter from making satellite imagery look inverted. */
html[data-map-style="satellite"] .leaflet-pane.leaflet-basemap-pane {
  filter: saturate(1.08) contrast(1.04) brightness(0.96);
}

html[data-theme="dark"][data-map-style="satellite"]
  .leaflet-pane.leaflet-basemap-pane {
  filter: saturate(0.90) contrast(1.10) brightness(0.61);
}

html[data-map-style="satellite"] .leaflet-pane.leaflet-labels-pane {
  opacity: 1;
  filter: none;
}

html[data-theme="dark"][data-map-style="satellite"]
  .leaflet-pane.leaflet-labels-pane {
  opacity: 0.94;
  filter: brightness(0.92) contrast(1.08);
}

@media (max-width: 430px) {
  .map-style-menu {
    top: 64px;
    left: 40px;
    width: 168px;
  }

  .map-style-option {
    min-height: 44px;
  }
}


/* v35 separation between primary actions and external social links */
.button-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 5px 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.button-divider::before,
.button-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.button-divider span {
  white-space: nowrap;
}

.button-divider + .social-links {
  margin-top: 10px;
}

@media (max-width: 820px) {
  .button-divider {
    margin-top: 13px;
    font-size: 9px;
  }
}


/* v39 campsite help control and popup */
.campsite-help-control {
  font-size: 18px !important;
  font-weight: 950 !important;
  color: #74459b !important;
}

.campsite-help-control:hover,
.campsite-help-control:focus-visible {
  color: #ffffff !important;
  background: #74459b !important;
}

.campsite-modal {
  width: min(590px, calc(100vw - 32px));
}

.campsite-modal-body {
  text-align: center;
}

.campsite-modal-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.58;
}

.campsite-question-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  margin: 4px auto 18px;
  color: #ffffff;
  background: linear-gradient(145deg, #74459b, #a765c5);
  border-radius: 50%;
  font-size: 42px;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(116, 69, 155, 0.24);
}

@media (max-width: 820px) {
  .campsite-modal-body p {
    font-size: 16px;
  }
}


/* v40 Ambassador star for the campsite help button and popup */
.campsite-help-control {
  padding: 7px !important;
}

.campsite-help-control img {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(70, 38, 98, 0.28));
}

.campsite-help-control:hover img,
.campsite-help-control:focus-visible img {
  filter:
    brightness(1.06)
    drop-shadow(0 2px 5px rgba(255, 255, 255, 0.24));
}

.campsite-question-icon {
  width: 82px;
  height: 82px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.campsite-question-icon img {
  width: 82px;
  height: 82px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(116, 69, 155, 0.26));
}

@media (max-width: 820px) {
  .campsite-help-control img {
    width: 20px;
    height: 20px;
  }

  .campsite-question-icon,
  .campsite-question-icon img {
    width: 76px;
    height: 76px;
  }
}


/* v42 GO Fest community photo in the About PoGo TXK popup */
.about-community-photo {
  position: relative;
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 8px 22px rgba(17, 35, 55, 0.12);
}

.about-community-photo img {
  width: 100%;
  height: 205px;
  display: block;
  object-fit: cover;
  object-position: center 48%;
}

.about-community-photo span {
  position: absolute;
  right: 10px;
  bottom: 9px;
  left: 10px;
  padding: 8px 10px;
  color: #ffffff;
  background: linear-gradient(
    90deg,
    rgba(15, 39, 66, 0.88),
    rgba(15, 39, 66, 0.62)
  );
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  backdrop-filter: blur(5px);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

html[data-theme="dark"] .about-community-photo {
  background: #172739;
  border-color: rgba(255, 255, 255, 0.13);
}

@media (max-width: 820px) {
  .about-community-photo {
    margin-bottom: 16px;
    border-radius: 15px;
  }

  .about-community-photo img {
    height: 175px;
  }

  .about-community-photo span {
    right: 8px;
    bottom: 8px;
    left: 8px;
    font-size: 10px;
  }
}

@media (max-width: 430px) {
  .about-community-photo img {
    height: 155px;
  }
}


/* v45 clickable meetup location and footer divider */
.meetup-location-button {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 3px 7px;
  color: #8f31ad;
  background: rgba(156, 95, 189, 0.10);
  border: 1px solid rgba(156, 95, 189, 0.30);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.meetup-location-button:hover {
  color: #70248a;
  background: rgba(156, 95, 189, 0.18);
  border-color: rgba(143, 49, 173, 0.52);
  box-shadow: 0 4px 11px rgba(102, 48, 126, 0.14);
  transform: translateY(-1px);
}

.meetup-location-button:active {
  transform: translateY(0);
}

.meetup-location-button:focus-visible {
  outline: 3px solid rgba(156, 95, 189, 0.28);
  outline-offset: 2px;
}

html[data-theme="dark"] .meetup-location-button {
  color: #edc8fa;
  background: rgba(180, 112, 211, 0.16);
  border-color: rgba(206, 145, 232, 0.36);
}

html[data-theme="dark"] .meetup-location-button:hover {
  color: #ffffff;
  background: rgba(180, 112, 211, 0.25);
  border-color: rgba(226, 177, 247, 0.58);
}

.footer-divider {
  height: 1px;
  margin: 15px 5px 0;
  background: var(--line);
}

.footer-divider + .panel-footer {
  margin-top: 0;
  border-top: 0;
  padding-top: 14px;
}

@media (max-width: 820px) {
  .meetup-location-button {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 14px;
  }

  .footer-divider {
    margin-top: 16px;
  }
}


/* v46 compact POI filter selector and larger header typography */
.poi-filter-toggle-control {
  font-family: Arial, sans-serif;
  font-size: 18px !important;
  line-height: 1 !important;
}

.poi-filter-toggle-control[aria-expanded="true"] {
  color: #ffffff !important;
  background: #187fbd !important;
}

.poi-filter-menu {
  position: absolute;
  top: 64px;
  left: 41px;
  z-index: 10001;
  width: 176px;
  padding: 7px;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-solid) 97%, transparent);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: 0 14px 34px rgba(15, 30, 48, 0.26);
  backdrop-filter: blur(13px);
}

.poi-filter-menu[hidden] {
  display: none;
}

.poi-filter-option {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
}

.poi-filter-option:hover,
.poi-filter-option:focus-visible {
  background: var(--pill);
  border-color: var(--line);
  outline: none;
}

.poi-filter-option.is-active {
  color: #0d6f9e;
  background: #e5f6ff;
  border-color: #65bee6;
}

html[data-theme="dark"] .poi-filter-option.is-active {
  color: #dff6ff;
  background: #205570;
  border-color: #5bbce4;
}

.poi-filter-option-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #1d91ca;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
}

.poi-filter-option[data-poi-filter="gym"] .poi-filter-option-icon {
  background: #d1ad2e;
}

.poi-filter-option[data-poi-filter="powerspot"] .poi-filter-option-icon {
  background: #9a286a;
}

.poi-filter-option[data-poi-filter=""] .poi-filter-option-icon {
  background: #405b76;
}

.poi-filter-check {
  justify-self: center;
  opacity: 0;
}

.poi-filter-option.is-active .poi-filter-check {
  opacity: 1;
}

/* Slightly wider text area, larger desktop type, and less gap before the star. */
.site-header {
  width: min(700px, calc(100vw - 430px));
  grid-template-columns: 150px minmax(0, 1fr) 54px;
  column-gap: 9px;
}

.brand-copy > strong {
  font-size: clamp(30px, 2.05vw, 34px);
}

.brand-copy > span {
  margin-top: 6px;
  font-size: 17px;
}

@media (max-width: 1100px) {
  .site-header {
    width: min(680px, calc(100vw - 410px));
    column-gap: 8px;
  }

  .brand-copy > strong {
    font-size: 27px;
  }

  .brand-copy > span {
    font-size: 15px;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 102px minmax(0, 1fr) 42px;
    column-gap: 7px;
  }

  .brand-copy > strong {
    font-size: clamp(21px, 5.7vw, 27px);
    line-height: 1.02;
    white-space: normal;
  }

  .brand-copy > span {
    margin-top: 5px;
    font-size: clamp(12.5px, 3.45vw, 16px);
    line-height: 1.12;
    white-space: normal;
  }

  .poi-filter-menu {
    top: 64px;
    left: 40px;
    width: 168px;
  }

  .poi-filter-option {
    min-height: 44px;
  }
}

@media (max-width: 430px) {
  .site-header {
    grid-template-columns: 92px minmax(0, 1fr) 36px;
    column-gap: 6px;
  }

  .brand-copy > strong {
    font-size: clamp(20px, 5.8vw, 24px);
  }

  .brand-copy > span {
    font-size: clamp(11.5px, 3.3vw, 14px);
  }

  .ambassador-star {
    width: 36px;
    height: 36px;
  }
}


/* v47 clear map-pin filter icon and mobile header repair */
.poi-filter-toggle-control {
  padding: 6px !important;
}

.poi-filter-pin-icon {
  width: 20px;
  height: 20px;
  display: block;
  color: currentColor;
  pointer-events: none;
}

.poi-filter-toggle-control[aria-expanded="true"]
  .poi-filter-pin-icon {
  color: #ffffff;
}

/*
  The previous mobile rule inherited a desktop width based on
  calc(100vw - 430px), which could collapse the banner on phones.
  These rules force a full-width horizontal header on mobile.
*/
@media (max-width: 820px) {
  .site-header {
    top: max(8px, env(safe-area-inset-top)) !important;
    right: auto !important;
    left: 8px !important;
    width: calc(100vw - 16px) !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 98px !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) 44px !important;
    grid-template-rows: auto !important;
    align-items: center !important;
    column-gap: 7px !important;
    padding: 12px 13px !important;
    overflow: hidden !important;
    border-radius: 21px !important;
  }

  .site-header .txk-logo {
    width: 96px !important;
    max-width: 96px !important;
    height: 58px !important;
    max-height: 58px !important;
    align-self: center !important;
    justify-self: start !important;
    object-fit: contain !important;
  }

  .site-header .brand-copy {
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: visible !important;
  }

  .site-header .brand-copy > strong {
    width: 100% !important;
    margin: 0 !important;
    font-size: clamp(22px, 6.1vw, 28px) !important;
    line-height: 1.01 !important;
    letter-spacing: -0.035em !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .site-header .brand-copy > span {
    width: 100% !important;
    margin-top: 6px !important;
    font-size: clamp(12px, 3.45vw, 15px) !important;
    line-height: 1.13 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  .site-header .ambassador-star {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    align-self: center !important;
    justify-self: end !important;
    object-fit: contain !important;
  }

  /*
    Keep the zoom and custom controls safely below the repaired banner.
  */
  .leaflet-control-zoom {
    margin-top: 122px !important;
  }
}

@media (max-width: 430px) {
  .site-header {
    min-height: 94px !important;
    grid-template-columns: 88px minmax(0, 1fr) 40px !important;
    column-gap: 6px !important;
    padding: 11px 12px !important;
  }

  .site-header .txk-logo {
    width: 88px !important;
    max-width: 88px !important;
    height: 53px !important;
    max-height: 53px !important;
  }

  .site-header .brand-copy > strong {
    font-size: clamp(20px, 5.8vw, 24px) !important;
    line-height: 1.02 !important;
  }

  .site-header .brand-copy > span {
    margin-top: 5px !important;
    font-size: clamp(11px, 3.2vw, 13px) !important;
  }

  .site-header .ambassador-star {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  .leaflet-control-zoom {
    margin-top: 116px !important;
  }
}


/* v48 requested map-control order and menu alignment */
.poi-filter-menu {
  top: 0 !important;
}

.map-style-menu {
  top: 32px !important;
}

/* Slight separation without changing the requested order. */
.leaflet-control-map-tools > button {
  flex: 0 0 32px;
}


/* v49 — let a two-line mobile title fill the header banner */
@media (max-width: 820px) {
  .site-header {
    min-height: 112px !important;
    grid-template-columns: 96px minmax(0, 1fr) 48px !important;
    column-gap: 9px !important;
    padding: 13px 14px !important;
  }

  .site-header .brand-copy {
    align-self: stretch !important;
    min-height: 84px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 7px !important;
  }

  .site-header .brand-copy > strong {
    flex: 0 0 auto !important;
    font-size: clamp(27px, 7vw, 34px) !important;
    line-height: 0.98 !important;
    letter-spacing: -0.045em !important;
    text-wrap: balance !important;
  }

  .site-header .brand-copy > span {
    flex: 0 0 auto !important;
    margin: 0 !important;
    font-size: clamp(14px, 3.8vw, 18px) !important;
    line-height: 1.08 !important;
    text-wrap: balance !important;
  }

  .site-header .txk-logo {
    width: 96px !important;
    height: 64px !important;
  }

  .site-header .ambassador-star {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
  }

  .leaflet-control-zoom {
    margin-top: 136px !important;
  }
}

@media (max-width: 430px) {
  .site-header {
    min-height: 108px !important;
    grid-template-columns: 88px minmax(0, 1fr) 43px !important;
    column-gap: 8px !important;
    padding: 12px 13px !important;
  }

  .site-header .brand-copy {
    min-height: 80px !important;
    gap: 6px !important;
  }

  .site-header .brand-copy > strong {
    font-size: clamp(25px, 7.1vw, 30px) !important;
    line-height: 0.99 !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(13px, 3.6vw, 16px) !important;
  }

  .site-header .txk-logo {
    width: 88px !important;
    height: 58px !important;
  }

  .site-header .ambassador-star {
    width: 43px !important;
    height: 43px !important;
    min-width: 43px !important;
  }

  .leaflet-control-zoom {
    margin-top: 130px !important;
  }
}


/* v50 — polished mobile banner and meetup-height information panel */
@media (max-width: 820px) {
  .site-header {
    top: max(10px, env(safe-area-inset-top)) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 102px !important;
    height: 102px !important;
    grid-template-columns: 100px minmax(0, 1fr) 50px !important;
    align-items: center !important;
    column-gap: 11px !important;
    padding: 12px 15px !important;
    overflow: hidden !important;
    border-radius: 23px !important;
    background:
      linear-gradient(
        132deg,
        rgba(17, 53, 88, 0.99),
        rgba(31, 83, 132, 0.99)
      ) !important;
    box-shadow:
      0 12px 28px rgba(15, 36, 57, 0.24),
      inset 0 1px rgba(255, 255, 255, 0.08) !important;
  }

  .site-header .txk-logo {
    width: 100px !important;
    max-width: 100px !important;
    height: 61px !important;
    max-height: 61px !important;
    align-self: center !important;
    justify-self: center !important;
    object-fit: contain !important;
  }

  .site-header .brand-copy {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    align-self: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 5px !important;
    overflow: visible !important;
  }

  .site-header .brand-copy > strong {
    width: 100% !important;
    margin: 0 !important;
    color: #ffffff !important;
    font-size: clamp(25px, 6.5vw, 31px) !important;
    font-weight: 900 !important;
    line-height: 0.99 !important;
    letter-spacing: -0.04em !important;
    text-align: left !important;
    text-wrap: balance !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
  }

  .site-header .brand-copy > span {
    width: 100% !important;
    margin: 0 !important;
    color: #e4eef8 !important;
    font-size: clamp(12.5px, 3.35vw, 15px) !important;
    font-weight: 750 !important;
    line-height: 1.13 !important;
    letter-spacing: -0.015em !important;
    text-align: left !important;
    text-wrap: balance !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .site-header .ambassador-star {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    align-self: center !important;
    justify-self: center !important;
    object-fit: contain !important;
  }

  .leaflet-control-zoom {
    margin-top: 122px !important;
  }

  .info-panel {
    height: var(--mobile-panel-open-height, 58dvh) !important;
    max-height: calc(
      100dvh - max(176px, env(safe-area-inset-top))
    ) !important;
  }

  .panel-content {
    height: calc(100% - 52px) !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-bottom: 28px !important;
  }

  /*
   * The first primary button intentionally starts below the visible panel.
   * It remains immediately available by scrolling inside Community Info.
   */
  .primary-links {
    scroll-margin-top: 12px;
  }
}

@media (max-width: 430px) {
  .site-header {
    right: 10px !important;
    left: 10px !important;
    min-height: 98px !important;
    height: 98px !important;
    grid-template-columns: 92px minmax(0, 1fr) 46px !important;
    column-gap: 9px !important;
    padding: 11px 13px !important;
    border-radius: 22px !important;
  }

  .site-header .txk-logo {
    width: 92px !important;
    max-width: 92px !important;
    height: 57px !important;
    max-height: 57px !important;
  }

  .site-header .brand-copy {
    gap: 4px !important;
  }

  .site-header .brand-copy > strong {
    font-size: clamp(23px, 6.35vw, 28px) !important;
    line-height: 1 !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(11.5px, 3.1vw, 13.5px) !important;
    line-height: 1.12 !important;
  }

  .site-header .ambassador-star {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
  }

  .leaflet-control-zoom {
    margin-top: 116px !important;
  }
}


/* v51 — final mobile header, panel crop, and footer divider cleanup */
.footer-divider {
  width: calc(100% - 12px) !important;
  height: 0 !important;
  margin: 16px auto 0 !important;
  background: transparent !important;
  border-top: 1px solid var(--line) !important;
  opacity: 1 !important;
}

.footer-divider + .panel-footer {
  margin-top: 0 !important;
  padding-top: 13px !important;
  border-top: 0 !important;
}

@media (max-width: 820px) {
  /*
   * Compact app-style mobile header:
   * balanced logo, restrained two-line title, one-line subtitle, and star.
   */
  .site-header {
    top: max(10px, env(safe-area-inset-top)) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 94px !important;
    min-height: 94px !important;
    grid-template-columns: 92px minmax(0, 1fr) 44px !important;
    align-items: center !important;
    column-gap: 10px !important;
    padding: 10px 14px !important;
    border-radius: 22px !important;
    overflow: hidden !important;
    background:
      linear-gradient(
        135deg,
        #153d63 0%,
        #205885 100%
      ) !important;
    box-shadow:
      0 10px 24px rgba(14, 37, 58, 0.22),
      inset 0 1px rgba(255, 255, 255, 0.08) !important;
  }

  .site-header .txk-logo {
    width: 92px !important;
    max-width: 92px !important;
    height: 54px !important;
    max-height: 54px !important;
    align-self: center !important;
    justify-self: center !important;
    object-fit: contain !important;
  }

  .site-header .brand-copy {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    align-self: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 5px !important;
    overflow: hidden !important;
  }

  .site-header .brand-copy > strong {
    width: 100% !important;
    margin: 0 !important;
    color: #ffffff !important;
    font-size: clamp(22px, 5.9vw, 27px) !important;
    font-weight: 900 !important;
    line-height: 0.99 !important;
    letter-spacing: -0.035em !important;
    text-align: left !important;
    text-wrap: balance !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
  }

  .site-header .brand-copy > span {
    width: 100% !important;
    margin: 0 !important;
    color: #e5eff8 !important;
    font-size: clamp(10.5px, 2.75vw, 12.5px) !important;
    font-weight: 750 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.01em !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .site-header .ambassador-star {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    align-self: center !important;
    justify-self: center !important;
    object-fit: contain !important;
  }

  .leaflet-control-zoom {
    margin-top: 114px !important;
  }

  .info-panel {
    height: var(--mobile-panel-open-height, 54dvh) !important;
    max-height: calc(100dvh - 165px) !important;
  }

  .panel-content {
    height: calc(100% - 52px) !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding: 14px 14px 34px !important;
  }

  /*
   * Adds breathing room before TXK Campfire after the user scrolls, while
   * ensuring the button stays fully below the initial visible panel.
   */
  .primary-links {
    margin-top: 18px !important;
  }

  .footer-divider {
    margin-top: 17px !important;
  }
}

@media (max-width: 430px) {
  .site-header {
    right: 10px !important;
    left: 10px !important;
    height: 90px !important;
    min-height: 90px !important;
    grid-template-columns: 84px minmax(0, 1fr) 41px !important;
    column-gap: 8px !important;
    padding: 9px 12px !important;
    border-radius: 21px !important;
  }

  .site-header .txk-logo {
    width: 84px !important;
    max-width: 84px !important;
    height: 50px !important;
    max-height: 50px !important;
  }

  .site-header .brand-copy {
    gap: 4px !important;
  }

  .site-header .brand-copy > strong {
    font-size: clamp(21px, 5.65vw, 25px) !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(10px, 2.65vw, 11.5px) !important;
  }

  .site-header .ambassador-star {
    width: 41px !important;
    height: 41px !important;
    min-width: 41px !important;
  }

  .leaflet-control-zoom {
    margin-top: 108px !important;
  }
}


/* v52 — clean mobile header without the Ambassador star */
@media (max-width: 820px) {
  .site-header {
    top: max(10px, env(safe-area-inset-top)) !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    height: 84px !important;
    min-height: 84px !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    column-gap: 11px !important;
    padding: 10px 15px !important;
    border-radius: 21px !important;
  }

  .site-header .ambassador-star {
    display: none !important;
  }

  .site-header .txk-logo {
    width: 88px !important;
    max-width: 88px !important;
    height: 52px !important;
    max-height: 52px !important;
    justify-self: center !important;
  }

  .site-header .brand-copy {
    min-width: 0 !important;
    gap: 5px !important;
    overflow: hidden !important;
  }

  .site-header .brand-copy > strong {
    font-size: clamp(20px, 5.35vw, 24px) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.03em !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    text-wrap: nowrap !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(10.5px, 2.7vw, 12px) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .leaflet-control-zoom {
    margin-top: 103px !important;
  }

  .info-panel {
    height: var(--mobile-panel-open-height, 50dvh) !important;
  }

  .panel-content {
    padding-bottom: 26px !important;
  }

  .primary-links {
    margin-top: 20px !important;
  }
}

@media (max-width: 430px) {
  .site-header {
    right: 10px !important;
    left: 10px !important;
    height: 80px !important;
    min-height: 80px !important;
    grid-template-columns: 80px minmax(0, 1fr) !important;
    column-gap: 9px !important;
    padding: 9px 12px !important;
    border-radius: 20px !important;
  }

  .site-header .txk-logo {
    width: 80px !important;
    max-width: 80px !important;
    height: 48px !important;
    max-height: 48px !important;
  }

  .site-header .brand-copy > strong {
    font-size: clamp(19px, 5.2vw, 22px) !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(9.8px, 2.55vw, 11px) !important;
  }

  .leaflet-control-zoom {
    margin-top: 98px !important;
  }
}


/* v53 — slightly larger mobile header typography */
@media (max-width: 820px) {
  .site-header .brand-copy > strong {
    font-size: clamp(22px, 5.75vw, 27px) !important;
    letter-spacing: -0.035em !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(11.5px, 2.95vw, 13.5px) !important;
  }
}

@media (max-width: 430px) {
  .site-header .brand-copy > strong {
    font-size: clamp(21px, 5.55vw, 24.5px) !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(10.8px, 2.8vw, 12px) !important;
  }
}


/* v56 — larger, centered mobile header text */
@media (max-width: 820px) {
  .site-header .brand-copy {
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .site-header .brand-copy > strong {
    width: 100% !important;
    font-size: clamp(23px, 5.95vw, 28px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.04em !important;
    text-align: center !important;
  }

  .site-header .brand-copy > span {
    width: 100% !important;
    font-size: clamp(12px, 3.05vw, 14px) !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }
}

@media (max-width: 430px) {
  .site-header .brand-copy > strong {
    font-size: clamp(22px, 5.8vw, 25px) !important;
  }

  .site-header .brand-copy > span {
    font-size: clamp(11.5px, 2.95vw, 12.5px) !important;
  }
}


/* v57 — larger, better-proportioned mobile TXK logo */
@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 112px minmax(0, 1fr) !important;
    column-gap: 14px !important;
    padding-right: 20px !important;
    padding-left: 16px !important;
  }

  .site-header .txk-logo {
    width: 110px !important;
    max-width: 110px !important;
    height: 64px !important;
    max-height: 64px !important;
    justify-self: center !important;
    object-fit: contain !important;
  }

  .site-header .brand-copy {
    padding-right: 4px !important;
  }
}

@media (max-width: 430px) {
  .site-header {
    grid-template-columns: 102px minmax(0, 1fr) !important;
    column-gap: 12px !important;
    padding-right: 16px !important;
    padding-left: 14px !important;
  }

  .site-header .txk-logo {
    width: 100px !important;
    max-width: 100px !important;
    height: 59px !important;
    max-height: 59px !important;
  }

  .site-header .brand-copy {
    padding-right: 2px !important;
  }
}


/* v64 — desktop filter floats directly beside the title bar */
@media (min-width: 1350px) {
  body > #poiLegend.map-legend--desktop-floating {
    position: fixed !important;
    top: 14px !important;
    left: calc(min(700px, calc(100vw - 430px)) + 28px) !important;
    z-index: 1090 !important;

    width: 360px !important;
    height: 88px !important;
    min-height: 88px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;

    margin: 0 !important;
    padding: 12px 14px !important;

    background: color-mix(in srgb, var(--panel-solid) 95%, transparent) !important;
    border: 1px solid var(--line) !important;
    border-radius: 22px !important;
    box-shadow: 0 14px 34px rgba(16, 32, 51, 0.18) !important;
    backdrop-filter: blur(10px) !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill {
    flex: 0 0 auto !important;
    padding: 8px 11px !important;
  }
}

/* On smaller desktop widths, keep it floating below the title rather than
   putting it back in the sidebar or allowing it to overlap the panel. */
@media (min-width: 821px) and (max-width: 1349px) {
  body > #poiLegend.map-legend--desktop-floating {
    position: fixed !important;
    top: 114px !important;
    left: 14px !important;
    z-index: 1090 !important;

    width: min(700px, calc(100vw - 430px)) !important;
    min-height: 58px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 9px !important;

    margin: 0 !important;
    padding: 9px 12px !important;

    background: color-mix(in srgb, var(--panel-solid) 95%, transparent) !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 26px rgba(16, 32, 51, 0.16) !important;
    backdrop-filter: blur(10px) !important;
  }
}

/* Once returned to the mobile Community Info panel, use the normal layout. */
@media (max-width: 820px) {
  #panelContent > #poiLegend {
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 10px !important;
    transform: none !important;
  }
}


/* v65 — floating POI filter below/beside the title on every screen */
body > #poiLegend.map-legend--desktop-floating {
  background: linear-gradient(
    135deg,
    rgba(20, 72, 112, 0.97),
    rgba(28, 94, 141, 0.97)
  ) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 12px 30px rgba(8, 31, 53, 0.28) !important;
  backdrop-filter: blur(12px) !important;
}

body > #poiLegend.map-legend--desktop-floating .legend-pill {
  background: rgba(255, 255, 255, 0.94) !important;
  border-color: rgba(210, 226, 239, 0.95) !important;
  color: #10243a !important;
  box-shadow: 0 3px 10px rgba(8, 31, 53, 0.12) !important;
}

/* Large desktop: beside the title bar */
@media (min-width: 1350px) {
  body > #poiLegend.map-legend--desktop-floating {
    top: 14px !important;
    left: calc(min(700px, calc(100vw - 430px)) + 28px) !important;
    width: 360px !important;
    height: 88px !important;
    min-height: 88px !important;
    border-radius: 22px !important;
  }
}

/* Smaller desktop/tablet landscape: below the title bar */
@media (min-width: 821px) and (max-width: 1349px) {
  body > #poiLegend.map-legend--desktop-floating {
    top: 114px !important;
    left: 14px !important;
    width: min(700px, calc(100vw - 430px)) !important;
    min-height: 58px !important;
    border-radius: 18px !important;
  }
}

/* Mobile: compact floating bar directly below the blue title banner */
@media (max-width: 820px) {
  body > #poiLegend.map-legend--desktop-floating {
    position: fixed !important;
    top: 184px !important;
    left: 18px !important;
    right: 18px !important;
    z-index: 1090 !important;

    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 58px !important;
    max-width: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;

    margin: 0 !important;
    padding: 9px 10px !important;
    transform: none !important;

    border-radius: 18px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    padding: 8px 6px !important;
    font-size: clamp(10px, 2.8vw, 12px) !important;
    white-space: nowrap !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 18px !important;
    height: 18px !important;
  }

  /* The panel no longer reserves space for the filter. */
  #panelContent {
    padding-top: 12px !important;
  }
}

/* Slightly tighter placement on short/small phones */
@media (max-width: 430px) {
  body > #poiLegend.map-legend--desktop-floating {
    top: 182px !important;
    left: 14px !important;
    right: 14px !important;
    min-height: 56px !important;
    padding: 8px !important;
    gap: 6px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill {
    padding: 7px 5px !important;
  }
}


/* v66 — smaller mobile filter, positioned directly below the title bar */
@media (max-width: 820px) {
  body > #poiLegend.map-legend--desktop-floating {
    top: 126px !important;
    left: 24px !important;
    right: 24px !important;

    min-height: 46px !important;
    padding: 6px 7px !important;
    gap: 6px !important;

    border-radius: 15px !important;
    box-shadow: 0 8px 22px rgba(8, 31, 53, 0.24) !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 34px !important;
    padding: 5px 4px !important;
    font-size: clamp(9.5px, 2.55vw, 11px) !important;
    line-height: 1 !important;
    border-radius: 999px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 15px !important;
    height: 15px !important;
  }
}

@media (max-width: 430px) {
  body > #poiLegend.map-legend--desktop-floating {
    top: 124px !important;
    left: 22px !important;
    right: 22px !important;
    min-height: 44px !important;
    padding: 5px 6px !important;
    gap: 5px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 32px !important;
    padding: 4px 3px !important;
    font-size: clamp(9px, 2.45vw, 10.5px) !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 14px !important;
    height: 14px !important;
  }
}


/* v67 — compact mobile filter tucked under the title and clear of map controls */
@media (max-width: 820px) {
  body > #poiLegend.map-legend--desktop-floating {
    top: 101px !important;
    left: 52px !important;
    right: 14px !important;

    width: auto !important;
    max-width: 370px !important;
    min-height: 40px !important;

    padding: 4px 5px !important;
    gap: 4px !important;

    border-radius: 13px !important;
    box-shadow: 0 7px 18px rgba(8, 31, 53, 0.22) !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 30px !important;
    padding: 4px 3px !important;

    font-size: clamp(8.8px, 2.35vw, 10.2px) !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;

    border-radius: 999px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 13px !important;
    height: 13px !important;
    margin-right: 3px !important;
  }
}

@media (max-width: 430px) {
  body > #poiLegend.map-legend--desktop-floating {
    top: 99px !important;
    left: 50px !important;
    right: 12px !important;

    min-height: 38px !important;
    padding: 4px !important;
    gap: 3px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 29px !important;
    padding: 3px 2px !important;
    font-size: clamp(8.5px, 2.25vw, 9.8px) !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 12px !important;
    height: 12px !important;
    margin-right: 2px !important;
  }
}


/* v68 — single top floating mobile filter only, matching mock */
@media (max-width: 820px) {
  /* Hide the in-panel/mobile legend so only the top floating one shows */
  .community-sheet .poi-legend,
  .community-sheet #poiLegend,
  .sheet-body .poi-legend,
  .sheet-body #poiLegend {
    display: none !important;
  }

  /* Show and place only the floating legend directly under the header */
  body > #poiLegend.map-legend--desktop-floating,
  #poiLegend.map-legend--desktop-floating {
    display: flex !important;
    position: fixed !important;
    top: 132px !important;
    left: 196px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    min-height: 34px !important;
    padding: 4px 5px !important;
    gap: 4px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #0f5f96 0%, #0c6aa7 100%) !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    box-shadow: 0 8px 18px rgba(8,31,53,.22) !important;
    z-index: 1200 !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill,
  #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 28px !important;
    padding: 4px 8px !important;
    border-radius: 999px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img,
  #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 12px !important;
    height: 12px !important;
    margin-right: 4px !important;
  }
}

@media (max-width: 520px) {
  body > #poiLegend.map-legend--desktop-floating,
  #poiLegend.map-legend--desktop-floating {
    top: 132px !important;
    left: 186px !important;
    right: 10px !important;
    min-height: 32px !important;
    padding: 3px 4px !important;
    gap: 3px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill,
  #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 27px !important;
    padding: 3px 7px !important;
    font-size: 9.5px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img,
  #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 11px !important;
    height: 11px !important;
    margin-right: 3px !important;
  }
}

@media (max-width: 430px) {
  body > #poiLegend.map-legend--desktop-floating,
  #poiLegend.map-legend--desktop-floating {
    top: 134px !important;
    left: 178px !important;
    right: 8px !important;
  }
}


/* v69 — match the supplied mobile mock exactly:
   wider filter, directly attached beneath the title bar */
@media (max-width: 820px) {
  body > #poiLegend.map-legend--desktop-floating,
  #poiLegend.map-legend--desktop-floating {
    position: fixed !important;
    top: 90px !important;
    left: 100px !important;
    right: 10px !important;

    width: auto !important;
    max-width: none !important;
    min-height: 46px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;

    padding: 6px 7px !important;
    margin: 0 !important;

    border-radius: 14px !important;
    background: linear-gradient(135deg, #0f5f96 0%, #0c6aa7 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 20px rgba(8, 31, 53, 0.24) !important;
    z-index: 1200 !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill,
  #poiLegend.map-legend--desktop-floating .legend-pill {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 34px !important;

    padding: 6px 7px !important;
    border-radius: 999px !important;

    font-size: clamp(10px, 2.7vw, 11.5px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img,
  #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 14px !important;
    height: 14px !important;
    margin-right: 4px !important;
  }
}

@media (max-width: 430px) {
  body > #poiLegend.map-legend--desktop-floating,
  #poiLegend.map-legend--desktop-floating {
    top: 90px !important;
    left: 98px !important;
    right: 8px !important;
    min-height: 45px !important;
    padding: 5px 6px !important;
    gap: 5px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill,
  #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 33px !important;
    padding: 5px 6px !important;
    font-size: clamp(9.8px, 2.6vw, 11px) !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img,
  #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 13px !important;
    height: 13px !important;
  }
}


/* v70 — centered mobile filter with a visible spacer below the title bar */
@media (max-width: 820px) {
  body > #poiLegend.map-legend--desktop-floating,
  #poiLegend.map-legend--desktop-floating {
    top: 96px !important;
    right: auto !important;
    left: 50% !important;

    width: 74vw !important;
    max-width: 620px !important;
    min-width: 0 !important;
    min-height: 46px !important;

    transform: translateX(-50%) !important;

    padding: 6px 7px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill,
  #poiLegend.map-legend--desktop-floating .legend-pill {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 6px 7px !important;

    font-size: clamp(10px, 2.7vw, 11.5px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img,
  #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 14px !important;
    height: 14px !important;
    margin-right: 4px !important;
  }
}

@media (max-width: 430px) {
  body > #poiLegend.map-legend--desktop-floating,
  #poiLegend.map-legend--desktop-floating {
    top: 96px !important;
    width: 74vw !important;
    max-width: none !important;
    min-height: 45px !important;
    padding: 5px 6px !important;
    gap: 5px !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill,
  #poiLegend.map-legend--desktop-floating .legend-pill {
    min-height: 33px !important;
    padding: 5px 6px !important;
    font-size: clamp(9.8px, 2.6vw, 11px) !important;
  }

  body > #poiLegend.map-legend--desktop-floating .legend-pill img,
  #poiLegend.map-legend--desktop-floating .legend-pill img {
    width: 13px !important;
    height: 13px !important;
  }
}


/* v71 — mobile map attribution stays at the bottom of the visible map */
@media (max-width: 820px) {
  .map-attribution {
    top: auto !important;
    right: auto !important;
    bottom: var(--mobile-map-attribution-bottom, 68px) !important;
    left: 8px !important;

    max-width: calc(100vw - 16px) !important;
    padding: 3px 6px !important;

    font-size: 7px !important;
    line-height: 1.2 !important;

    z-index: 1040 !important;
  }
}


/* v72 — About PoGo TXK side-map information control */
.about-map-control {
  padding: 5px !important;
}

.about-map-control img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(16, 50, 84, 0.22));
}

.about-map-control:hover,
.about-map-control:focus-visible {
  background: #123254 !important;
}

.about-map-control:hover img,
.about-map-control:focus-visible img {
  filter:
    brightness(1.08)
    drop-shadow(0 2px 5px rgba(255, 255, 255, 0.24));
}

@media (max-width: 820px) {
  .about-map-control img {
    width: 21px;
    height: 21px;
  }
}
