:root {
  --ink: #183f3c;
  --teal: #246a60;
  --muted: #6a7c77;
  --paper: #fafbf7;
  --line: #e1e7df;
  --lime: #e7efb9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #b18535;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--teal);
}
header {
  height: 86px;
  padding: 0 4%;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  gap: 50px;
  background: #fff;
}
.brand {
  font-size: 26px;
  letter-spacing: -1px;
  font-weight: 750;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
}
.brand-icon {
  font-size: 39px;
}
.nz {
  font-size: 10px;
  letter-spacing: 1px;
  align-self: flex-start;
  margin-top: 9px;
}
nav {
  display: flex;
  align-self: stretch;
  gap: 30px;
}
nav button {
  padding: 0 3px;
  font-size: 14px;
  color: var(--muted);
}
nav .nav-active {
  color: var(--ink);
  border-bottom: 3px solid var(--teal);
}
#saved-count {
  font-size: 11px;
  border-radius: 20px;
  background: #edf1e9;
  padding: 3px 6px;
  margin-left: 5px;
}
.outline {
  border: 1px solid #bacbc1;
  border-radius: 7px;
  padding: 11px 17px;
  margin-left: auto;
  background: white;
}
.intro {
  padding: 40px 4% 33px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--teal);
  margin: 0 0 15px;
}
h1 {
  font-family: Georgia, serif;
  font-size: clamp(30px, 3.3vw, 49px);
  font-weight: 400;
  letter-spacing: -1.7px;
  line-height: 1.14;
  margin: 0 0 14px;
}
h1 em {
  color: var(--teal);
  font-weight: 400;
}
.intro p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.intro-note {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 15px;
  font-size: 12px;
}
.intro-note > span {
  font-size: 55px;
  color: #859d8b;
  transform: rotate(-12deg);
}
.explorer {
  margin: 0 4%;
  height: 600px;
  min-height: 500px;
  display: grid;
  grid-template-columns: 365px 1fr;
  border: 1px solid #d6dfd4;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  z-index: 2;
}
.search-area {
  padding: 24px 21px 0;
}
.search-area > label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 12px;
}
.search-row {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  align-items: center;
  background: #fafbf8;
  padding-left: 13px;
  gap: 8px;
}
.search-row span {
  font-size: 25px;
}
.search-row input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 13px 8px;
  min-width: 0;
  font-size: 12px;
}
.filters {
  display: flex;
  gap: 5px;
  margin: 17px 0;
}
.filters button {
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 11px;
  padding: 8px 10px;
  white-space: nowrap;
}
.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.filter-row select {
  border: 0;
  background: white;
  font-size: 12px;
  max-width: 190px;
  color: var(--ink);
}
.text-button {
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 6px;
}
.small {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}
#location-status:empty {
  display: none;
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 21px 0;
  border-top: 1px solid var(--line);
  margin-top: 19px;
}
.results-heading h2 {
  font-size: 12px;
  margin: 0;
  font-weight: 600;
}
.collection-note {
  font-size: 10px;
  color: var(--muted);
  padding: 0 21px;
  margin: 6px 0 13px;
}
.results {
  overflow-y: auto;
  padding: 0 12px 14px;
  flex: 1;
}
.spot-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 9px;
  display: flex;
  align-items: stretch;
  position: relative;
  transition: background 0.15s;
}
.spot-card:hover {
  background: #f5f8ed;
}
.card-open {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  width: 100%;
  padding: 12px 41px 12px 11px;
}
.spot-art {
  width: 65px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 5px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 33px;
  background: linear-gradient(
    150deg,
    #d8e8d6 45%,
    #9fbbb1 45%,
    #c1d9cb 60%,
    #65999b 61%,
    #88b7b5
  );
  color: #fff;
}
.spot-art.sea {
  background: linear-gradient(
    165deg,
    #e6e4cd 36%,
    #c0dce0 37%,
    #5098a2 64%,
    #74b1b7
  );
}
.spot-art.river {
  background: linear-gradient(
    120deg,
    #b6c8a1 35%,
    #80b6b5 36%,
    #b3d9d0 60%,
    #729277 61%
  );
}
.spot-art {
  overflow: hidden;
  position: relative;
}
.spot-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-copy {
  min-width: 0;
}
.card-copy strong {
  font-size: 13px;
  display: block;
  margin: 5px 0;
}
.card-copy small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.type-label {
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--teal);
}
.save {
  position: absolute;
  right: 6px;
  top: 14px;
  font-size: 22px;
  width: 32px;
  height: 35px;
  color: var(--teal);
}
.save[aria-pressed="true"] {
  color: #8b6720;
}
.empty {
  padding: 20px 9px;
  line-height: 1.7;
}
.map-wrap {
  position: relative;
  background: #dce9e7;
  min-width: 0;
}
#map {
  height: 100%;
  width: 100%;
  z-index: 0;
  background: #dce9e7;
}
.map-label,
.map-fit,
.map-note,
.map-status {
  position: absolute;
  z-index: 1;
  box-shadow: 0 2px 10px #17392e12;
  background: #fffefa;
  border: 1px solid #e0e5db;
  border-radius: 5px;
}
.map-label {
  top: 20px;
  left: 20px;
  padding: 12px;
  font-size: 9px;
  letter-spacing: 1.5px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.live-dot {
  width: 6px;
  height: 6px;
  background: #639586;
  border-radius: 100%;
}
.map-fit {
  right: 14px;
  top: 20px;
  padding: 11px;
  font-size: 11px;
}
.map-note {
  bottom: 31px;
  left: 20px;
  padding: 10px 13px;
  font-size: 10px;
}
.map-status {
  left: 20px;
  right: 20px;
  top: 70px;
  padding: 10px;
  font-size: 12px;
}
.pin {
  border: 3px solid white;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 2px 7px #21473a66;
  display: grid;
  place-items: center;
  color: white;
  font-size: 19px;
}
.pin.sea {
  background: #337e96;
}
.pin.river {
  background: #6f8854;
}
.leaflet-control-zoom {
  border: 1px solid #d6dfd4 !important;
}
.bottom-note {
  margin: 25px 4% 28px;
  padding: 18px 22px;
  border-radius: 8px;
  background: #eef1e6;
  display: flex;
  align-items: center;
  gap: 15px;
}
.note-icon {
  font-size: 25px;
}
.bottom-note h2 {
  font-size: 13px;
  margin: 0 0 6px;
}
.bottom-note p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.bottom-note a {
  font-size: 11px;
  margin-left: auto;
  white-space: nowrap;
}
footer {
  border-top: 1px solid var(--line);
  padding: 23px 4%;
  display: flex;
  gap: 35px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
}
footer .brand {
  font-size: 20px;
  color: var(--ink);
}
footer > span:last-child {
  margin-left: auto;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 32px;
  width: min(580px, calc(100% - 28px));
  max-height: 90dvh;
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #12332b88;
  backdrop-filter: blur(3px);
}
.close {
  position: absolute;
  top: 10px;
  right: 13px;
  font-size: 27px;
  width: 36px;
  height: 36px;
}
dialog h2 {
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  margin: 16px 0 10px;
}
dialog h3 {
  font-size: 14px;
  margin: 25px 0 10px;
}
dialog p,
dialog li {
  line-height: 1.65;
  font-size: 13px;
}
dialog .eyebrow {
  font-size: 10px;
  margin-top: 12px;
}
.detail-banner {
  height: 180px;
  border-radius: 8px;
  background: linear-gradient(
    165deg,
    #d6e4cc 35%,
    #8cae9d 36%,
    #b6d3c2 55%,
    #74a7a5 56%
  );
  margin: 15px 0 22px;
  overflow: hidden;
  position: relative;
}
.detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-credit {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 5px 7px;
  border-radius: 4px;
  background: #12332bcc;
  color: white;
  font-size: 9px;
  line-height: 1.3;
}
.detail-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.badge {
  font-size: 10px;
  border: 1px solid #d4decf;
  border-radius: 20px;
  padding: 6px 9px;
  background: #eef2e5;
}
.conditions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.condition {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}
.condition span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 8px;
}
.condition strong {
  font-size: 12px;
  font-weight: 500;
}
.detail-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.primary {
  padding: 12px 16px;
  background: var(--teal);
  border-radius: 6px;
  color: white;
  text-decoration: none;
  display: inline-block;
  font-size: 12px;
}
.detail-actions .outline {
  margin: 0;
  font-size: 12px;
}
dl {
  font-size: 12px;
  line-height: 1.6;
}
dt {
  font-weight: bold;
  margin-top: 11px;
}
dd {
  margin: 3px 0;
  color: var(--muted);
}
form label {
  display: block;
  font-size: 12px;
  margin: 14px 0;
}
form input,
form textarea,
form select {
  display: block;
  width: 100%;
  border: 1px solid #c9d5cb;
  border-radius: 5px;
  background: white;
  padding: 10px;
  margin-top: 7px;
  color: var(--ink);
}
.sr-only,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus {
  position: absolute;
  z-index: 9999;
  background: white;
  padding: 15px;
}
.noscript {
  padding: 20px;
}
.leaflet-control-attribution {
  font-size: 9px !important;
}
@media (min-width: 1500px) {
  main,
  header,
  footer {
    max-width: 1700px;
    margin: auto;
  }
  .explorer {
    height: 680px;
    grid-template-columns: 390px 1fr;
  }
}
@media (max-width: 1000px) {
  .intro-note {
    display: none;
  }
  .explorer {
    grid-template-columns: 320px 1fr;
  }
  .map-label {
    display: none;
  }
  .bottom-note {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .bottom-note a {
    margin-left: 40px;
  }
}
@media (max-width: 650px) {
  header {
    height: 70px;
    gap: 20px;
    padding: 0 5%;
  }
  .brand {
    font-size: 23px;
  }
  .brand-icon {
    font-size: 31px;
  }
  nav {
    gap: 15px;
  }
  header > .outline {
    font-size: 0;
    padding: 9px;
    width: 35px;
    height: 35px;
  }
  header > .outline:before {
    content: "＋";
    font-size: 20px;
  }
  .intro {
    padding: 28px 5% 24px;
  }
  .intro h1 {
    font-size: 35px;
    letter-spacing: -1.3px;
    max-width: 320px;
  }
  .intro p:not(.eyebrow) {
    font-size: 12px;
    max-width: 300px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .explorer {
    margin: 0 4%;
    height: auto;
    display: flex;
    flex-direction: column-reverse;
    min-height: 0;
  }
  .map-wrap {
    height: 310px;
  }
  .sidebar {
    max-height: 610px;
  }
  .search-area {
    padding: 20px 17px 0;
  }
  .results {
    max-height: 320px;
    flex: auto;
  }
  .map-note {
    left: 10px;
    right: 10px;
    font-size: 9px;
    bottom: 25px;
    text-align: center;
  }
  .map-fit {
    top: 12px;
    right: 12px;
  }
  .bottom-note {
    padding: 17px 15px;
    margin-top: 18px;
  }
  .bottom-note h2 {
    font-size: 12px;
  }
  .bottom-note > div {
    flex: 1;
  }
  .bottom-note a {
    font-size: 10px;
  }
  footer {
    gap: 15px;
    flex-wrap: wrap;
  }
  footer > span:last-child {
    margin-left: 0;
    width: 100%;
  }
  dialog {
    padding: 25px 20px;
  }
  dialog h2 {
    font-size: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.feed-section {
  border-top: 1px solid var(--line);
  padding-top: 4px;
  margin-top: 20px;
}
.feed-label {
  color: var(--teal);
  font-size: 11px !important;
}
.feed-error {
  background: #fff2d9;
  border-left: 3px solid #b18c45;
  padding: 10px;
  color: #69502b;
}
.feed-time,
.feed-credit {
  font-size: 10px !important;
  color: var(--muted);
  line-height: 1.6;
}
.feed-refresh {
  margin: 0;
}
.forecast-scroll {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.forecast-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  white-space: nowrap;
}
.forecast-table th,
.forecast-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.forecast-table th {
  background: #edf2e6;
}
.forecast-table td:first-child {
  font-weight: 600;
}
.lawa-report {
  margin: 16px 0;
}
.lawa-report summary {
  cursor: pointer;
  color: var(--teal);
  padding: 12px;
  background: #edf2e6;
  border-radius: 6px;
  font-size: 12px;
}
.lawa-scroll {
  max-width: 100%;
  overflow: auto;
  margin-top: 10px;
}
.lawa-scroll iframe {
  display: block;
  border: 0;
  width: 100%;
  min-width: 390px;
  background: white;
}
.feed-section > a {
  font-size: 12px;
}
#spot-dialog {
  width: min(640px, calc(100% - 28px));
}
.forecast-details {
  margin-top: 15px;
}
.forecast-details summary {
  cursor: pointer;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 600;
}
.forecast-details .forecast-scroll {
  margin-bottom: 10px;
}

/* Community contribution and moderation */
#suggest-dialog {
  max-width: 700px;
}
#suggest-map {
  height: 250px;
  border-radius: 14px;
  margin: 12px 0;
  background: #e0e8e2;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.check-label input {
  width: 20px;
  flex: 0 0 20px;
  margin-top: 4px;
}
.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
#suggest-status {
  overflow-wrap: anywhere;
}
.review-page {
  max-width: 840px;
  margin: 30px auto;
  padding: 24px;
}
.review-page h1 {
  font-size: 2.5rem;
}
.review-page label {
  display: block;
  margin: 12px 0;
}
.review-page input,
.review-page textarea,
.review-page select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccd8d1;
  border-radius: 8px;
  font: inherit;
}
.review-page .check-label {
  display: flex;
}
.review-page .check-label input {
  width: 20px;
}
.review-card {
  padding: 24px;
  border: 1px solid #d4ded6;
  border-radius: 18px;
  margin: 20px 0;
  background: white;
}
.review-card a {
  display: block;
  margin: 12px 0;
}
.review-card button {
  margin: 10px 10px 0 0;
}
.council-links a {
  display: block;
  margin: 12px 0;
}
@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .review-page {
    padding: 16px;
  }
  .review-card {
    padding: 16px;
  }
}

.photo-fields {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px 4px;
  margin: 18px 0;
}
.photo-fields legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
}
.review-photo {
  display: block;
  width: min(100%, 560px);
  max-height: 360px;
  object-fit: cover;
  border-radius: 10px;
  margin: 14px 0;
  border: 1px solid var(--line);
}


.feed-rain-alert {
  margin: 14px 0 4px;
  padding: 10px 12px;
  border-left: 3px solid #b18c45;
  background: #fff7e4;
  color: #5f4b2b;
  font-size: 11px !important;
  line-height: 1.55;
}


/* Production planner layout ------------------------------------------------ */
body.planner-layout {
  --ink: #183f3c;
  --teal: #246a60;
  --muted: #667a76;
  --paper: #f7faf8;
  --line: #d7e0dc;
  background: #eef4f2;
  overflow-x: hidden;
}
body.planner-layout header {
  position: sticky;
  top: 0;
  z-index: 1400;
  width: 100%;
  max-width: none;
  margin: 0;
  height: 64px;
  padding-inline: 22px;
  gap: 34px;
  background: #ffffffee;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 #173d3617, 0 5px 18px #173d360d;
}
body.planner-layout header .brand {
  font-size: 23px;
}
body.planner-layout header .brand-icon {
  font-size: 32px;
}
body.planner-layout header nav {
  gap: 22px;
}
body.planner-layout header #contribute {
  border-radius: 999px;
  padding: 9px 14px;
}
body.planner-layout main {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
}
body.planner-layout .intro,
body.planner-layout .bottom-note,
body.planner-layout footer {
  display: none;
}
body.planner-layout .explorer {
  position: relative;
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  height: calc(100svh - 64px);
  min-height: 560px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #dce9e7;
}
body.planner-layout .map-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
body.planner-layout #map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
body.planner-layout .sidebar {
  position: absolute;
  z-index: 700;
  top: 18px;
  left: 18px;
  bottom: 18px;
  width: min(365px, calc(100vw - 36px));
  min-height: 0;
  overflow: hidden;
  background: #fffffff5;
  border: 1px solid #d8e1dd;
  border-radius: 16px;
  box-shadow: 0 18px 48px #163d352d, 0 2px 8px #163d3518;
  backdrop-filter: blur(12px);
}
body.planner-layout .search-area {
  padding: 18px 16px 0;
}
body.planner-layout .search-area > label {
  margin-bottom: 9px;
  font-size: 11px;
  letter-spacing: .02em;
}
body.planner-layout .search-row {
  border-radius: 10px;
  background: white;
  box-shadow: 0 1px 2px #183f3c0a;
}
body.planner-layout .search-row input {
  padding: 12px 8px;
  font-size: 13px;
}
body.planner-layout .filters {
  margin: 12px 0;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}
body.planner-layout .filters::-webkit-scrollbar {
  display: none;
}
body.planner-layout .filters button {
  padding: 7px 9px;
  background: white;
}
body.planner-layout .filter-row select {
  max-width: 205px;
}
body.planner-layout .results-heading {
  margin-top: 13px;
  padding: 13px 16px 0;
}
body.planner-layout .collection-note {
  padding: 0 16px;
  margin: 5px 0 9px;
}
body.planner-layout .results {
  padding: 0 8px 12px;
}
body.planner-layout .spot-card {
  margin-bottom: 6px;
  border-radius: 11px;
  background: white;
  border-color: #dde5e1;
  box-shadow: 0 2px 7px #173d3608;
}
body.planner-layout .spot-card:hover {
  background: #f4f8f5;
}
body.planner-layout .card-open {
  gap: 10px;
  padding: 9px 38px 9px 9px;
}
body.planner-layout .spot-art {
  width: 58px;
  height: 58px;
  border-radius: 8px;
}
body.planner-layout .card-copy strong {
  margin: 3px 0;
}
body.planner-layout .map-label {
  top: 18px;
  left: 401px;
  border-radius: 999px;
  background: #ffffffed;
  backdrop-filter: blur(9px);
}
body.planner-layout .map-fit {
  right: 18px;
  top: 18px;
  border-radius: 10px;
  background: #ffffffed;
  backdrop-filter: blur(9px);
}
body.planner-layout .map-note {
  left: auto;
  right: 18px;
  bottom: 18px;
  border-radius: 9px;
  background: #ffffffed;
  backdrop-filter: blur(9px);
}
body.planner-layout .map-status {
  left: 401px;
  right: 18px;
  top: 70px;
}
body.planner-layout .leaflet-control-zoom {
  margin-right: 18px !important;
  margin-bottom: 18px !important;
  border: 0 !important;
  box-shadow: 0 7px 20px #173d3520 !important;
}
body.planner-layout .leaflet-control-zoom a {
  border-radius: 7px !important;
}
body.planner-layout dialog {
  box-shadow: 0 24px 70px #173d3540;
}
body.planner-layout #spot-dialog {
  width: min(680px, calc(100% - 28px));
}
body.planner-layout .detail-banner {
  height: 240px;
}

@media (max-width: 780px) {
  body.planner-layout header {
    height: 58px;
    padding-inline: 12px;
    gap: 14px;
  }
  body.planner-layout header .brand {
    font-size: 20px;
  }
  body.planner-layout header .brand-icon {
    font-size: 27px;
  }
  body.planner-layout header nav {
    gap: 8px;
    margin-left: auto;
  }
  body.planner-layout header nav button {
    font-size: 12px;
  }
  body.planner-layout header #contribute {
    padding: 8px 10px;
    margin-left: 0;
    font-size: 0;
  }
  body.planner-layout header #contribute::after {
    content: "＋";
    font-size: 19px;
  }
  body.planner-layout .explorer {
    height: calc(100svh - 58px);
    min-height: 620px;
  }
  body.planner-layout .sidebar {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    height: min(56svh, 510px);
    border-radius: 18px;
    box-shadow: 0 -12px 38px #173d3533;
  }
  body.planner-layout .sidebar::before {
    content: "";
    display: block;
    width: 44px;
    height: 4px;
    margin: 8px auto -2px;
    border-radius: 99px;
    background: #b4c3bd;
  }
  body.planner-layout .search-area {
    padding-top: 10px;
  }
  body.planner-layout .map-label {
    left: 10px;
    top: 10px;
    max-width: 190px;
  }
  body.planner-layout .map-fit {
    top: 10px;
    right: 10px;
  }
  body.planner-layout .map-note {
    display: none;
  }
  body.planner-layout .map-status {
    left: 10px;
    right: 10px;
    top: 58px;
  }
}


/* Compact icon-led spot details ------------------------------------------- */
.detail-lede {
  margin: 8px 0 16px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ui-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  background: #eef4f1;
  color: var(--teal);
  font-weight: 700;
  font-size: 15px;
}
.icon-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.spot-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 6px;
}
.info-disclosure,
.detail-more,
.condition-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.info-disclosure summary,
.detail-more summary,
.condition-details summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
}
.info-disclosure summary::-webkit-details-marker,
.detail-more summary::-webkit-details-marker,
.condition-details summary::-webkit-details-marker {
  display: none;
}
.info-disclosure[open] .disclosure-chevron,
.detail-more[open] .disclosure-chevron,
.condition-details[open] .condition-chevron {
  transform: rotate(90deg);
}
.disclosure-chevron,
.condition-chevron {
  transition: transform .15s ease;
  color: var(--muted);
}
.info-disclosure.hazard .ui-icon {
  background: #fff1cf;
  color: #7d5b13;
}
.disclosure-copy {
  margin: 0;
  padding: 0 12px 12px 51px;
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
}
.detail-more {
  margin: 18px 0;
}
.detail-more > :not(summary) {
  margin-left: 14px;
  margin-right: 14px;
}
.detail-more > :last-child {
  margin-bottom: 14px;
}
.detail-meta {
  margin-top: 2px;
}
.detail-meta .badge:nth-child(3) {
  display: none;
}
.detail-actions {
  margin: 16px 0;
}
.compact-feed {
  margin-top: 14px;
  padding-top: 14px;
}
.compact-feed h3 {
  margin: 0 0 10px;
}
.condition-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.condition-compact {
  min-width: 0;
  padding: 9px 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.condition-icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 27px;
  background: #eef4f1;
  color: var(--teal);
  font-weight: 700;
}
.condition-copy {
  min-width: 0;
}
.condition-copy > span {
  margin: 0 0 3px;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.condition-copy strong {
  display: block;
  font-size: 11px;
  white-space: nowrap;
}
.condition-attention {
  background: #fffaf0;
  border-color: #ead9ae;
}
.condition-attention .condition-icon {
  background: #fff1cf;
  color: #7d5b13;
}
.compact-alert {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 10px !important;
}
.condition-details {
  margin-top: 8px;
  background: #fbfcfb;
}
.condition-details summary {
  padding: 9px 10px;
  font-size: 11px;
}
.condition-summary-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #eef4f1;
  color: var(--teal);
  margin-right: 2px;
}
.condition-details summary > span:nth-child(2) {
  margin-right: auto;
}
.condition-details > :not(summary) {
  margin-left: 10px;
  margin-right: 10px;
}
.condition-details > :last-child {
  margin-bottom: 10px;
}
.quality-action {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.quality-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e5f1ea;
  color: #347454;
}
.quality-action strong,
.quality-action span {
  display: block;
}
.quality-action strong {
  font-size: 12px;
}
.quality-action span {
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.compact-link,
.compact-refresh {
  margin: 0;
  padding: 8px 10px;
  font-size: 10px;
}
.condition-load-status {
  display: inline-block;
  margin: 7px 10px 0 0;
}
.tide-row,
.forecast-table {
  font-variant-numeric: tabular-nums;
}

body.planner-layout .card-copy small + small {
  display: none;
}
body.planner-layout .card-copy small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.planner-layout .type-label {
  font-size: 8px;
}
body.planner-layout #spot-dialog {
  width: min(720px, calc(100% - 28px));
}

@media (max-width: 700px) {
  .spot-quick-grid {
    grid-template-columns: 1fr 1fr;
  }
  .condition-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quality-action {
    grid-template-columns: 34px 1fr;
  }
  .quality-action .compact-link {
    grid-column: 2;
    justify-self: start;
  }
}


/* Minimal planner sidebar -------------------------------------------------- */
body.planner-layout .search-area {
  padding-top: 14px;
}
body.planner-layout .search-row {
  position: relative;
}
body.planner-layout .search-row input {
  padding-right: 34px;
}
.search-reset {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.search-reset:hover {
  background: #eef3f0;
  color: var(--ink);
}
body.planner-layout .results {
  padding-top: 4px;
}


/* Search-only planner panel ------------------------------------------------ */
body.planner-layout .sidebar {
  top: 18px;
  bottom: auto;
  min-height: 0;
  height: auto;
  overflow: visible;
}
body.planner-layout .search-area {
  padding: 12px;
}
body.planner-layout .filters,
body.planner-layout .filter-row,
body.planner-layout .results,
body.planner-layout .collection-note,
body.planner-layout .results-heading {
  display: none !important;
}
body.planner-layout .search-row {
  margin: 0;
}
body.planner-layout #location-status:empty {
  display: none;
}
@media (max-width: 780px) {
  body.planner-layout .sidebar {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    height: auto;
    min-height: 0;
    border-radius: 18px;
    overflow: visible;
  }
  body.planner-layout .sidebar::before {
    display: none;
  }
  body.planner-layout .search-area {
    padding: 10px;
  }
}


/* Mobile map should fill the available viewport behind the search bar. */
@media (max-width: 780px) {
  body.planner-layout main,
  body.planner-layout .explorer {
    min-height: calc(100dvh - 58px);
  }
  body.planner-layout .explorer {
    height: calc(100dvh - 58px);
  }
  body.planner-layout .map-wrap,
  body.planner-layout #map {
    inset: 0;
    width: 100%;
    height: 100%;
  }
}


/* Map search toolbar ------------------------------------------------------- */
body.planner-layout .sidebar {
  top: 14px;
  left: 14px;
  bottom: auto;
  width: min(430px, calc(100vw - 28px));
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}
body.planner-layout .search-area {
  padding: 0;
}
.search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 42px;
  gap: 8px;
  align-items: center;
}
body.planner-layout .search-row,
.map-tool,
.layers-panel {
  background: #fffffff2;
  border: 1px solid #d8e1dd;
  box-shadow: 0 8px 24px #173d351b;
  backdrop-filter: blur(12px);
}
body.planner-layout .search-row {
  height: 44px;
  border-radius: 12px;
}
.map-tool {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 21px;
  color: var(--ink);
}
.map-tool:hover,
.map-tool[aria-expanded="true"] {
  background: white;
}
.layers-panel {
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
}
.layers-panel[hidden] {
  display: none !important;
}
body.planner-layout .layers-panel .filters {
  display: flex !important;
  margin: 0;
  gap: 6px;
  overflow-x: auto;
}
body.planner-layout .layers-panel .filter-row {
  display: flex !important;
  margin-top: 9px;
}
body.planner-layout .layers-panel .filter-row select {
  width: 100%;
  max-width: none;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
body.planner-layout .results,
body.planner-layout .collection-note,
body.planner-layout .results-heading {
  display: none !important;
}
body.planner-layout #location-status:not(:empty) {
  margin: 7px 0 0;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fffffff0;
  box-shadow: 0 5px 16px #173d3510;
  width: fit-content;
}

@media (max-width: 780px) {
  body.planner-layout .sidebar {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: auto;
    width: auto;
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body.planner-layout .sidebar::before {
    display: none;
  }
  .search-toolbar {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
  }
  body.planner-layout .search-area {
    padding: 0;
  }
}


/* Minimal bottom utility bar ---------------------------------------------- */
.bottom-tools {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 1450;
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid #d8e1dd;
  border-radius: 999px;
  background: #fffffff0;
  box-shadow: 0 10px 30px #173d3520;
  backdrop-filter: blur(12px);
}
.bottom-tool {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 18px;
}
.bottom-tool:hover,
.bottom-tool:focus-visible {
  background: #eef4f1;
}
#site-info-dialog {
  width: min(440px, calc(100% - 28px));
}
#site-info-dialog h2 {
  margin-top: 0;
}
#site-info-content p {
  color: var(--muted);
  margin-bottom: 0;
}
@media (min-width: 900px) {
  .bottom-tools {
    left: auto;
    right: 18px;
    transform: none;
  }
}


/* Full-width bottom utility bar ------------------------------------------- */
.bottom-tools {
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  justify-content: center;
  gap: 22px;
  padding: 7px 16px calc(7px + env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid #d8e1dd;
  border-radius: 0;
  background: #fffffff2;
  box-shadow: 0 -6px 22px #173d3514;
  backdrop-filter: blur(14px);
}
.bottom-tool {
  width: 40px;
  height: 40px;
}
@media (min-width: 900px) {
  .bottom-tools {
    left: 0;
    right: 0;
    transform: none;
  }
}
body.planner-layout .explorer {
  padding-bottom: calc(55px + env(safe-area-inset-bottom));
}


/* Keep Leaflet zoom controls clear of bottom utility bar ------------------ */
body.planner-layout .leaflet-bottom.leaflet-right {
  bottom: calc(64px + env(safe-area-inset-bottom));
}


/* Simplified header and saved control ------------------------------------- */
body.planner-layout header {
  justify-content: space-between;
}
body.planner-layout header nav {
  display: none;
}
body.planner-layout header #contribute.icon-only {
  width: 40px;
  height: 40px;
  padding: 0;
  margin-left: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
}
body.planner-layout header #contribute.icon-only::after,
body.planner-layout header #contribute.icon-only::before {
  content: none;
}
.layers-saved {
  width: 100%;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
  font-size: 12px;
}
.layers-saved.is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.layers-saved #saved-count {
  float: right;
  margin-left: 8px;
}


/* Saved sits with water-type chips ---------------------------------------- */
body.planner-layout .layers-panel .filters .layers-saved {
  width: auto;
  margin-top: 0;
  padding: 8px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
}
body.planner-layout .layers-panel .filters .layers-saved #saved-count {
  float: none;
  margin-left: 4px;
}


/* Surface loading errors even though normal result cards stay hidden. */
body.planner-layout .results.results-error-visible {
  display: block !important;
  position: fixed;
  left: 14px;
  top: 74px;
  z-index: 1450;
  width: min(320px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid #d8e1dd;
  border-radius: 12px;
  background: #fffffff2;
  box-shadow: 0 8px 24px #173d351b;
  backdrop-filter: blur(12px);
}


/* Water-type layer chips -------------------------------------------------- */
body.planner-layout .layers-panel .filters button[data-type] {
  color: #fff;
  border: 2px solid transparent;
  box-sizing: border-box;
}
body.planner-layout .layers-panel .filters button[data-type="all"] {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}
body.planner-layout .layers-panel .filters button[data-type="lake"],
body.planner-layout .layers-panel .filters button[data-type="pool"] {
  background: var(--teal);
}
body.planner-layout .layers-panel .filters button[data-type="river"] {
  background: #6f8854;
}
body.planner-layout .layers-panel .filters button[data-type="sea"] {
  background: #337e96;
}
body.planner-layout .layers-panel .filters button[data-type][aria-pressed="true"] {
  border-color: #111;
  color: #fff;
}
body.planner-layout .layers-panel .filters button[data-type="all"][aria-pressed="true"] {
  color: var(--ink);
  background: #fff;
}


/* ==========================================================================
   Swimspots map-first UX v2
   Shared shell direction: full-screen map, floating search, icon/text/result
   cards, and a responsive contextual spot sheet.
   ========================================================================== */
body.planner-layout {
  --ss-ink: #15383b;
  --ss-muted: #6d8085;
  --ss-water: #1f8ca3;
  --ss-water-2: #2ab7ca;
  --ss-good: #2f9567;
  --ss-warn: #c89420;
  --ss-line: #d7e4e7;
  --ss-panel: rgba(255,255,255,.96);
  background: #dcecef;
  color: var(--ss-ink);
}

body.planner-layout header {
  position: absolute;
  z-index: 1500;
  top: 16px;
  left: 16px;
  width: auto;
  min-width: 0;
  height: 52px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(18,54,62,.16);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
}
body.planner-layout header .brand { font-size: 20px; }
body.planner-layout header .brand-icon { font-size: 28px; }
body.planner-layout header .nz { margin-top: 5px; }
body.planner-layout header #contribute {
  position: fixed;
  right: 18px;
  bottom: 88px;
  width: 50px;
  height: 50px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 17px;
  display: grid;
  place-items: center;
  font-size: 23px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 9px 26px rgba(18,54,62,.18);
}
body.planner-layout .explorer {
  height: 100svh;
  min-height: 520px;
}
body.planner-layout .map-wrap { inset: 0; }
body.planner-layout .map-note { display: none; }

body.planner-layout .sidebar {
  top: 80px;
  left: 16px;
  bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  border: 0;
  border-radius: 20px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 14px 42px rgba(18,54,62,.17);
  backdrop-filter: blur(18px);
}
body.planner-layout .search-area { padding: 12px; }
body.planner-layout .search-toolbar {
  display: grid;
  grid-template-columns: 1fr 48px 48px;
  gap: 8px;
  align-items: center;
}
body.planner-layout .search-row {
  height: 48px;
  border: 1px solid var(--ss-line);
  border-radius: 16px;
  background: white;
  box-shadow: none;
}
body.planner-layout .search-row input {
  font-size: 15px;
  padding: 12px 6px;
}
body.planner-layout .search-row span { font-size: 21px; }
body.planner-layout .search-reset { min-width: 42px; min-height: 42px; }
body.planner-layout .map-tool {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid var(--ss-line);
  border-radius: 16px;
  background: white;
  font-size: 20px;
}
body.planner-layout .layers-panel {
  position: absolute;
  top: 70px;
  left: 12px;
  right: 12px;
  padding: 12px;
  border: 1px solid var(--ss-line);
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 14px 34px rgba(17,50,58,.16);
}
body.planner-layout .filters {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
  margin: 0;
}
body.planner-layout .filters button {
  min-height: 44px;
  border-radius: 14px;
  padding: 9px 10px;
  text-align: left;
  font-size: 12px;
}
body.planner-layout .results {
  padding: 0 10px 12px;
  scrollbar-width: thin;
}
body.planner-layout .spot-card {
  border: 1px solid var(--ss-line);
  border-radius: 16px;
  background: white;
  overflow: hidden;
}
body.planner-layout .spot-card:hover { background: #f3f9fa; }
body.planner-layout .spot-art {
  width: 72px;
  height: 72px;
  border-radius: 12px;
}
body.planner-layout .card-copy strong { font-size: 14px; }
body.planner-layout .type-label { color: var(--ss-water); }
body.planner-layout .pin {
  width: 34px !important;
  height: 34px !important;
  border: 3px solid white;
  background: var(--ss-water);
  box-shadow: 0 5px 14px rgba(18,60,68,.28);
}
body.planner-layout .pin.sea { background: #287fa1; }
body.planner-layout .pin.river { background: #4e8f7b; }

body.planner-layout .bottom-tools {
  right: 16px;
  bottom: 20px;
  z-index: 1350;
  gap: 7px;
  padding: 7px;
  border-radius: 18px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 8px 24px rgba(18,54,62,.16);
  backdrop-filter: blur(14px);
}
body.planner-layout .bottom-tool {
  min-width: 44px;
  min-height: 44px;
  border-radius: 13px;
}

/* Contextual detail surface ------------------------------------------------ */
#spot-dialog {
  overflow-x: hidden;
  border: 1px solid rgba(215,228,231,.92);
  background: var(--ss-panel);
  box-shadow: 0 22px 64px rgba(15,45,54,.25);
  backdrop-filter: blur(20px);
}
#spot-dialog .close,
#spot-sheet-toggle {
  top: 13px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(244,248,249,.96);
  z-index: 4;
}
#spot-dialog .close { right: 14px; }
#spot-sheet-toggle {
  position: absolute;
  right: 60px;
  font-size: 20px;
}
.spot-sheet-handle { display: none; }
#spot-content {
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}
#spot-content .detail-banner {
  height: 220px;
  margin: 0 0 16px;
  border-radius: 18px;
}
#spot-content .detail-meta {
  gap: 6px;
  margin-top: 4px;
}
#spot-content .badge {
  border: 1px solid var(--ss-line);
  background: #f5f9fa;
  color: var(--ss-muted);
}
#spot-content h2 {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size: clamp(25px,3vw,32px);
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: -.04em;
  margin: 14px 0 7px;
}
#spot-content .detail-lede {
  color: var(--ss-muted);
  font-size: 13px;
  margin: 0 0 15px;
}
.spot-stat-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 8px;
  margin: 14px 0 18px;
}
.spot-stat {
  min-width: 0;
  min-height: 104px;
  padding: 12px 8px;
  border: 1px solid var(--ss-line);
  border-radius: 17px;
  background: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.spot-stat-icon {
  min-height: 28px;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}
.spot-stat-label {
  margin-top: 8px;
  color: var(--ss-muted);
  font-size: 11px;
}
.spot-stat-result {
  width: 100%;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 720;
}
.spot-essentials {
  margin: 2px 0 14px;
}
.spot-essentials > h3,
.compact-feed > h3 {
  margin: 17px 0 9px;
  color: var(--ss-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.spot-essentials .info-disclosure,
.condition-details,
.detail-more {
  border: 1px solid var(--ss-line);
  border-radius: 15px;
  background: white;
  margin: 8px 0;
  overflow: hidden;
}
.spot-essentials summary,
.condition-details summary,
.detail-more summary {
  min-height: 48px;
  padding: 11px 13px;
}
.disclosure-copy,
.condition-details > p,
.detail-more > p,
.detail-more > h3,
.condition-details > .forecast-scroll,
.condition-details > .lawa-report {
  margin-left: 14px;
  margin-right: 14px;
}

.icon-actions {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 8px;
  margin: 16px 0 18px;
}
.spot-action {
  min-width: 0;
  min-height: 66px;
  padding: 8px 5px;
  border: 1px solid var(--ss-line);
  border-radius: 15px;
  background: #f6fafb;
  color: var(--ss-ink);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 10px;
  line-height: 1.15;
}
.spot-action:hover { background: #edf6f8; }
.spot-action-icon {
  font-size: 22px;
  line-height: 1;
}
.premium-action .spot-action-icon { color: #c89621; }

/* Conditions: icon -> label -> result ------------------------------------- */
.condition-strip {
  display: grid !important;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 8px !important;
  overflow: visible !important;
}
.condition-compact {
  min-width: 0 !important;
  min-height: 102px;
  padding: 11px 7px !important;
  border-radius: 17px !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.condition-icon {
  font-size: 24px !important;
  margin: 0 0 7px !important;
}
.condition-copy {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.condition-copy > span {
  margin: 0 !important;
  font-size: 11px !important;
}
.condition-copy strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px !important;
  font-weight: 720 !important;
}
.condition-attention { background: #fff9e9; border-color: #ead9a5; }
.quality-action {
  border-radius: 17px !important;
  border-color: var(--ss-line) !important;
}
.condition-load-status {
  margin: 6px 0;
  min-height: 16px;
}
.compact-refresh {
  min-height: 42px;
  border-radius: 13px;
}

/* Mobile ----------------------------------------------------------------- */
@media (max-width: 780px) {
  body.planner-layout { overflow: hidden; }
  body.planner-layout header {
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    height: 48px;
    padding-inline: 11px;
    border-radius: 16px;
  }
  body.planner-layout header .brand { font-size: 18px; }
  body.planner-layout header .brand-icon { font-size: 24px; }
  body.planner-layout header #contribute {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }
  body.planner-layout .explorer { height: 100dvh; }
  body.planner-layout .sidebar {
    pointer-events: none;
    inset: calc(66px + env(safe-area-inset-top)) 10px auto 10px;
    width: auto;
    height: auto;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  body.planner-layout .search-area {
    pointer-events: auto;
    padding: 0;
    background: transparent;
  }
  body.planner-layout .search-toolbar {
    grid-template-columns: 1fr 48px 48px;
    gap: 7px;
  }
  body.planner-layout .search-row,
  body.planner-layout .map-tool {
    box-shadow: 0 8px 25px rgba(18,54,62,.15);
  }
  body.planner-layout .layers-panel {
    position: fixed;
    z-index: 1550;
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 16px;
    border-radius: 24px;
    box-shadow: 0 22px 60px rgba(15,45,54,.26);
  }
  body.planner-layout #location-status {
    display: inline-block;
    margin: 6px 0 0;
    padding: 5px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 3px 10px rgba(18,54,62,.1);
  }
  body.planner-layout #location-status:empty { display: none; }
  body.planner-layout #result-count,
  body.planner-layout .results { display: none; }
  body.planner-layout .bottom-tools {
    display: none;
  }

  #spot-dialog {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    height: min(84dvh,760px);
    max-width: none;
    max-height: 88dvh;
    margin: 0;
    padding: 42px 14px calc(14px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--ss-line);
    border-radius: 28px 28px 0 0;
    transition: height .22s ease, transform .22s ease;
  }
  #spot-dialog::backdrop {
    background: rgba(13,40,48,.16);
    backdrop-filter: none;
  }
  #spot-dialog.is-collapsed {
    height: 34dvh;
    min-height: 255px;
  }
  #spot-dialog.is-collapsed #spot-content {
    overflow: hidden;
    max-height: calc(34dvh - 50px);
  }
  #spot-dialog.is-collapsed .spot-essentials,
  #spot-dialog.is-collapsed .spot-feeds,
  #spot-dialog.is-collapsed .detail-actions,
  #spot-dialog.is-collapsed .detail-more,
  #spot-dialog.is-collapsed #spot-content > .primary {
    display: none;
  }
  .spot-sheet-handle {
    display: flex;
    position: absolute;
    z-index: 5;
    top: 0;
    left: 50%;
    right: auto;
    width: 120px;
    height: 38px;
    transform: translateX(-50%);
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
  }
  .spot-sheet-handle span {
    width: 66px;
    height: 6px;
    border-radius: 99px;
    background: #b9c8cc;
  }
  #spot-dialog .close,
  #spot-sheet-toggle {
    top: 8px;
  }
  #spot-content .detail-banner {
    height: 142px;
    border-radius: 17px;
  }
  #spot-content h2 { font-size: 24px; }
  #spot-content .detail-lede {
    max-height: none;
    overflow: visible;
  }
  .spot-stat-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 8px;
  }
  .spot-stat {
    min-height: 94px;
    padding: 10px 6px;
  }
  .spot-stat:nth-child(n+4) { min-height: 86px; }
  .icon-actions {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .spot-action { min-height: 64px; }
  .condition-strip {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .condition-compact {
    min-height: 94px;
  }
  .condition-strip .condition-compact:nth-child(n+4) {
    min-height: 84px;
  }
  .leaflet-control-zoom {
    margin-bottom: calc(18px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 390px) {
  body.planner-layout header .nz { display: none; }
  .spot-stat-grid,
  .condition-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .spot-stat-label,
  .condition-copy > span { font-size: 10px !important; }
  .spot-stat-result,
  .condition-copy strong { font-size: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
  #spot-dialog { transition: none; }
}

/* Keep the global add-spot action independent of the translucent header. */
body.planner-layout > #contribute.floating-contribute {
  position: fixed;
  z-index: 1450;
  right: 18px;
  bottom: 88px;
  width: 50px;
  height: 50px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 17px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 9px 26px rgba(18,54,62,.18);
  font-size: 23px;
}
@media (max-width: 780px) {
  body.planner-layout > #contribute.floating-contribute {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }
}

/* Worker Preview trigger */


/* Mobile thumb-reach refinement ------------------------------------------------
   Keep primary search/actions low, move Add Spot high, and pin attribution to
   the true map edge. Desktop layout is unchanged.
------------------------------------------------------------------------------- */
@media (max-width: 780px) {
  /* Add spot: top-right, paired visually with the brand rather than the bottom UI. */
  body.planner-layout > #contribute.floating-contribute {
    top: calc(10px + env(safe-area-inset-top));
    right: 10px;
    bottom: auto;
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  /* Search/location/layers: thumb zone at the bottom, above attribution. */
  body.planner-layout .sidebar {
    inset: auto 10px calc(30px + env(safe-area-inset-bottom)) 10px;
  }

  body.planner-layout .search-toolbar {
    align-items: end;
  }

  body.planner-layout .search-row,
  body.planner-layout .map-tool {
    box-shadow: 0 8px 28px rgba(18,54,62,.18);
  }

  /* Layers opens upward from the bottom search controls. */
  body.planner-layout .layers-panel {
    top: auto;
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  /* Keep geolocation feedback immediately above the search controls. */
  body.planner-layout #location-status {
    position: absolute;
    left: 0;
    bottom: 56px;
    margin: 0;
  }

  /* Leaflet attribution belongs on the literal map edge. */
  .leaflet-control-attribution {
    position: fixed !important;
    right: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    padding: 2px 5px !important;
    z-index: 1200 !important;
    max-width: calc(100vw - 8px);
    line-height: 1.2 !important;
    border-radius: 5px 0 0 0;
    background: rgba(255,255,255,.88) !important;
  }

  /* Zoom controls clear the bottom search bar and attribution. */
  .leaflet-control-zoom {
    margin-bottom: calc(112px + env(safe-area-inset-bottom)) !important;
  }
}



/* Spot cards: filled water-type colour, icon-first layout. */
#spot-content .detail-meta {
  min-height: 8px;
  margin: 0;
}
#spot-content .detail-meta .listing-status {
  font-size: 10px;
  padding: 4px 7px;
}

.spot-stat-grid {
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
  margin: 12px 0 16px;
}
.spot-stat {
  min-height: 112px;
  padding: 14px 8px 12px;
  border: 0;
  border-radius: 19px;
  box-shadow: 0 6px 18px rgba(20,54,62,.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.spot-stat-icon {
  min-height: 32px;
  display: grid;
  place-items: center;
  font-size: 27px;
  line-height: 1;
  color: #fff;
}
.spot-stat-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 650;
  color: rgba(255,255,255,.82);
}
.spot-stat-result {
  width: 100%;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 760;
  color: #fff;
}

/* Fill the whole card with the same type colour used by the map vocabulary. */
.spot-stat-grid.water-type-lake .spot-stat {
  background: #238aa0;
}
.spot-stat-grid.water-type-river .spot-stat {
  background: #6f8854;
}
.spot-stat-grid.water-type-sea .spot-stat {
  background: #337e96;
}
.spot-stat-grid.water-type-pool .spot-stat {
  background: #7865a8;
}

/* Remove the old accent-strip treatment entirely. */
.spot-stat-grid .spot-stat::before { content: none !important; }

@media (max-width: 780px) {
  .spot-stat-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 9px;
  }
  .spot-stat {
    min-height: 104px;
    padding: 12px 8px 11px;
  }
  .spot-stat-icon { font-size: 26px; }
  .spot-stat-label { font-size: 11px; }
  .spot-stat-result { font-size: 14px; }
}



/* Authoritative icon-heavy card sizing override. */
@media (max-width: 780px) {
  .spot-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .spot-stat, .spot-stat:nth-child(n+4) {
    min-height: 104px !important;
    padding: 12px 8px 11px !important;
  }
}


/* Primary condition summary --------------------------------------------------
   Inspired by Strava/Komoot: informational stats, not buttons.
---------------------------------------------------------------------------- */
.spot-condition-summary {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  margin: 16px 0 20px;
  padding: 2px 0 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.condition-summary-item {
  position: relative;
  min-width: 0;
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.condition-summary-item + .condition-summary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: rgba(21,56,59,.10);
}
.condition-summary-icon {
  min-height: 28px;
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}
.condition-summary-label {
  margin-top: 7px;
  color: var(--ss-muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
}
.condition-summary-value {
  margin-top: 4px;
  color: var(--ss-ink);
  font-size: 17px;
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: -.02em;
}

/* A very light type tint behind the whole summary, never individual buttons. */
.spot-condition-summary.water-type-lake {
  background: linear-gradient(180deg,rgba(35,138,160,.07),rgba(35,138,160,.025));
  border-radius: 18px;
}
.spot-condition-summary.water-type-river {
  background: linear-gradient(180deg,rgba(111,136,84,.07),rgba(111,136,84,.025));
  border-radius: 18px;
}
.spot-condition-summary.water-type-sea {
  background: linear-gradient(180deg,rgba(51,126,150,.07),rgba(51,126,150,.025));
  border-radius: 18px;
}
.spot-condition-summary.water-type-pool {
  background: linear-gradient(180deg,rgba(120,101,168,.07),rgba(120,101,168,.025));
  border-radius: 18px;
}

/* Facilities now read as secondary content rather than top-level cards. */
.spot-stat-grid { display: none !important; }

@media (max-width: 780px) {
  .spot-condition-summary {
    grid-template-columns: repeat(4,minmax(0,1fr));
    margin: 12px -2px 18px;
  }
  .condition-summary-item {
    padding: 8px 5px 9px;
  }
  .condition-summary-icon {
    font-size: 22px;
  }
  .condition-summary-label {
    font-size: 9.5px;
  }
  .condition-summary-value {
    font-size: 15px;
  }
}



/* Title provenance and photo presence ------------------------------------- */
#spot-content h2 + .detail-meta {
  margin: -1px 0 9px;
  min-height: 0;
}
#spot-content h2 + .detail-meta .listing-status {
  display: inline-flex;
  align-items: center;
  width: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ss-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
}
#spot-content .detail-banner:empty {
  display: none;
}



/* Clean spot-sheet title row ------------------------------------------------ */
.spot-sheet-handle,
.spot-sheet-toggle {
  display: none !important;
}

#spot-dialog {
  padding-top: 14px;
}

#spot-dialog .close {
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 28px;
  line-height: 1;
  color: var(--ss-ink);
}

#spot-content h2 {
  padding-right: 48px;
  margin-top: 4px;
}

@media (max-width: 780px) {
  #spot-dialog {
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  }
  #spot-dialog .close {
    top: 14px;
    right: 14px;
  }
  #spot-content h2 {
    padding-right: 50px;
    margin-top: 2px;
  }
}



/* Show the complete spot description directly below the heading. */
#spot-content .detail-lede {
  max-height: none !important;
  overflow: visible !important;
  display: block;
  white-space: normal;
  line-height: 1.45;
}



/* Always-visible practical spot information -------------------------------- */
.spot-info-block {
  margin: 9px 0;
  padding: 13px 14px;
  border: 1px solid var(--ss-line);
  border-radius: 15px;
  background: #fff;
}
.spot-info-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
}
.spot-info-icon {
  width: 22px;
  display: inline-grid;
  place-items: center;
  color: var(--ss-ink);
  font-size: 17px;
  line-height: 1;
}
.spot-info-heading strong {
  font-size: 13px;
  font-weight: 720;
}
.spot-info-copy {
  margin: 0 0 0 31px;
  color: var(--ss-muted);
  font-size: 13px;
  line-height: 1.45;
}
.spot-info-block.hazard {
  background: #fffaf0;
  border-color: #ead9aa;
}



/* Four primary swim-condition stats. */
.spot-condition-summary {
  grid-template-columns: repeat(4,minmax(0,1fr));
}

/* Compact, icon-led 24-hour forecast -------------------------------------- */
.forecast-24h {
  margin: 18px 0 12px;
  padding-top: 2px;
}
.forecast-24h-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.forecast-24h-head h3 {
  margin: 0;
  color: var(--ss-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.forecast-24h-strip {
  display: grid;
  grid-template-columns: repeat(6,minmax(0,1fr));
  gap: 2px;
  padding: 8px 0 4px;
}
.forecast-24h-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.forecast-24h-time {
  color: var(--ss-muted);
  font-size: 9px;
  line-height: 1.1;
}
.forecast-24h-icon {
  margin: 6px 0 5px;
  font-size: 19px;
  line-height: 1;
}
.forecast-24h-temp {
  font-size: 12px;
  font-weight: 720;
  line-height: 1.1;
}
.forecast-full-link {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ss-water);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.forecast-full-link:hover,
.forecast-full-link:focus-visible {
  text-decoration: underline;
}

@media (max-width: 780px) {
  .spot-condition-summary {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
  .condition-summary-item {
    padding-inline: 3px;
  }
  .condition-summary-label {
    font-size: 8.8px;
  }
  .condition-summary-value {
    font-size: 14px;
  }
  .forecast-24h-strip {
    gap: 0;
  }
  .forecast-24h-icon {
    font-size: 18px;
  }
  .forecast-24h-temp {
    font-size: 11px;
  }
}



/* Rainfall is hazard context, not a primary current-condition metric. */
.spot-hazard-rain {
  margin: 9px 0 0 31px;
  padding-top: 8px;
  border-top: 1px solid rgba(112,87,28,.14);
  color: #755f2a;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}



/* Sea conditions use the same light icon-led language as weather forecast. */
.sea-condition-strip {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 0;
  margin: 8px 0 12px;
}
.sea-condition-item {
  position: relative;
  min-width: 0;
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.sea-condition-item + .sea-condition-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: rgba(21,56,59,.10);
}
.sea-condition-icon {
  font-size: 20px;
  line-height: 1;
}
.sea-condition-label {
  margin-top: 6px;
  color: var(--ss-muted);
  font-size: 10px;
  font-weight: 600;
}
.sea-condition-value {
  margin-top: 3px;
  color: var(--ss-ink);
  font-size: 14px;
  font-weight: 740;
}



/* Compact LAWA summary ------------------------------------------------------ */
.water-quality-card {
  margin-top: 16px;
}
.lawa-results {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 0;
  margin: 7px 0 8px;
}
.lawa-result-item {
  min-width: 0;
  padding: 8px 12px 9px 0;
}
.lawa-result-item + .lawa-result-item {
  padding-left: 14px;
  border-left: 1px solid rgba(21,56,59,.10);
}
.lawa-result-label {
  display: block;
  color: var(--ss-muted);
  font-size: 10px;
  font-weight: 600;
}
.lawa-result-value {
  display: block;
  margin-top: 4px;
  color: var(--ss-ink);
  font-size: 16px;
  font-weight: 760;
  line-height: 1.1;
}
.lawa-source-link {
  display: inline-block;
  margin-top: 3px;
  color: var(--ss-water);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}
.lawa-source-link:hover,
.lawa-source-link:focus-visible {
  text-decoration: underline;
}



/* Nearest public toilet sits inside Facilities as supporting context. */
.spot-facility-nearest {
  margin: 9px 0 0 31px;
  padding-top: 8px;
  border-top: 1px solid rgba(21,56,59,.08);
  color: var(--ss-ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}



/* Let condition sections flow without divider rules. */
#spot-dialog .spot-feeds .feed-section {
  border-top: 0;
}

/* Community groups the participatory actions in one quiet section. */
.spot-community {
  margin: 20px 0 8px;
}
.spot-community > h3 {
  margin: 0 0 10px;
}
.community-actions {
  margin: 0;
}
.community-route-action small {
  display: block;
  margin-top: 2px;
  color: var(--ss-muted);
  font-size: 9px;
  font-weight: 600;
}
.community-route-action:disabled {
  opacity: .72;
  cursor: default;
}
.quiet-pro-action {
  margin: 12px 14px 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ss-muted);
  font-size: 11px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}



/* Community uses the same heading language as weather/sea/water quality. */
.spot-community {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 0;
}
.spot-community > h3 {
  margin: 0 0 10px;
}

/* Community actions mirror the icon-led condition summary. */
.community-icon-strip {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 0;
  margin: 4px 0 8px;
}
.community-icon-item {
  appearance: none;
  position: relative;
  min-width: 0;
  padding: 8px 5px 9px;
  border: 0;
  background: transparent;
  color: var(--ss-ink);
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
button.community-icon-item {
  cursor: pointer;
}
.community-icon-item + .community-icon-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: rgba(21,56,59,.10);
}
.community-icon {
  font-size: 20px;
  line-height: 1;
}
.community-icon-label {
  margin-top: 6px;
  color: var(--ss-muted);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.15;
}
.community-icon-note {
  margin-top: 3px;
  color: var(--ss-muted);
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.1;
}
.community-icon-item.is-disabled {
  opacity: .55;
}
.community-icon-item:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 8px;
}

@media (max-width: 780px) {
  .community-icon-strip {
    grid-template-columns: repeat(5,minmax(0,1fr));
  }
  .community-icon {
    font-size: 18px;
  }
  .community-icon-label {
    font-size: 8.8px;
  }
}



/* Force Community heading to exactly match feed headings. */
#spot-dialog .spot-community > h3 {
  margin: 17px 0 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: normal;
  color: var(--ss-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Keep every Community action on one horizontal row. */
#spot-dialog .community-icon-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100%;
  gap: 0;
  overflow: hidden;
}
#spot-dialog .community-icon-item {
  min-width: 0;
  width: 100%;
  padding: 7px 2px 8px;
}
#spot-dialog .community-icon-label {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: 8.5px;
  letter-spacing: -.01em;
}
#spot-dialog .community-icon-note {
  white-space: nowrap;
  font-size: 7.5px;
}
@media (max-width: 390px) {
  #spot-dialog .community-icon {
    font-size: 17px;
  }
  #spot-dialog .community-icon-label {
    font-size: 8px;
  }
  #spot-dialog .community-icon-note {
    font-size: 7px;
  }
}



/* UI cleanup round 2: search keyboard, quiet rows, tooltips, base layers */
.quiet-detail-row {
  border-top: 0 !important;
  margin: 4px 0 0;
}
.quiet-detail-row > summary,
.quiet-text-link {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  list-style: none;
  cursor: pointer;
}
.quiet-detail-row > summary::-webkit-details-marker { display: none; }
.quiet-detail-row > summary::marker { content: ""; }
.quiet-detail-row > summary .disclosure-chevron,
.quiet-detail-row > summary .condition-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  transition: transform .15s ease;
}
.quiet-detail-row[open] > summary .disclosure-chevron,
.quiet-detail-row[open] > summary .condition-chevron {
  transform: rotate(90deg);
}
.lawa-source-link.quiet-text-link {
  width: 100%;
  border: 0;
  margin-top: 2px;
}
.leaflet-tooltip.spot-tooltip {
  border: 1px solid #dbe4dc;
  border-radius: 11px;
  background: rgba(255,255,252,.96);
  color: var(--ink);
  box-shadow: 0 3px 14px rgba(24,63,60,.13);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 650;
}
.leaflet-tooltip-top.spot-tooltip::before {
  border-top-color: #dbe4dc;
}
.base-layer-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.base-layer-options button,
.layers-panel .layers-saved {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 9px 11px;
  font-size: 11px;
}
.base-layer-options button[aria-pressed="true"],
.layers-panel .layers-saved[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
@media (max-width: 780px) {
  body.search-is-focused .search-area {
    position: fixed !important;
    z-index: 10050 !important;
    left: 10px !important;
    right: 10px !important;
    top: var(--search-focus-top, 12px) !important;
    bottom: auto !important;
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
  }
  body.search-is-focused .search-toolbar {
    width: 100%;
    box-shadow: 0 8px 24px rgba(24,63,60,.18);
  }
  body.search-is-focused #layers-panel,
  body.search-is-focused #location-status {
    display: none !important;
  }
}


/* Minor UI refinements ----------------------------------------------------- */
/* Keep keyboard focus behavior, but remove the orange ring from the search field only. */
#search:focus,
#search:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Text-only disclosure rows: label immediately followed by a chevron. */
.quiet-detail-row {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.quiet-detail-row > summary {
  min-height: 0;
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 6px 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.quiet-detail-row > summary .disclosure-chevron,
.quiet-detail-row > summary .condition-chevron {
  margin-left: 0;
  display: inline-block;
  transform: none;
  transition: none;
  font-size: 13px;
  line-height: 1;
}
.quiet-detail-row[open] > summary .disclosure-chevron,
.quiet-detail-row[open] > summary .condition-chevron {
  transform: rotate(90deg);
}

/* Remove any inherited container treatment around the four disclosure rows. */
.condition-details.quiet-detail-row,
.detail-more.quiet-detail-row {
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
}

/* Carry the same soft fade language from the primary condition summary into
   weather, sea, water-quality and community icon/result strips. */
.forecast-24h-strip,
.sea-condition-strip,
.lawa-results,
.community-icon-strip {
  background: linear-gradient(
    180deg,
    rgba(35, 138, 160, .07),
    rgba(35, 138, 160, .025)
  );
  border-radius: 12px;
}
.forecast-24h-strip {
  padding: 10px 6px 8px;
}
.sea-condition-strip {
  padding: 4px 5px;
}
.lawa-results {
  padding: 3px 8px;
}
.community-icon-strip {
  padding: 3px 4px;
}


/* Regional water-quality sources ------------------------------------------ */
.water-quality-source-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.water-quality-source-links .quiet-detail-row {
  margin: 0;
}
.water-quality-source-links .quiet-detail-row > summary,
.regional-water-source {
  min-height: 0;
  padding: 5px 0;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ss-water);
  text-decoration: none;
}
.regional-water-source::before {
  content: "·";
  margin-right: 8px;
  color: var(--ss-muted);
}
.regional-water-source:hover,
.regional-water-source:focus-visible {
  text-decoration: underline;
}


/* Brand information menu -------------------------------------------------- */
.brand-menu {
  position: relative;
  z-index: 1200;
}
.brand-menu-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--ink);
}
.brand-menu-chevron {
  margin-left: 1px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-1px);
}
.brand-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 176px;
  padding: 7px;
  display: grid;
  gap: 2px;
  background: rgba(255,255,252,.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(24,63,60,.14);
}
.brand-menu-panel[hidden] { display: none; }
.brand-menu-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.brand-menu-panel a:hover,
.brand-menu-panel a:focus-visible {
  background: #f1f5ef;
}

/* Information pages ------------------------------------------------------- */
.info-page {
  min-height: 100vh;
  background: var(--paper);
}
.info-page header {
  height: 78px;
}
.info-page .brand {
  color: var(--ink);
}
.info-shell {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 72px;
}
.info-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 34px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.info-page h1 {
  margin-bottom: 14px;
}
.info-intro {
  max-width: 650px;
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}
.info-section {
  padding: 21px 0;
  border-top: 1px solid var(--line);
}
.info-section h2 {
  margin: 0 0 9px;
  font-size: 16px;
  line-height: 1.3;
}
.info-section h3 {
  margin: 18px 0 7px;
  font-size: 13px;
}
.info-section p,
.info-section li {
  color: #405651;
  font-size: 13px;
  line-height: 1.7;
}
.info-section p {
  margin: 0 0 10px;
}
.info-section ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.info-link-list {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}
.info-link-list a {
  width: fit-content;
  font-weight: 650;
  text-decoration: none;
}
.info-callout {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg,rgba(35,138,160,.07),rgba(35,138,160,.025));
  color: #405651;
  font-size: 12px;
  line-height: 1.6;
}
.info-page footer {
  margin-top: 0;
}
@media (max-width: 780px) {
  .brand-menu-panel {
    top: calc(100% + 9px);
  }
  .info-shell {
    width: min(100% - 28px, 760px);
    padding-top: 34px;
  }
  .info-intro {
    font-size: 15px;
  }
}


/* Ensure the logo information dropdown remains visible above the map.
   This overrides the older rule that hides header navigation in map mode. */
body.planner-layout header nav.brand-menu-panel {
  display: grid;
  align-self: auto;
  gap: 2px;
}
body.planner-layout header nav.brand-menu-panel[hidden] {
  display: none;
}


/* Regional water-quality source chevron ---------------------------------- */
.regional-water-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.regional-water-chevron {
  color: var(--ss-muted);
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}


/* Supporting toilet location ------------------------------------------------ */
.toilet-map-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ss-water);
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.toilet-map-action:hover,
.toilet-map-action:focus-visible {
  text-decoration: underline;
}
.toilet-map-marker {
  background: transparent;
  border: 0;
}
.toilet-map-marker span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ss-water);
  color: #fff;
  box-shadow: 0 2px 8px rgba(24,63,60,.24);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -.02em;
}


/* Swimspots SVG icon system ----------------------------------------------- */
.ss-icon,
.spot-art-icon,
.map-spot-icon,
.feed-heading-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  color: inherit;
  overflow: visible;
}
.map-spot-icon {
  width: 21px;
  height: 21px;
}
.spot-art-icon {
  width: 46px;
  height: 46px;
}
.condition-summary-icon .ss-icon {
  width: 20px;
  height: 20px;
}
.spot-info-icon .ss-icon {
  width: 21px;
  height: 21px;
}
.community-icon .ss-icon {
  width: 24px;
  height: 24px;
}
.feed-heading-with-icon {
  display: flex;
  align-items: center;
  gap: 7px;
}
.feed-heading-icon {
  width: 18px;
  height: 18px;
  color: var(--ss-water);
  flex: 0 0 18px;
}
.pin .map-spot-icon {
  color: #fff;
}
.spot-art .spot-art-icon {
  color: #fff;
  position: relative;
  z-index: 1;
}


/* Water quality aligned with the primary condition-stat language ------------ */
.lawa-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 7px 0 8px;
  border-radius: 14px;
}
.lawa-result-item {
  position: relative;
  min-width: 0;
  padding: 9px 10px 10px !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-left: 0 !important;
}
.lawa-result-item + .lawa-result-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16%;
  bottom: 16%;
  width: 1px;
  background: rgba(21,56,59,.10);
}
.lawa-result-icon {
  width: 24px;
  height: 24px;
  display: block;
  color: var(--ss-water);
  fill: currentColor;
}
.lawa-result-label {
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}
.lawa-result-value {
  margin-top: 4px;
  font-size: 17px;
  line-height: 1.05;
  text-align: center;
}

/* Desktop map cleanup ------------------------------------------------------ */
@media (min-width: 781px) {
  body.planner-layout .bottom-tools {
    display: none !important;
  }
  body.planner-layout .explorer {
    padding-bottom: 0 !important;
  }
  body.planner-layout .leaflet-bottom.leaflet-right {
    bottom: 0 !important;
  }
  body.planner-layout .map-note {
    display: none !important;
  }
}


/* Approved generic icon sizing -------------------------------------------- */
.ui-control-icon,
.inline-button-icon,
.inline-facility-icon,
.toilet-marker-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  color: inherit;
}
.search-row > span .ui-control-icon {
  width: 16px;
  height: 16px;
}
.search-reset .ui-control-icon {
  width: 14px;
  height: 14px;
}
.map-tool .ui-control-icon,
.floating-contribute .ui-control-icon,
.close .ui-control-icon {
  width: 21px;
  height: 21px;
}
.layers-saved,
.base-layer-options button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.inline-button-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.spot-facility-nearest {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}
.inline-facility-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin-top: 1px;
  color: var(--ss-water);
}
.toilet-marker-icon {
  width: 17px;
  height: 17px;
}
.toilet-map-marker span {
  font-size: 0;
}

/* The old bottom utility bar is retired on all breakpoints. */
body.planner-layout .bottom-tools {
  display: none !important;
}
body.planner-layout .explorer {
  padding-bottom: 0 !important;
}
body.planner-layout .leaflet-bottom.leaflet-right {
  bottom: 0 !important;
}

/* Desktop uses only the floating search controls — no large white side panel. */
@media (min-width: 781px) {
  body.planner-layout .sidebar {
    pointer-events: none;
    top: 80px;
    left: 16px;
    right: auto;
    bottom: auto;
    width: min(470px, calc(100vw - 32px));
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  body.planner-layout .search-area {
    pointer-events: auto;
    padding: 0;
    background: transparent;
  }
  body.planner-layout .search-toolbar {
    grid-template-columns: minmax(0, 1fr) 48px 48px;
    gap: 8px;
  }
  body.planner-layout .search-row,
  body.planner-layout .map-tool {
    box-shadow: 0 8px 25px rgba(18,54,62,.15);
  }
  body.planner-layout .layers-panel {
    pointer-events: auto;
  }
}


/* Final compact map controls ---------------------------------------------- */
.desktop-add-spot {
  display: none;
}
@media (min-width: 781px) {
  body.planner-layout .search-toolbar {
    grid-template-columns: minmax(0, 1fr) auto 48px 48px;
  }
  .desktop-add-spot {
    min-width: 92px;
    height: 48px;
    padding: 0 13px;
    border: 1px solid var(--ss-line);
    border-radius: 16px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 8px 25px rgba(18,54,62,.15);
    color: var(--ss-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
  }
  body.planner-layout > #contribute,
  body.planner-layout .floating-contribute {
    display: none !important;
  }
}
@media (max-width: 780px) {
  .desktop-add-spot {
    display: none !important;
  }
}

/* Compact layer chooser: Map / Satellite / Saved use the same stacked card language. */
body.planner-layout .layers-panel {
  width: auto;
  min-width: 196px;
  max-width: 230px;
  padding: 6px;
  border-radius: 14px;
}
.layer-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
body.planner-layout .layer-option-grid > button {
  min-width: 0;
  min-height: 58px;
  margin: 0;
  padding: 7px 6px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ss-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: inherit;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.1;
}
body.planner-layout .layer-option-grid > button:hover,
body.planner-layout .layer-option-grid > button:focus-visible {
  background: rgba(35,138,160,.07);
}
body.planner-layout .layer-option-grid > button[aria-pressed="true"] {
  background: rgba(35,138,160,.11);
  color: var(--ss-water);
}
.layer-option-icon {
  width: 21px;
  height: 21px;
  display: block;
  fill: currentColor;
  color: inherit;
}
@media (max-width: 780px) {
  body.planner-layout .layers-panel {
    left: auto;
    right: 10px;
    width: 210px;
    max-width: calc(100vw - 20px);
    padding: 6px;
    border-radius: 16px;
  }
}

/* Forecast timing and status ---------------------------------------------- */
.forecast-24h-time {
  min-height: 27px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.forecast-24h-day {
  font-weight: 700;
}
.forecast-24h-clock {
  font-weight: 500;
}
.forecast-24h-icon.is-text {
  min-height: 19px;
  display: flex;
  align-items: center;
  font-size: 9px;
  font-weight: 650;
  color: var(--ss-muted);
}
.sea-condition-icon .ss-icon {
  width: 21px;
  height: 21px;
}

/* Community labels match the primary condition labels on desktop. */
@media (min-width: 781px) {
  #spot-dialog .community-icon-label {
    font-size: 10px;
    letter-spacing: 0;
  }
}


/* Final forecast/type colour refinements ---------------------------------- */
.forecast-24h-day,
.forecast-24h-clock,
.forecast-24h-icon.is-text {
  font-size: 10px;
}

/* Sea markers should read distinctly darker than lake markers. */
body.planner-layout .pin.sea,
.pin.sea {
  background: #155b78 !important;
}


/* About-this-spot heading aligns with the other section headings. */
#spot-dialog .detail-more.quiet-detail-row {
  margin: 17px 0 14px;
}
#spot-dialog .detail-more.quiet-detail-row > summary {
  width: 100%;
  padding: 0 0 9px;
  color: var(--ss-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: normal;
  text-transform: uppercase;
  letter-spacing: .08em;
}
#spot-dialog .detail-more.quiet-detail-row > summary .disclosure-chevron {
  margin-left: 2px;
  color: var(--ss-muted);
}

/* Keep the mobile close control clean; avoid the old orange focus box. */
@media (max-width: 780px) {
  #spot-dialog .close:focus,
  #spot-dialog .close:focus-visible {
    outline: none !important;
    box-shadow: none !important;
  }
}


/* Desktop top-left control stack ------------------------------------------ */
@media (min-width: 781px) {
  body.planner-layout header {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1500;
    width: min(470px, calc(100vw - 32px));
    height: 56px;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.planner-layout header .brand-menu {
    width: 100%;
  }

  body.planner-layout header .brand-menu-toggle {
    width: 100%;
    height: 56px;
    padding: 0 18px;
    border: 1px solid var(--ss-line);
    border-radius: 18px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 8px 25px rgba(18,54,62,.15);
    justify-content: flex-start;
  }

  body.planner-layout header .brand-menu-chevron {
    margin-left: auto;
  }

  body.planner-layout header .brand-menu-panel {
    width: 100%;
    top: 64px;
  }

  body.planner-layout .sidebar {
    top: 84px;
    width: min(470px, calc(100vw - 32px));
  }

  body.planner-layout .search-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.planner-layout .search-row {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.planner-layout .desktop-add-spot,
  body.planner-layout #near,
  body.planner-layout #layers-toggle {
    width: 100%;
    min-width: 0;
    height: 48px;
    min-height: 48px;
    border-radius: 16px;
  }

  body.planner-layout .desktop-add-spot {
    padding: 0 12px;
  }

  body.planner-layout #near,
  body.planner-layout #layers-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}


/* Tighter desktop top-left stack ------------------------------------------ */
@media (min-width: 781px) {
  body.planner-layout header,
  body.planner-layout .sidebar {
    width: min(260px, calc(100vw - 32px));
  }

  body.planner-layout .layers-panel {
    left: 0;
    right: auto;
    top: 112px;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
  }
}


/* Final desktop brand/control alignment ----------------------------------- */
@media (min-width: 781px) {
  body.planner-layout header .brand-menu-toggle {
    gap: 9px;
  }

  body.planner-layout header .brand-icon {
    width: 24px;
    height: 24px;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
  }

  .brand-swimmer-icon {
    width: 24px;
    height: 24px;
    display: block;
    fill: currentColor;
    color: var(--ss-water);
  }

  body.planner-layout header .brand-wordmark {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
  }

  body.planner-layout .desktop-add-spot,
  body.planner-layout #near,
  body.planner-layout #layers-toggle {
    width: 100%;
    min-width: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.planner-layout .desktop-add-spot .ui-control-icon,
  body.planner-layout #near .ui-control-icon,
  body.planner-layout #layers-toggle .ui-control-icon {
    width: 22px;
    height: 22px;
  }
}


/* Keep the custom brand swimmer bounded on every breakpoint. */
.brand-swimmer-icon {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
  color: var(--ss-water);
}
@media (max-width: 780px) {
  body.planner-layout header .brand-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    font-size: 0;
  }
  body.planner-layout header .brand-wordmark {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
  }
}
