.pwa {
  background: #e9eee6;
  border-block: 1px solid #d5dfd6;
  color: #123d3d;
}
.pwa [hidden] { display: none !important; }
.pwa-layout {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 4fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}
.pwa-intro h2 {
  margin: 10px 0 16px;
  font: 600 clamp(36px, 4vw, 62px)/1.04 var(--serif, Georgia, serif);
  letter-spacing: -.04em;
  text-wrap: balance;
}
.pwa-intro h2 span { white-space: nowrap; }
.pwa-intro > p:not(.eyebrow) { font-size: 17px; line-height: 1.75; margin: 0; max-width: 52ch; }
.pwa-legend { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 9px; }
.pwa-legend li { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 650; }
.pwa-legend span { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--pin); }
.pwa [data-category="project"] { --pin: #193f52; }
.pwa [data-category="transit"] { --pin: #8d420f; }
.pwa [data-category="shopping"] { --pin: #704519; }
.pwa [data-category="health"] { --pin: #922e52; }
.pwa [data-category="education"] { --pin: #5f437c; }
.pwa [data-category="leisure"] { --pin: #21634b; }
.pwa-toolbar {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(150px, 1.3fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}
.pwa-toolbar label { display: grid; gap: 5px; font-size: 14px; font-weight: 700; }
.pwa-toolbar input, .pwa-toolbar select, .pwa-actions button {
  color: inherit;
  background: #fcfaf5;
  border: 1px solid #aebfb5;
  border-radius: 5px;
  min-width: 0;
  min-height: 44px;
  padding: 7px 10px;
  font: 600 16px/1.25 system-ui, sans-serif;
}
.pwa-toolbar input, .pwa-toolbar select { width: 100%; }
.pwa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pwa-actions button { font-size: 14px; cursor: pointer; }
.pwa-actions button:hover, .pwa-place-button:hover { background: #dde9e1; }
.pwa-body { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(230px, 1fr); gap: 12px; }
.pwa-map-frame { min-width: 0; position: relative; }
.pwa-canvas {
  height: 440px;
  border: 1px solid #aebfb5;
  border-radius: 8px;
  background: #dce7e2;
}
.pwa-status {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-content: center;
  border: 1px solid #aebfb5;
  border-radius: 8px;
  background: #e1eae4;
  padding: 18px;
  z-index: 2;
}
.pwa-map-frame:has(.pwa-canvas[hidden]) { min-height: 170px; }
.pwa-directory {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  position: relative;
  height: 440px;
  min-width: 0;
  border: 1px solid #aebfb5;
  border-radius: 8px;
  overflow: hidden;
  background: #fcfaf5;
}
.pwa-map-frame[hidden] + .pwa-directory { grid-column: 1 / -1; }
.pwa-count { margin: 0; padding: 10px 14px; font-weight: 750; font-size: 15px; background: #e0e9e2; }
.pwa-places { list-style: none; margin: 0; padding: 0; overflow: auto; scrollbar-gutter: stable; }
.pwa-place { display: flex; align-items: center; position: relative; gap: 9px; padding: 9px 12px; border-bottom: 1px solid #dbe4dc; }
.pwa-place-copy { display: grid; gap: 3px; overflow-wrap: anywhere; line-height: 1.35; }
.pwa-place-copy strong { font-size: 16px; }
.pwa-place-copy small, .pwa-footnote { font-size: 14px; line-height: 1.5; color: #365453; }
.pwa-badge, .pwa-marker {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 26px;
  height: 26px;
  padding-inline: 4px;
  border-radius: 30px;
  background: var(--pin);
  color: white;
  font: 750 12px/1 system-ui, sans-serif;
}
.pwa-marker {
  border: 2px solid #fff;
  box-shadow: 0 1px 5px #19373375;
  min-width: 29px;
  height: 29px;
  cursor: pointer;
}
.pwa-marker[data-category="transit"] { min-width: 36px; height: 30px; }
.pwa-marker[data-offset]::after {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  left: 50%;
  width: var(--pin-line);
  height: 2px;
  transform: rotate(var(--pin-angle));
  transform-origin: left center;
  background: linear-gradient(90deg, transparent 14px, var(--pin) 14px);
  pointer-events: none;
}
.pwa-marker[aria-pressed="true"] { box-shadow: 0 0 0 3px #143a3c; }
.pwa-place-button {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.pwa-place-button:hover { background: #183d3b0c; }
.pwa-place-button[aria-pressed="true"] { box-shadow: inset 4px 0 var(--pin); }
.pwa :is(button, input, select):focus-visible { outline: 2px solid #125653; outline-offset: -2px; }
.pwa-popup { display: grid; gap: 4px; padding-right: 14px; font-size: 14px; line-height: 1.45; color: #123d3d; }
.pwa .maplibregl-popup-close-button { min-width: 28px; min-height: 28px; font-size: 19px; }
.pwa-empty { position: absolute; inset: 65px 12px auto; margin: 0; }
.pwa-footnote { margin: 10px 0 0; }
.pwa-dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: #e9eee6;
  overflow: hidden;
}
.pwa:has(.pwa-dialog[open]) { overscroll-behavior: contain; }
.pwa-dialog .pwa-body {
  height: 100%;
  grid-template-columns: minmax(0, 3fr) minmax(230px, 1fr);
  padding: 12px;
}
.pwa-dialog :is(.pwa-canvas, .pwa-directory) { height: 100%; }
.pwa-exit-full {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  background: #fcfaf5;
  color: #123d3d;
  border: 1px solid #aebfb5;
  border-radius: 5px;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 15px;
  cursor: pointer;
}
@media (max-width: 1100px) {
  .pwa-layout { grid-template-columns: minmax(0, 1fr); }
  .pwa-legend { display: flex; flex-wrap: wrap; column-gap: 18px; }
}
@media (max-width: 720px) {
  .pwa-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pwa-actions { grid-column: 1 / -1; }
  .pwa-body, .pwa-dialog .pwa-body { grid-template-columns: minmax(0, 1fr); }
  .pwa-canvas { height: clamp(315px, 45vh, 400px); }
  .pwa-directory { height: 285px; }
  .pwa-dialog .pwa-body { grid-template-rows: minmax(0, 2fr) minmax(0, 1fr); }
  .pwa .maplibregl-ctrl-attrib { font-size: 10px; }
}
