/* Community histories extend the existing typography and palette. */
.explorer-filters { display: flex; flex-wrap: wrap; gap: .55rem; padding: .9rem 1.25rem; background: #0f1e2c; border-bottom: 1px solid var(--line); }
.explorer-filters button { border-radius: 999px; padding: .5rem .85rem; font-size: .85rem; }
.intro-note .intro-neighborhoods { font-size: .9rem; line-height: 1.6; margin-bottom: 1rem; }
.intro-neighborhoods > a { color: var(--up); font-weight: 600; white-space: nowrap; }
.continue-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.story-button.secondary { background: transparent; color: var(--up); border-color: var(--line); }
.story-button.secondary:hover { border-color: var(--up); background: #6bd5c40d; }
.map-legend .swatch.neighborhood { background: var(--up); border-radius: 50%; border: 1px solid var(--bg); }
.community-overview { padding-top: 2rem; }
.community-overview h2, .community-notes h2 { font-size: 1.6rem; letter-spacing: -.01em; line-height: 1.4; margin-bottom: 1rem; }
.community-table { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: .75rem 1rem; }
.community-table table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .95rem; }
.community-table th, .community-table td { padding: 1rem .65rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); overflow-wrap: anywhere; line-height: 1.65; }
.community-table thead th { color: var(--up); font-size: .85rem; font-weight: 600; border-top: 0; }
.community-table th:first-child { width: 22%; }
.community-table tbody th { font-family: var(--display); font-weight: 750; }
.community-table td { color: #c5d1da; }
.community-context { color: var(--muted); font-size: .95rem; padding: 1rem 0 0; max-width: 850px; }
.community-section { padding-top: 3.5rem; scroll-margin-top: 1.5rem; }
.community-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(240px,1fr); gap: 2.3rem; align-items: start; }
.community-grid > div > p { color: #c5d1da; line-height: 1.75; }
.community-grid strong { color: var(--text); font-weight: 600; }
.city-answer { background: #6bd5c40b; border: 1px solid #6bd5c433; border-radius: 16px; padding: 1.2rem 1.35rem; }
.city-answer .small-label { color: var(--up); text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; }
.city-answer p { margin: .65rem 0 0; color: #c5d1da; font-size: .95rem; }
.community-links { display: flex; flex-wrap: wrap; gap: .7rem 1rem; margin-top: 1.25rem; }
.community-explore { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem .85rem; border: 1px solid #6bd5c455; border-radius: 999px; font-size: .9rem; font-weight: 600; color: var(--up); text-decoration: none; }
.community-explore:hover { background: #6bd5c414; border-color: var(--up); }
.community-notes { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1rem; }
.community-notes p { color: var(--muted); max-width: 920px; font-size: .9rem; }
@media (max-width: 760px) {
  .explorer-filters { padding: .8rem; gap: .5rem; }
  .explorer-filters button { padding: .5rem .7rem; font-size: .8rem; }
  .continue-actions { width: 100%; }
  .community-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .community-section { padding-top: 2.5rem; }
  .community-table { padding: .5rem; }
  .community-table table { font-size: .875rem; }
  .community-table th, .community-table td { padding: 1rem .4rem; }
  .community-table thead th { font-size: .8rem; }
  .community-table th:first-child { width: 24%; }
  .city-answer { padding: 1rem 1.1rem; }
  .community-context { font-size: .9rem; }
}

.map-area-note { font-size: .85rem; line-height: 1.6; margin: .8rem 0; padding: .8rem 1rem; border: 1px solid #efb76255; border-radius: 12px; color: #c5d1da; background: #efb7620a; }
.map-area-note[hidden] { display: none; }
.map-area-note strong { display: block; color: var(--hp); margin-bottom: .2rem; }
.map-legend .swatch.selected-area { background: #efb76266; border: 1px solid var(--hp); }
.real-map .selected-area-label { color: #ffe1af; border: 1px solid #efb762; font-size: 11px; font-weight: 700; max-width: 180px; white-space: normal; text-align: center; }
.city-popup .popup-area { font-size: 12px; padding: .6rem .7rem; border-radius: 8px; background: #efb76222; color: #173044; }
.city-popup .popup-area b { display: block; }
