.pm-public {
  margin: 0;
  background: #fff;
  color: #183e35;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}
.pm-shell {
  box-sizing: border-box;
  max-width: 1250px;
  margin: auto;
  padding: 24px;
}
.pm-shell * {
  box-sizing: border-box;
}
.pm-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}
.pm-heading p {
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 700;
  margin: 0 0 6px;
}
.pm-heading h1 {
  font-size: clamp(23px, 3.3vw, 34px);
  line-height: 1.3;
  margin: 0;
}
.pm-cross {
  font-size: 42px;
  color: #16804a;
}
.pm-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}
.pm-shell label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.pm-toolbar label:first-child {
  flex: 2;
  min-width: 180px;
}
.pm-toolbar label:nth-child(2) {
  flex: 1;
  min-width: 160px;
}
.pm-shell input:not([type="checkbox"]),
.pm-shell select,
.pm-shell textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid #b6ccc1;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  color: #183e35;
}
.pm-shell button,
.pm-button {
  border: 1px solid #136b43;
  border-radius: 8px;
  background: #147449;
  color: #fff;
  padding: 11px 14px;
  min-height: 44px;
  cursor: pointer;
  font:
    600 14px Arial,
    Helvetica,
    sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.pm-shell button:hover,
.pm-button:hover {
  background: #0d5737;
  color: #fff;
}
.pm-shell button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.pm-shell :focus-visible {
  outline: 3px solid #e6a823;
  outline-offset: 3px;
}
.pm-secondary {
  background: #fff !important;
  color: #155d3b !important;
}
.pm-danger {
  background: #a52c2c !important;
  border-color: #a52c2c !important;
}
.pm-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 15px;
}
.pm-map {
  height: 560px;
  border-radius: 14px;
  border: 1px solid #cadbd0;
  z-index: 0;
  background: #edf3ef;
}
.pm-list {
  max-height: 560px;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px;
}
.pm-item {
  border: 1px solid #d5e2db;
  border-radius: 11px;
  padding: 15px;
  margin-bottom: 10px;
  background: #fff;
}
.pm-item.pm-active {
  border: 2px solid #147449;
  background: #f0f8f2;
}
.pm-item h2,
.pm-item h3 {
  font-size: 17px;
  line-height: 1.5;
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}
.pm-item p {
  font-size: 14px;
  line-height: 1.5;
  margin: 5px 0;
}
.pm-item a {
  color: #136c45;
  font-weight: 700;
}
.pm-item button {
  margin-top: 9px;
}
.pm-item .pm-actions {
  margin-top: 8px;
}
.pm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pm-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #b5cec0;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
}
.pm-small {
  font-size: 13px !important;
  line-height: 1.6;
  color: #536e62;
}
.pm-marker {
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px #0005;
  background: #147449;
  color: white;
  text-align: center;
  line-height: 26px;
  font: bold 22px/26px Arial;
}
.pm-cluster {
  background: #fff;
  color: #155e3c;
  border: 3px solid #147449;
  font: 700 15px/30px Arial;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 2px 5px #0004;
  text-align: center;
}
.pm-error {
  color: #a52c2c !important;
}
.pm-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.pm-tabs a {
  padding: 13px 16px;
  background: white;
  border: 1px solid #bdd4c4;
  border-radius: 8px;
  text-decoration: none;
  color: #145d3c;
}
.pm-tabs [aria-current] {
  background: #145d3c;
  color: white;
}
.pm-admin-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  margin: 20px 0;
}
.pm-card {
  padding: 20px;
  border: 1px solid #d1dfd6;
  border-radius: 12px;
  background: #fff;
  margin: 16px 0;
}
.pm-admin-grid > .pm-card {
  margin: 0;
}
.pm-admin-list {
  max-height: 800px;
  overflow: auto;
}
.pm-row {
  width: 100%;
  text-align: left;
  flex-direction: column;
  align-items: start !important;
  background: #fff !important;
  color: #1b4533 !important;
  border: 1px solid #d7e2db !important;
  margin-bottom: 7px;
  line-height: 1.5 !important;
  gap: 5px;
}
.pm-row:hover {
  background: #edf6ef !important;
}
.pm-row small {
  font-size: 12px;
  font-weight: 400;
}
.pm-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.pm-editor-map {
  height: 320px;
  border-radius: 8px;
  margin: 12px 0;
  z-index: 0;
  background: #edf3ef;
}
.pm-check {
  flex-direction: row !important;
  align-items: start;
  margin: 18px 0;
  line-height: 1.6;
}
.pm-check input {
  margin-top: 5px;
  min-width: 18px;
  height: 18px;
}
.pm-preview {
  background: #f0f8f2;
  border: 1px solid #bdd3c5;
  border-radius: 8px;
  padding: 16px;
  margin-top: 18px;
}
.pm-import-scroll {
  max-height: 350px;
  overflow: auto;
  margin: 15px 0;
}
.pm-import-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pm-import-scroll td,
.pm-import-scroll th {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}
.pm-code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.pm-shell [hidden] {
  display: none !important;
}
.pm-file {
  max-width: 240px;
}
.pm-shell summary {
  cursor: pointer;
  font-weight: 700;
}
.pm-admin h1 {
  font-size: 30px;
}
.pm-admin h2 {
  font-size: 24px;
}
.pm-admin form > label {
  margin: 12px 0;
}
.pm-admin .leaflet-container,
.pm-public .leaflet-container {
  font-family: Arial, Helvetica, sans-serif;
}
.pm-editor-map .leaflet-marker-icon {
  cursor: move;
}
.pm-admin .leaflet-container a,
.pm-public .leaflet-container a {
  color: #066338;
}
.pm-admin .leaflet-attribution-flag,
.pm-public .leaflet-attribution-flag {
  display: none;
}
@media (max-width: 800px) {
  .pm-shell {
    padding: 16px;
  }
  .pm-layout,
  .pm-admin-grid {
    grid-template-columns: 1fr;
  }
  .pm-map {
    height: 390px;
    grid-row: 1;
  }
  .pm-list {
    max-height: 500px;
  }
  .pm-admin-list {
    max-height: 350px;
  }
  .pm-toolbar > * {
    flex: 1;
  }
  .pm-fields {
    grid-template-columns: 1fr;
  }
  .pm-heading {
    gap: 10px;
  }
  .pm-heading h1 {
    font-size: 24px;
  }
  .pm-import-scroll {
    max-width: 100%;
  }
  .pm-shell button {
    font-size: 14px;
  }
  .pm-card {
    padding: 14px;
  }
}

/* 3.3.63: compact summary and separate selection controls. */
.pm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.pm-summary-item {
  background: #fff;
  border: 1px solid #d1dfd6;
  border-radius: 10px;
  padding: 13px;
  display: flex;
  gap: 8px;
  flex-direction: column;
}
.pm-summary-item strong {
  font-size: 26px;
  color: #145e3d;
}
.pm-summary-item span {
  font-size: 13px;
}
.pm-bulk-bar {
  padding: 17px;
  background: #eaf4ed;
  border: 1px solid #bad2c1;
  border-radius: 12px;
}
.pm-bulk-bar .pm-small {
  margin: 7px 0 12px;
}
.pm-selectable {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.pm-selectable > .pm-row-select {
  width: 20px;
  height: 20px;
  margin-top: 14px;
  flex: 0 0 20px;
  cursor: pointer;
}
.pm-selectable > .pm-row {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.pm-row[aria-pressed="true"] {
  border: 2px solid #147449 !important;
  background: #edf6ef !important;
}
.pm-bulk-bar button {
  font-size: 14px;
}
.pm-admin-grid > section {
  min-width: 0;
}
#pm-bulk-review {
  scroll-margin-top: 170px;
}
#pm-bulk-review td {
  overflow-wrap: anywhere;
}
.pm-import-scroll table {
  min-width: 550px;
}
@media (max-width: 600px) {
  .pm-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .pm-bulk-bar .pm-actions > button {
    flex: 1 1 160px;
  }
  .pm-summary-item {
    padding: 10px;
  }
  .pm-summary-item strong {
    font-size: 23px;
  }
  .pm-bulk-bar {
    padding: 13px;
  }
}

/* 3.3.64: interactive counters and visible nearby mode. */
.pm-shell button.pm-summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  background: #fff;
  color: #183e35;
  text-align: left;
  min-height: 87px;
  font-weight: 400;
}
.pm-shell button.pm-summary-item:hover {
  background: #edf6ef;
  border-color: #147449;
  color: #183e35;
}
.pm-shell button.pm-summary-item[aria-pressed="true"] {
  border: 2px solid #147449;
  background: #edf6ef;
}
.pm-near-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 15px;
  background: #eef7f2;
  border: 1px solid #c0d8c9;
  border-radius: 10px;
  margin-top: 14px;
}
.pm-near-controls label {
  min-width: 130px;
}
.pm-near-controls p {
  margin: 0;
}
.pm-near-badge {
  display: inline-block;
  background: #146840;
  color: #fff;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 10px;
  margin-bottom: 10px;
}
.pm-item.pm-near-item {
  border-color: #a5c9b3;
}
.pm-near-item.pm-active {
  border: 2px solid #147449;
}
.pm-user-location {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2672d8;
  border: 3px solid white;
  box-shadow:
    0 0 0 5px #2672d833,
    0 1px 4px #0004;
}
.pm-shell #pm-near[aria-pressed="true"] {
  background: #0d5737;
  box-shadow: 0 0 0 2px #9acbb0;
}
.pm-list {
  position: relative;
}
@media (max-width: 600px) {
  .pm-near-controls {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }
  .pm-near-controls label {
    min-width: 0;
  }
}

/* Individual editor: name lookup and bounded proposal list. */
.pm-name-input { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.pm-name-input input { flex:1 1 160px; min-width:0; }
.pm-name-input button { flex:0 0 auto; margin:0; }
#pm-lookup-results { max-height:360px; overflow:auto; }
#pm-lookup-status { font-weight:600; }
#pm-lookup-panel { margin:14px 0; }

/* 3.3.66: visible save outcome next to the editor and in the viewport. */
.pm-notice { padding: 12px 14px; border: 1px solid #147449; border-radius: 10px; background: #edf6ef; color: #124c32; overflow-wrap: anywhere; }
.pm-notice[data-state="error"] { border-color: #b32929; background: #fff1f1; color: #8a1d1d; }
.pm-notice[data-state="warning"] { border-color: #986114; background: #fff5df; color: #69420c; }
.pm-notice[data-state="pending"] { border-color: #5680a3; background: #eef5fc; color: #234966; }
.pm-save-toast { position: fixed; right: 20px; bottom: 20px; width: min(460px, calc(100vw - 32px)); box-sizing: border-box; z-index: 1100; box-shadow: 0 8px 30px #0003; }
.pm-save-toast p { margin: 0 0 8px; font-weight: 600; }
.pm-save-toast .pm-actions { margin-top: 8px; justify-content: flex-end; }
.pm-save-toast button { font-size: 13px; padding: 7px 10px; }
#pm-name-help { display: block; margin-top: 5px; font-weight: normal; }
