.community-map-body {
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(98, 178, 255, 0.22), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(255, 202, 125, 0.22), transparent 30rem),
    radial-gradient(circle at 68% 82%, rgba(54, 221, 183, 0.2), transparent 34rem),
    linear-gradient(135deg, #f8fbff 0%, #edf5fb 42%, #f9fbf8 100%);
  color: #172b43;
}

.community-map-body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 34%, rgba(255, 255, 255, 0.68) 42%, transparent 50% 100%),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 12px);
  mix-blend-mode: soft-light;
  opacity: 0.56;
  content: "";
}

.pulse-particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.9;
}

.community-map-shell {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 1.5rem));
  padding-bottom: 3rem;
}

.community-map-body .nav {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(234, 245, 255, 0.58)),
    linear-gradient(90deg, rgba(215, 226, 236, 0.88), rgba(255, 255, 255, 0.7), rgba(196, 213, 229, 0.7));
  box-shadow:
    0 26px 74px rgba(25, 55, 92, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 -1px 0 rgba(139, 160, 184, 0.24) inset;
  backdrop-filter: blur(26px) saturate(1.14);
}

.community-map-hero {
  display: block;
  align-items: end;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.15rem, 3vw, 2.2rem) 0 clamp(0.8rem, 1.8vw, 1.2rem);
}

.community-map-hero h1 {
  display: inline-block;
  max-width: 100%;
  font-family: var(--display-font);
  font-size: clamp(2.28rem, 4.65vw, 4.38rem);
  line-height: 0.96;
  letter-spacing: 0;
  white-space: nowrap;
  background:
    linear-gradient(108deg, #13243a 0%, #334c68 17%, #eff7ff 28%, #375c86 38%, #2568ff 54%, #a75ce8 70%, #f1aa68 84%, #13243a 100%);
  background-size: 180% 100%;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 18px 28px rgba(58, 85, 123, 0.16));
  animation: metallicTitleSweep 8s ease-in-out infinite;
}

.community-map-hero p {
  max-width: 720px;
  margin-top: 0.62rem;
  color: #4f6988;
  font-size: clamp(0.98rem, 1.7vw, 1.2rem);
  line-height: 1.75;
  font-weight: 700;
}

.pulse-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 1fr));
  gap: 0.64rem;
  min-width: min(460px, 100%);
}

.pulse-summary div,
.pulse-detail-card,
.pulse-map-panel,
.pulse-side-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(214, 228, 241, 0.82);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(236, 246, 255, 0.68)),
    linear-gradient(115deg, rgba(180, 197, 216, 0.32), rgba(255, 255, 255, 0.44) 38%, rgba(136, 160, 187, 0.28) 70%, rgba(255, 223, 172, 0.22));
  box-shadow:
    0 28px 84px rgba(27, 61, 98, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.96) inset,
    0 -1px 0 rgba(128, 150, 176, 0.2) inset;
  backdrop-filter: blur(24px) saturate(1.16);
}

.pulse-summary div::before,
.pulse-detail-card::before,
.pulse-map-panel::before,
.pulse-side-panel::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 36%, rgba(255, 255, 255, 0.58) 43%, transparent 52% 100%),
    repeating-linear-gradient(95deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 9px);
  opacity: 0.5;
  content: "";
}

.pulse-summary div::after,
.pulse-map-panel::after {
  position: absolute;
  inset: 1px;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(88, 171, 255, 0.22), rgba(255, 217, 153, 0.2), transparent);
  opacity: 0.5;
  content: "";
  transform: translateX(-80%);
  animation: chromeSweep 7.5s ease-in-out infinite;
}

.pulse-summary div > *,
.pulse-detail-card > *,
.pulse-map-panel > *,
.pulse-side-panel > * {
  position: relative;
  z-index: 1;
}

.pulse-summary div {
  display: grid;
  gap: 0.18rem;
  border-radius: 18px;
  padding: 0.76rem 0.84rem;
}

.pulse-summary span {
  position: relative;
  z-index: 1;
  background: linear-gradient(115deg, #153253, #47769e 42%, #172b43);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  font-family: "Space Grotesk", var(--body-font);
  font-size: clamp(1.2rem, 2.4vw, 1.68rem);
  font-weight: 800;
}

.pulse-summary em {
  position: relative;
  z-index: 1;
  color: #66809e;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 350px);
  gap: clamp(0.9rem, 2vw, 1.25rem);
  align-items: stretch;
}

.pulse-map-panel,
.pulse-side-panel,
.pulse-detail-card {
  border-radius: 28px;
}

.pulse-map-panel {
  min-width: 0;
  padding: clamp(0.72rem, 1.6vw, 1rem);
}

.map-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.2rem 0.12rem 0.9rem;
}

.map-toolbar-copy {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.map-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.56rem;
  min-width: 0;
}

.map-toolbar strong,
.pulse-side-head strong,
.pulse-detail-card h2 {
  color: #1f3e61;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.map-toolbar span,
.pulse-side-head span {
  color: #66809e;
  font-size: 0.72rem;
  font-weight: 800;
}

.map-toolbar-copy span {
  display: block;
  max-width: min(44vw, 28rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-toolbar button {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  border: 1px solid rgba(188, 210, 232, 0.92);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(227, 241, 252, 0.68)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.76), rgba(180, 205, 230, 0.38));
  color: #274b72;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 0.52rem 0.72rem;
}

.map-toolbar button:hover {
  background: #fff;
  border-color: rgba(63, 145, 230, 0.72);
  box-shadow: 0 12px 28px rgba(61, 137, 219, 0.16);
}

.map-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  min-width: 0;
  border: 1px solid rgba(188, 210, 232, 0.78);
  border-radius: 999px;
  background: rgba(238, 248, 255, 0.76);
  padding: 0.18rem;
  box-shadow: 0 12px 28px rgba(47, 94, 140, 0.09);
}

.map-view-toggle button {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #57738f;
  font-size: 0.74rem;
  padding: 0.4rem 0.62rem;
}

.map-view-toggle button:hover {
  border-color: transparent;
  box-shadow: none;
}

.map-view-toggle button.is-active {
  background: linear-gradient(145deg, #ffffff, #dff1ff);
  color: #173653;
  box-shadow:
    0 8px 22px rgba(54, 134, 215, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
}

.three-map-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1.7;
  min-height: 360px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(188, 211, 232, 0.64);
  background:
    radial-gradient(circle at 66% 28%, rgba(91, 188, 255, 0.2), transparent 17rem),
    radial-gradient(circle at 32% 76%, rgba(54, 224, 188, 0.15), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.9));
  box-shadow:
    0 28px 88px rgba(31, 69, 105, 0.16),
    0 0 54px rgba(95, 178, 255, 0.14),
    0 0 44px rgba(38, 231, 190, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 -1px 0 rgba(143, 172, 199, 0.28) inset,
    0 0 0 1px rgba(148, 202, 255, 0.18) inset;
}

.three-map-wrap::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(83, 145, 202, 0.18) 0 1px, transparent 1.8px) 0 0 / 34px 34px,
    linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 34%, rgba(104, 157, 205, 0.12) 58%, transparent 74%),
    repeating-linear-gradient(0deg, rgba(111, 151, 188, 0.08) 0 1px, transparent 1px 8px);
  mix-blend-mode: screen;
  opacity: 0.5;
  content: "";
}

.three-map-wrap::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 48%, rgba(176, 204, 229, 0.22) 88%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 32%, rgba(103, 143, 180, 0.1));
  content: "";
}

.pulse-three-map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
}

.pulse-three-map canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}

.three-label-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.pulse-region-label {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  border: 1px solid rgba(197, 225, 252, 0.48);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(245, 251, 255, 0.88), rgba(180, 209, 236, 0.5)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.32), rgba(66, 112, 154, 0.22));
  color: #173653;
  box-shadow:
    0 18px 38px rgba(6, 18, 34, 0.28),
    0 0 26px color-mix(in srgb, var(--region-color) 22%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 -1px 0 rgba(85, 120, 154, 0.24) inset;
  font-family: "Space Grotesk", var(--body-font);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 0.38rem 0.56rem;
  white-space: nowrap;
}

.pulse-region-label-name {
  display: inline-flex;
  align-items: center;
}

.pulse-region-label-score {
  display: none;
  align-items: center;
  border-left: 1px solid color-mix(in srgb, var(--region-color) 38%, rgba(31, 62, 97, 0.24));
  color: #315a7f;
  font-size: 0.68rem;
  padding-left: 0.34rem;
}

.pulse-region-label::before {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  background: var(--region-color);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--region-color) 18%, transparent), 0 0 24px var(--region-color);
  content: "";
}

.pulse-region-label.is-active {
  background:
    linear-gradient(145deg, #ffffff, #dff2ff),
    linear-gradient(100deg, rgba(255, 255, 255, 0.88), color-mix(in srgb, var(--region-color) 28%, transparent));
  border-color: color-mix(in srgb, var(--region-color) 62%, #ffffff);
  transform: translate(-50%, -115%) scale(1.08);
}

.pulse-region-label.is-active .pulse-region-label-score {
  display: inline-flex;
}

.map-selected-pulse {
  position: absolute;
  top: 0.82rem;
  left: 0.82rem;
  z-index: 5;
  display: grid;
  gap: 0.14rem;
  max-width: min(310px, calc(100% - 1.64rem));
  border: 1px solid color-mix(in srgb, var(--region-color, #5bb4ff) 38%, rgba(222, 236, 250, 0.9));
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(223, 240, 252, 0.78)),
    linear-gradient(100deg, rgba(255, 255, 255, 0.7), color-mix(in srgb, var(--region-color, #5bb4ff) 18%, transparent));
  box-shadow:
    0 18px 42px rgba(9, 27, 48, 0.22),
    0 0 34px color-mix(in srgb, var(--region-color, #5bb4ff) 18%, transparent),
    0 1px 0 rgba(255, 255, 255, 0.96) inset;
  color: #173653;
  pointer-events: none;
  padding: 0.66rem 0.76rem;
}

.map-selected-pulse strong {
  color: #173653;
  font-family: "Space Grotesk", var(--body-font);
  font-size: 1rem;
  font-weight: 900;
}

.map-selected-pulse span {
  color: #557391;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.45;
}

.map-legend {
  position: absolute;
  left: 0.86rem;
  right: 0.78rem;
  bottom: 0.72rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  pointer-events: none;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  border: 1px solid rgba(221, 233, 244, 0.92);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(225, 238, 250, 0.78)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(162, 189, 214, 0.24));
  color: #375b7f;
  box-shadow: 0 14px 32px rgba(28, 62, 100, 0.1);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.42rem 0.58rem;
}

.map-legend i {
  width: 0.64rem;
  height: 0.64rem;
  border-radius: 999px;
  background: #22c49c;
  box-shadow: 0 0 0 7px rgba(34, 196, 156, 0.16), 0 0 24px rgba(34, 196, 156, 0.72);
}

.pulse-side-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100%;
  padding: 0.86rem;
}

.pulse-side-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0 0.1rem 0.78rem;
}

.pulse-region-list {
  display: grid;
  gap: 0.54rem;
  align-content: start;
}

.pulse-region-button {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
  border: 1px solid rgba(208, 225, 241, 0.82);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(230, 241, 251, 0.58)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.55), rgba(150, 180, 210, 0.18));
  color: #234362;
  cursor: pointer;
  font: inherit;
  padding: 0.62rem;
  text-align: left;
}

.pulse-region-button.is-active,
.pulse-region-button:hover {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(229, 243, 255, 0.78)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.76), color-mix(in srgb, var(--region-color) 18%, transparent));
  border-color: color-mix(in srgb, var(--region-color) 42%, #a7d0f6);
  box-shadow: 0 16px 34px rgba(51, 91, 132, 0.11);
}

.region-dot {
  width: 0.84rem;
  height: 0.84rem;
  border-radius: 999px;
  background: var(--region-color);
  box-shadow:
    0 0 0 calc(4px + var(--heat) * 4px) color-mix(in srgb, var(--region-color) 18%, transparent),
    0 0 24px color-mix(in srgb, var(--region-color) 72%, transparent);
}

.region-name {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.region-name strong {
  overflow-wrap: anywhere;
  color: #1e3f60;
  font-size: 0.92rem;
  font-weight: 900;
}

.region-name span {
  overflow-wrap: anywhere;
  color: #65809c;
  font-size: 0.74rem;
  font-weight: 800;
}

.region-score {
  color: #1d3e60;
  font-family: "Space Grotesk", var(--body-font);
  font-size: 1.02rem;
  font-weight: 900;
}

.pulse-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(0.9rem, 2vw, 1.25rem);
  margin-top: clamp(0.78rem, 1.6vw, 1rem);
}

.pulse-detail-card {
  position: relative;
  padding: clamp(0.95rem, 2vw, 1.2rem);
}

.pulse-detail-card h2 {
  margin-bottom: 0.8rem;
}

.selected-region-card {
  display: grid;
  gap: 1rem;
}

.selected-region-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.selected-region-title {
  display: grid;
  gap: 0.22rem;
}

.selected-region-title strong {
  color: #173653;
  font-size: clamp(1.32rem, 2.5vw, 2rem);
  font-weight: 900;
}

.selected-region-title span {
  color: #5f7a98;
  font-weight: 800;
}

.selected-score {
  color: #173653;
  font-family: "Space Grotesk", var(--body-font);
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-weight: 900;
  line-height: 1;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.52rem;
}

.metric-box {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.22rem;
  min-width: 0;
  border: 1px solid rgba(211, 226, 241, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(231, 241, 250, 0.62)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.42), rgba(146, 174, 202, 0.16));
  padding: 0.68rem;
}

.metric-box span {
  color: #173653;
  font-family: "Space Grotesk", var(--body-font);
  font-size: 1.05rem;
  font-weight: 900;
}

.metric-box em {
  color: #6a84a0;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pulse-recent-posts {
  display: grid;
  gap: 0.62rem;
}

.pulse-post-row {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.28rem;
  border: 1px solid rgba(211, 226, 241, 0.78);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(232, 243, 253, 0.58)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.48), rgba(148, 178, 208, 0.14));
  padding: 0.72rem 0.78rem;
  text-decoration: none;
}

.pulse-post-row strong {
  color: #1f3f60;
  font-size: 0.9rem;
  line-height: 1.35;
}

.pulse-post-row span {
  color: #6a839e;
  font-size: 0.74rem;
  font-weight: 800;
}

.pulse-post-row:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(72, 152, 231, 0.46);
}

.pulse-empty {
  color: #66819d;
  font-weight: 800;
  line-height: 1.55;
}

@keyframes metallicTitleSweep {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes chromeSweep {
  0%, 20% {
    transform: translateX(-85%);
  }
  55%, 100% {
    transform: translateX(85%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .community-map-hero h1,
  .pulse-summary div::after,
  .pulse-map-panel::after {
    animation: none;
  }
}

@media (max-width: 980px) {
  .community-map-hero,
  .pulse-board,
  .pulse-detail-grid {
    grid-template-columns: 1fr;
  }

  .pulse-summary {
    width: 100%;
  }

  .three-map-wrap {
    min-height: 330px;
  }

  .pulse-side-panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .community-map-shell {
    width: min(100% - 0.75rem, 1240px);
  }

  .community-map-body .nav {
    overflow: hidden;
  }

  .community-map-body .nav-main-row,
  .community-map-body .nav-links,
  .community-map-body .nav-actions {
    max-width: 100%;
    min-width: 0;
  }

  .community-map-body .nav-links {
    justify-content: center;
  }

  .community-map-body .nav-action {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .community-map-hero h1 {
    font-size: clamp(1.52rem, 8.4vw, 2.55rem);
    white-space: nowrap;
  }

  .pulse-summary,
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .three-map-wrap {
    aspect-ratio: auto;
    height: min(72vw, 300px);
    min-height: 250px;
  }

  .map-legend {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .map-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .map-selected-pulse {
    display: none;
  }
}
