:root {
  --navy: #102033;
  --navy-light: #18324d;
  --panel: rgba(255, 255, 255, 0.98);
  --text: #162238;
  --muted: #66758b;
  --line: #dfe6ee;
  --blue: #0797dc;
  --blue-dark: #0475b1;
  --purple: #9759be;
  --shadow: 0 18px 52px rgba(16, 32, 51, 0.24);
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  color: var(--text);
  background: #c9f4bd;
  font-family: Arial, Helvetica, sans-serif;
}

a,
button {
  font: inherit;
}

#map {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #c9f4bd;
}

/* Clean, Pokémon GO-inspired map palette. */
.leaflet-pane.leaflet-basemap-pane {
  opacity: 0.70;
  filter: saturate(0.72) contrast(0.90) brightness(1.08);
}

.leaflet-pane.leaflet-labels-pane {
  opacity: 0.48;
}

.site-header {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1100;
  width: min(640px, calc(100vw - 430px));
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px 10px 11px;
  color: white;
  background: linear-gradient(135deg, rgba(16, 32, 51, 0.98), rgba(24, 50, 77, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(16, 32, 51, 0.30);
  backdrop-filter: blur(10px);
}

.logo-plate {
  width: 194px;
  min-width: 194px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
}

.txk-logo {
  width: 100%;
  max-height: 52px;
  display: block;
  object-fit: contain;
}

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

.title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.title-line strong {
  min-width: 0;
  overflow: hidden;
  color: white;
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ambassador-star {
  width: 42px;
  height: 42px;
  min-width: 42px;
  display: block;
  object-fit: contain;
}

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

.info-panel {
  position: fixed;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 1050;
  width: min(380px, calc(100vw - 28px));
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(16, 32, 51, 0.09);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.panel-content {
  height: 100%;
  overflow-y: auto;
  padding: 17px;
}

.panel-handle {
  display: none;
}

.ambassador-banner {
  width: 100%;
  height: auto;
  display: block;
  margin: 1px auto 10px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(82, 42, 107, 0.18));
}

.map-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 9px 14px;
  padding: 11px;
  margin: 0 0 14px;
  color: #526078;
  background: #f5f8fa;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 11px;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

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

.meetup-card {
  padding: 19px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}

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

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

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

.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: #27344a;
  font-size: 13px;
}

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

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

.button,
.social-button {
  width: 100%;
  display: flex;
  align-items: center;
  text-decoration: none;
  font-weight: 850;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.button {
  min-height: 54px;
  justify-content: center;
  gap: 9px;
  padding: 13px 16px;
  border-radius: 14px;
}

.social-button {
  min-height: 62px;
  justify-content: flex-start;
  gap: 13px;
  padding: 12px 17px;
  color: white;
  border-radius: 15px;
  font-size: 16px;
}

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

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

.campfire {
  color: white;
  background: linear-gradient(135deg, #0a9de2, #087fc1);
}

.pogo-link {
  margin-top: 14px;
  color: var(--text);
  background: #eef3f7;
  border: 1px solid var(--line);
}

.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.17);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
}

.discord {
  background: #5865f2;
}

.facebook {
  background: #1877f2;
}

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

.x-social {
  background: #111111;
}

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

.poi-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(16, 32, 51, 0.35));
}

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

.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: 108px !important;
  border: 0 !important;
  box-shadow: 0 7px 22px rgba(16, 32, 51, 0.22) !important;
}

.leaflet-control-zoom a {
  color: var(--navy) !important;
  border: 0 !important;
}

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

  .logo-plate {
    width: 156px;
    min-width: 156px;
  }

  .title-line strong {
    font-size: 22px;
  }

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

@media (max-width: 820px) {
  .site-header {
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    width: calc(100vw - 16px);
    min-height: 68px;
    gap: 9px;
    padding: 7px 10px 7px 7px;
    border-radius: 15px;
  }

  .logo-plate {
    width: 102px;
    min-width: 102px;
    height: 50px;
    padding: 3px;
  }

  .txk-logo {
    max-height: 44px;
  }

  .title-line {
    gap: 7px;
  }

  .title-line strong {
    font-size: 17px;
  }

  .ambassador-star {
    width: 29px;
    height: 29px;
    min-width: 29px;
  }

  .brand-copy > span {
    margin-top: 4px;
    font-size: 10px;
    white-space: normal;
  }

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

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

  .panel-handle {
    width: 100%;
    height: 49px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    color: var(--text);
    background: white;
    border: 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
  }

  .panel-handle span {
    width: 40px;
    height: 4px;
    background: #b9c3cf;
    border-radius: 999px;
  }

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

  .panel-content {
    height: calc(61dvh - 49px);
    padding: 13px;
  }

  .ambassador-banner {
    margin-bottom: 9px;
  }

  .meetup-card {
    padding: 15px;
  }

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

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

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

@media (max-width: 430px) {
  .logo-plate {
    width: 84px;
    min-width: 84px;
  }

  .title-line strong {
    font-size: 15px;
  }

  .ambassador-star {
    width: 25px;
    height: 25px;
    min-width: 25px;
  }

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