/* ── Pin Map Shell ────────────────────────────────────────── */

.pin-map-shell {
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
  scroll-margin-top: var(--theme-site-header-height, calc(clamp(4rem, 5vw, 5rem) + (var(--space-3) * 2)));
}

.pin-map {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  min-height: var(--theme-map-height, 420px);
  overflow: hidden;
  border: 0;
  border-radius: var(--theme-radius, 14px);
  background: var(--theme-subtle);
}

.pin-map__scroll-hint {
  position: absolute;
  inset: 0;
  z-index: 800;
  display: grid;
  place-items: center;
  background: rgba(17, 17, 17, 0.44);
  color: var(--color-on-primary);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-map__scroll-hint.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pin-map__scroll-hint { transition: none; }
}

.pin-map__fallback {
  place-self: center;
  margin: 0;
  color: var(--theme-muted);
}

.pin-map .leaflet-tile {
  filter: saturate(0.86) contrast(0.94) brightness(1.04);
}

.pin-map .leaflet-control-zoom {
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-pill, 9999px);
  box-shadow: var(--theme-shadow);
}

.pin-map .leaflet-control-zoom a {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: var(--theme-surface);
  color: var(--theme-text);
  font-family: var(--font-body, system-ui, sans-serif);
  line-height: 2.75rem;
}

.pin-map .leaflet-control-attribution {
  border-radius: var(--radius-pill, 9999px) 0 0 0;
  background: color-mix(in srgb, var(--theme-surface) 82%, transparent);
  color: var(--theme-muted);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-micro, 0.75rem);
}

.pin-map-shell--explorer,
.pin-map--explorer {
  height: 100%;
  min-height: 100%;
}

/* 0×0 Leaflet anchor — Leaflet positions this div at lat/lng via transform3d.
   position:relative makes it the containing block for the absolutely-placed pill. */
.pin-map-marker {
  position: relative !important;
  width: 0 !important;
  height: 0 !important;
  overflow: visible !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Visible pill — CSS-centered on the 0×0 anchor point */
.pin-map-marker__pill {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 9rem;
  min-width: 2.75rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-surface);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.22);
  color: var(--theme-text);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 800;
  line-height: 1.3;
  gap: 0.3em;
  cursor: pointer;
  transition:
    background var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    box-shadow  var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    color       var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    transform   var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

/* Emoji: 25% larger than label text, no italic */
.pin-map-marker__pill .pm-e {
  font-size: 1.25em;
  font-style: normal;
  line-height: 1;
  flex-shrink: 0;
}

/* Label text: word-wrap at boundaries only, capped at 2 lines */
.pin-map-marker__pill span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: normal;
  white-space: normal;
  text-align: left;
}

.pin-map-marker:hover .pin-map-marker__pill,
.pin-map-marker.is-active .pin-map-marker__pill,
.pin-map__static-marker:hover,
.pin-map__static-marker.is-active {
  background: var(--theme-text);
  color: var(--theme-surface);
  transform: translate(-50%, -50%) scale(1.08);
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.24);
}


/* ── Cluster markers ──────────────────────────────────────── */

.pin-map-cluster {
  position: relative !important;
  width: 0 !important;
  height: 0 !important;
  overflow: visible !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.pin-map-cluster__pill {
  position: absolute;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-text);
  color: var(--theme-surface);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 2px 12px rgba(17, 17, 17, 0.32);
  cursor: pointer;
  transition: transform var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-map-cluster__pill:hover {
  transform: translate(-50%, -50%) scale(1.1);
}

/* ── Pin Explorer Split View ───────────────────────────────── */

.pin-explorer {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
  grid-template-areas:
    "toolbar toolbar"
    "header header"
    "list map";
  align-items: start;
  gap: var(--gap-grid);
  width: 100%;
  min-height: calc(100vh - 7rem);
}

.pin-explorer__toolbar {
  grid-area: toolbar;
  display: grid;
  justify-items: center;
  gap: var(--space-3, 0.75rem);
  margin-inline: calc(var(--space-page-inline, 1.5rem) * -1);
  padding: var(--space-3, 0.75rem) var(--space-page-inline, 1.5rem);
  border-bottom: 1px solid var(--theme-border-soft);
  background: var(--theme-subtle);
  overflow: visible;
  z-index: 5;
}

.pin-explorer__search-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: min(100%, 48rem);
}

.pin-explorer__list-panel {
  grid-area: list;
  display: grid;
  gap: var(--space-5, 1.25rem);
  min-width: 0;
  container-type: inline-size;
  container-name: pin-explorer-list;
}

.pin-explorer__header {
  grid-area: header;
  width: 100%;
  text-align: start;
  margin-block-end: var(--space-2);
}

.pin-explorer__list-context .breadcrumbs__list {
  justify-content: flex-start;
}

.pin-explorer__list-context .breadcrumbs--pin {
  margin-block-end: 0;
}

.pin-explorer__title {
  margin-block-start: var(--space-2);
}

.pin-explorer__description {
  max-width: 65ch;
}

.pin-explorer__map-panel {
  grid-area: map;
  position: sticky;
  z-index: 1;
  isolation: isolate;
  top: var(--theme-sticky-top);
  height: calc(100vh - var(--theme-sticky-top) - var(--space-4));
  min-height: 28rem;
  overflow: hidden;
  border-radius: var(--theme-radius);
}

.pin-map__chrome {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  pointer-events: none;
}

.pin-map__control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-pill);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
  color: var(--theme-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  transition:
    background var(--dur-fast) var(--ease-expo-out),
    transform var(--dur-fast) var(--ease-expo-out);
}

.pin-map__control:hover,
.pin-map__control:focus-visible {
  background: var(--theme-subtle);
  outline: none;
  transform: translateY(-1px);
}

.pin-map__control:focus-visible {
  outline: 2.5px solid var(--theme-accent);
  outline-offset: 2px;
}

.pin-map__control[aria-pressed="true"] {
  background: var(--theme-text);
  color: var(--color-on-primary);
}

.pin-explorer__view-toggle {
  min-height: 2.75rem;
  padding-inline: var(--space-5);
  border-radius: var(--radius-pill);
  box-shadow: var(--theme-shadow);
}

.pin-explorer__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 0.75rem);
  color: var(--theme-muted);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
}

.pin-explorer__sheet-handle {
  display: none;
}

.pin-explorer__summary strong {
  color: var(--theme-text);
  font-weight: 700;
}

.pin-explorer__mobile-actions {
  display: none;
}

/* Static placeholder map — richer grid pattern */
.pin-map--static {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 18rem);
  min-height: var(--theme-map-height, 420px);
  background:
    linear-gradient(90deg, rgba(34, 34, 34, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(34, 34, 34, 0.06) 1px, transparent 1px),
    var(--theme-subtle);
  background-size: 48px 48px, 48px 48px, auto;
}

.pin-map__canvas {
  position: relative;
  min-height: var(--theme-map-height, 420px);
}

.pin-map__static-marker {
  position: absolute;
  display: grid;
  width: auto;
  min-width: 2.75rem;
  height: 2.25rem;
  padding-inline: 0.7rem;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid var(--color-on-primary);
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-accent);
  box-shadow: var(--shadow-md);
  color: var(--color-on-primary);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  font-family: var(--font-body, system-ui, sans-serif);
}

.pin-map__legend {
  display: grid;
  align-content: start;
  gap: var(--space-2, 0.5rem);
  padding: var(--space-4, 1rem);
  border-left: 1px solid var(--theme-border);
  background: color-mix(in srgb, var(--theme-surface) 92%, transparent);
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
  font-family: var(--font-body, system-ui, sans-serif);
}

.pin-map__legend a {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: var(--space-2, 0.5rem);
  align-items: center;
  color: var(--theme-text);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-map__legend a:hover {
  color: var(--theme-accent);
}

.pin-map__legend span {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-accent);
  color: var(--color-on-primary);
  font-size: 0.68rem;
  font-weight: 700;
}


/* ── Pin Filters ──────────────────────────────────────────── */

.pin-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)) auto;
  gap: var(--space-2, 0.5rem);
  align-items: center;
  margin: var(--space-6, 1.5rem) 0 var(--space-8, 2rem);
  padding: var(--space-2, 0.5rem);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
}

.pin-filters .pin-filters__field {
  display: grid;
  gap: var(--space-1, 0.25rem);
  min-width: 0;
  padding-inline: var(--space-4, 1rem);
  color: var(--theme-muted);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.pin-filters .pin-filters__field + .pin-filters__field {
  border-left: 1px solid var(--theme-border);
}

.pin-filters input,
.pin-filters select {
  width: 100%;
  min-height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--theme-text);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  transition:
    border-color var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    box-shadow   var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
  appearance: none;
  -webkit-appearance: none;
}

.pin-filters select {
  appearance: auto;
  -webkit-appearance: auto;
}

.pin-filters input:focus,
.pin-filters select:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 var(--theme-text);
}

.pin-filters input::placeholder {
  color: var(--theme-muted);
}

.pin-filters__submit {
  min-width: 6.5rem;
  align-self: stretch;
}

.pin-filters--explorer {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-pill);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
  overflow: hidden;
}

.pin-filters--explorer:has(.ms-dropdown.is-open) {
  overflow: visible;
}

.pin-filters--explorer .pin-filters__desktop {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  border-radius: inherit;
}

.pin-filters--explorer .pin-filters__desktop:has(.ms-dropdown.is-open) {
  overflow: visible;
}

.pin-filters__mobile-trigger {
  display: none;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 3rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-pill);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
  color: var(--theme-text);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-expo-out);
}

.pin-filters__mobile-trigger .pin-filters__count-badge {
  margin-inline-start: auto;
}

.pin-filters__mobile-trigger:hover,
.pin-filters__mobile-trigger:focus-visible {
  background: var(--theme-subtle);
  outline: none;
}

.pin-filters__mobile-trigger:focus-visible {
  outline: 2.5px solid var(--theme-accent);
  outline-offset: 2px;
}

.pin-filters__mobile-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.pin-filters__mobile-summary {
  display: block;
  overflow: hidden;
  color: var(--theme-muted);
  font-size: var(--text-sm);
  font-weight: 400;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-filters__mobile-summary.has-selection {
  color: var(--theme-text);
  font-weight: 500;
}

.pin-filters__mobile-chevron {
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  color: var(--theme-muted);
}

.pin-filters__modal[hidden] {
  display: none !important;
}

.pin-filters__modal:not([hidden]) {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: end;
  pointer-events: none;
}

.pin-filters__modal.is-open {
  pointer-events: all;
}

.pin-filters__modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in srgb, var(--color-scrim) 45%, transparent);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-expo-out);
}

.pin-filters__modal.is-open .pin-filters__modal-backdrop {
  opacity: 1;
}

.pin-filters__modal-sheet {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100%;
  max-height: min(88dvh, 40rem);
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
  translate: 0 100%;
  transition: translate var(--dur-base) var(--ease-expo-out);
}

.pin-filters__modal.is-open .pin-filters__modal-sheet {
  translate: 0 0;
}

.pin-filters__modal-handle {
  width: 3rem;
  height: 0.25rem;
  margin: var(--space-3) auto var(--space-1);
  border-radius: var(--radius-pill);
  background: var(--theme-border);
}

.pin-filters__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-5) var(--space-4);
}

.pin-filters__modal-title {
  margin: 0;
  color: var(--theme-text);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.25;
}

.pin-filters__modal-close {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--theme-subtle);
  color: var(--theme-text);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-expo-out);
}

.pin-filters__modal-close:hover,
.pin-filters__modal-close:focus-visible {
  background: var(--theme-surface-strong);
  outline: none;
}

.pin-filters__modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--space-5) var(--space-4);
}

.pin-filters__modal-search {
  margin-bottom: var(--space-5);
}

.pin-filters__modal-search .input-wrap {
  position: relative;
}

.pin-filters__modal-search .input-wrap__icon {
  position: absolute;
  top: 50%;
  left: var(--space-4);
  translate: 0 -50%;
  pointer-events: none;
}

.pin-filters__modal-search .input {
  padding-left: calc(var(--space-4) + 1.25rem + var(--space-2));
}

.pin-filter-group {
  margin: 0 0 var(--space-5);
  padding: 0;
  border: 0;
}

.pin-filter-group:last-child {
  margin-bottom: 0;
}

.pin-filter-group__legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  margin-bottom: var(--space-3);
  padding: 0;
}

.pin-filter-group__title {
  color: var(--theme-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: 1.3;
}

.pin-filter-group__clear {
  border: 0;
  background: transparent;
  color: var(--theme-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.pin-filter-group__clear:hover,
.pin-filter-group__clear:focus-visible {
  color: var(--theme-accent-strong);
  outline: none;
}

.pin-filter-group__options {
  display: grid;
  gap: var(--space-1);
}

.pin-filter-group__option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast) var(--ease-expo-out);
}

.pin-filter-group__option:hover {
  background: var(--theme-subtle);
}

.pin-filter-group__option input[type="checkbox"] {
  margin-top: 0;
}

.pin-filters__modal-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--theme-border);
  background: var(--theme-surface);
}

.pin-filters__modal-clear {
  min-height: 3rem;
}

.pin-filters__modal-apply {
  min-height: 3rem;
}

.pin-filters--explorer > .pin-filters__field,
.pin-filters--explorer > .pin-filters__segment,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__field,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__segment {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.pin-filters--explorer > .pin-filters__field + .pin-filters__field,
.pin-filters--explorer > .pin-filters__field + .pin-filters__segment,
.pin-filters--explorer > .pin-filters__segment + .pin-filters__segment,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__field + .pin-filters__field,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__field + .pin-filters__segment,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__segment + .pin-filters__segment {
  border-left: 1px solid var(--theme-border);
}

.pin-filters--explorer .pin-filters__field:first-of-type {
  min-width: 0;
}

.pin-filters--explorer .pin-filters__desktop > .pin-filters__field:first-child {
  border-radius: var(--radius-pill) 0 0 var(--radius-pill);
}

.pin-filters--explorer .pin-filters__desktop > .pin-filters__segment:last-child .ms-dropdown__trigger,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__field:last-child,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__dialog-trigger:last-child {
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

.pin-filters--explorer .pin-filters__desktop > .pin-filters__field + .pin-filters__dialog-trigger,
.pin-filters--explorer .pin-filters__desktop > .pin-filters__segment + .pin-filters__dialog-trigger {
  border-left: 1px solid var(--theme-border);
}

.pin-filters--explorer input:focus,
.pin-filters--explorer select:focus {
  box-shadow: none;
}

.pin-filters__segment-label {
  display: block;
  color: var(--theme-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pin-filters__segment-value {
  display: block;
  min-width: 0;
  color: var(--theme-text);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  line-height: 1.25;
}

.pin-filters--explorer .pin-filters__field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.125rem;
  min-height: 3.5rem;
  min-width: 8rem;
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: 0;
  background: transparent;
  transition: background var(--dur-fast) var(--ease-expo-out);
}

.pin-filters--explorer .pin-filters__field:hover,
.pin-filters--explorer .pin-filters__field:focus-within {
  background: var(--theme-subtle);
}

.pin-filters--explorer .pin-filters__field--search .pin-filters__segment-value {
  width: 100%;
}

.pin-filters--explorer .pin-filters__field input {
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--theme-text);
  min-height: 1.25rem;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  background: transparent;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.pin-filters--explorer .pin-filters__field input::placeholder {
  color: var(--theme-muted);
}

.pin-filters--explorer .pin-filters__field input:focus {
  outline: none;
  box-shadow: none;
}

.pin-filters--explorer .pin-filters__segment {
  display: flex;
  align-items: stretch;
  min-width: 6.5rem;
  flex: 1 1 7rem;
}

.pin-filters--explorer .pin-filters__segment .ms-dropdown__trigger:hover,
.pin-filters--explorer .pin-filters__segment .ms-dropdown__trigger:focus-visible,
.pin-filters--explorer .pin-filters__segment:has(.ms-dropdown.is-open) .ms-dropdown__trigger {
  background: var(--theme-subtle);
}

.pin-filters--explorer .ms-dropdown--compact .ms-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  min-height: 3.5rem;
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pin-filters--explorer .ms-dropdown--compact .ms-dropdown__trigger-copy {
  display: block;
  min-width: 0;
  text-align: left;
}

.pin-filters--explorer .ms-dropdown--compact .ms-dropdown__summary {
  display: block;
  overflow: hidden;
  color: var(--theme-text);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-filters--explorer .ms-dropdown--compact .ms-dropdown__summary:not(.has-selection) {
  color: var(--theme-muted);
  font-weight: 400;
}

.pin-filters--explorer .ms-dropdown__option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-3);
  grid-template-columns: unset;
  min-width: 0;
  padding-inline: var(--space-4);
  color: var(--theme-text);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.pin-filters--explorer .ms-dropdown__option-label {
  flex: 1 1 auto;
  min-width: 0;
}

.pin-filters--explorer .pin-filters__segment .ms-dropdown {
  width: 100%;
}

.pin-filters--explorer .pin-filters__segment.is-open,
.pin-filters--explorer .pin-filters__segment:has(.ms-dropdown.is-open) {
  z-index: 2;
}

.pin-filters__field--search {
  flex: 1.4 1 12rem;
}

.pin-filters__segment-value--search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
}

.pin-filters__segment-value--search .pin-filters__icon {
  flex: 0 0 auto;
}

.pin-filters__segment-value--search input {
  flex: 1 1 auto;
  min-width: 0;
}

.pin-filters__icon {
  width: 1rem;
  height: 1rem;
  color: var(--theme-muted);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pin-filters__field:focus-within .pin-filters__icon,
.pin-filters__field:hover .pin-filters__icon {
  color: var(--theme-text);
}

.pin-filters--explorer .pin-filters__submit {
  width: 3.25rem;
  min-width: 3.25rem;
  min-height: 3.25rem;
  padding-inline: 0;
  border-radius: var(--radius-pill, 9999px);
  font-size: 0;
}

.pin-filters--explorer .pin-filters__submit::before {
  content: "⌕";
  font-size: var(--text-lg, 1.125rem);
  line-height: 1;
}

.pin-filters__dialog-trigger {
  display: none;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
  min-height: 3.25rem;
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-left: 1px solid var(--theme-border);
  border-radius: 0;
  background: transparent;
  color: var(--theme-text);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-expo-out);
}

.pin-filters__dialog-trigger:hover,
.pin-filters__dialog-trigger:focus-visible {
  background: var(--theme-subtle);
  outline: none;
}

.pin-filters__dialog-trigger:focus-visible {
  outline: 2.5px solid var(--theme-accent);
  outline-offset: -2px;
}

.pin-filters__count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: var(--radius-pill);
  background: var(--theme-text);
  color: var(--color-on-primary);
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

[data-pin-filters-count][hidden] {
  display: none !important;
}

/* ── Focus visible — keyboard navigation ring ─────────────── */

.pin-card__media:focus-visible,
.pin-card__title a:focus-visible,
.pin-card__terms a:focus-visible,
.pin-map__legend a:focus-visible,
.pin-map__static-marker:focus-visible {
  outline: 2.5px solid var(--theme-accent);
  outline-offset: 3px;
}


/* ── Pin Card Grid ────────────────────────────────────────── */

.pin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--pin-card-min, 19rem)), 1fr));
  gap: var(--gap-grid);
  transition: opacity var(--dur-base) var(--ease-expo-out);
}

/* Applied by JS during REST fetch — fades grid to signal loading */
.pin-grid.is-loading {
  pointer-events: none;
}

.pin-card--skeleton {
  pointer-events: none;
}

.pin-card--skeleton .pin-card__photo,
.pin-skeleton-line {
  position: relative;
  overflow: hidden;
  background: var(--theme-subtle);
}

.pin-card--skeleton .pin-card__photo::after,
.pin-skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--theme-surface) 76%, transparent), transparent);
  transform: translateX(-100%);
  animation: pin-skeleton-shimmer 1.15s infinite;
}

.pin-skeleton-line {
  display: block;
  width: 78%;
  height: 0.8rem;
  border-radius: var(--radius-pill, 9999px);
}

.pin-skeleton-line--title {
  width: 92%;
}

.pin-skeleton-line--short {
  width: 48%;
}

@keyframes pin-skeleton-shimmer {
  to {
    transform: translateX(100%);
  }
}

.pin-card {
  display: grid;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: box-shadow var(--dur-base, 260ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card:hover {
  box-shadow: none;
}

.pin-card.is-map-active .pin-card__photo {
  outline: 2px solid var(--theme-text);
  outline-offset: 3px;
}

.pin-card__photo {
  position: relative;
  aspect-ratio: var(--pin-card-aspect-ratio, 16 / 9);
  overflow: hidden;
  border-radius: var(--theme-radius, 14px);
  background: var(--theme-subtle);
}

.pin-card__photo--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--theme-surface) 55%, transparent) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: pin-skeleton-shimmer 1.1s ease-in-out infinite;
}

.pin-card__photo--loading .pin-card__media img {
  opacity: 0;
  transition: opacity var(--dur-fast, 180ms) var(--ease-smooth, ease);
}

.pin-card__photo:not(.pin-card__photo--loading) .pin-card__media img {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .pin-card__photo--loading::after {
    animation: none;
    opacity: 0.35;
    transform: none;
  }
}

/* Media block — fixed-ratio with zoom on hover */
.pin-card__media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: var(--theme-subtle);
}

.pin-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow, 400ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card:hover .pin-card__media img {
  transform: scale(1.06);
}

.pin-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    var(--theme-surface-strong) 0%,
    var(--theme-subtle) 55%,
    var(--theme-surface-strong) 100%
  );
}

/* Save / heart affordance */
.pin-card__save {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-on-primary);
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-expo-out),
    color    var(--dur-fast) var(--ease-expo-out);
}

.pin-card__save:hover,
.pin-card__save:focus-visible {
  transform: scale(1.12);
  outline: none;
}

.pin-card__save svg path {
  fill: none;
  stroke: currentColor;
}

.pin-card__save[aria-pressed="true"] {
  color: var(--theme-accent);
}

.pin-card__save[aria-pressed="true"] svg path {
  fill: var(--theme-accent);
  stroke: var(--theme-accent);
}


/* ── Pin card image slider ────────────────────────────── */

.pin-card__track {
  position: absolute;
  inset: 0;
}

.pin-card__slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--theme-subtle);
  /* opacity:0 keeps the element in the render tree so loading="lazy"
     fires as the card enters the viewport — all slides load together.
     display:none would block the browser from ever issuing the request
     until the slide became active, causing a visible blank on swipe. */
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.pin-card__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow, 400ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card__photo--slider:hover .pin-card__slide.is-active img {
  transform: scale(1.06);
}

/* Nav arrows — hidden until hover, revealed on focus for keyboard users */
.pin-card__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transform: translateY(-50%);
  opacity: 0;
  transition:
    opacity var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    transform var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card__nav--prev {
  left: 0.625rem;
}

.pin-card__nav--next {
  right: 0.625rem;
}

.pin-card__photo--slider:hover .pin-card__nav,
.pin-card__photo--slider:focus-within .pin-card__nav {
  opacity: 1;
}

.pin-card__nav:hover,
.pin-card__nav:focus-visible {
  transform: translateY(-50%) scale(1.08);
  outline: none;
}

/* Dots */
.pin-card__dots {
  position: absolute;
  right: 0;
  bottom: 0.5rem;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  pointer-events: none;
}

.pin-card__dot {
  width: 0.375rem;
  height: 0.375rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill, 9999px);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  pointer-events: auto;
  transition: background var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card__dot.is-active {
  background: var(--theme-surface);
}

@media (prefers-reduced-motion: reduce) {
  .pin-card__slide img,
  .pin-card__nav,
  .pin-card__dot {
    transition: none;
  }
}


/* Body content */
.pin-card__body {
  display: grid;
  gap: var(--space-1, 0.25rem);
  padding: var(--space-3, 0.75rem) 0 0;
}

/* Category term tags */
.pin-card__terms {
  position: absolute;
  top: var(--space-3, 0.75rem);
  left: var(--space-3, 0.75rem);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1, 0.25rem);
}

.pin-card__terms--inline {
  position: static;
  margin-bottom: var(--space-1, 0.25rem);
}

.pin-card__terms a {
  display: inline-block;
  padding: 0.35rem var(--space-3, 0.75rem);
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow: var(--theme-shadow);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-badge, 0.6875rem);
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  transition: background var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
              color    var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card__terms a:hover {
  background: var(--theme-surface);
  color: var(--theme-accent);
  text-decoration: none;
}

.pin-card__terms--inline a {
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 400;
}

.pin-card__terms--inline a + a::before {
  content: "·";
  margin-inline: var(--space-1, 0.25rem);
  color: var(--theme-muted);
}

.pin-card__title {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-base, 1rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.pin-card__title a {
  color: var(--theme-text);
  text-decoration: none;
  transition: color var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-card__title a:hover {
  color: var(--theme-accent);
}

.pin-card__price {
  margin: 0;
  font-size: var(--text-base, 1rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--theme-text);
}

.pin-card__description,
.pin-card__meta {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  color: var(--theme-muted);
  line-height: 1.43;
}

.pin-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2, 0.5rem);
}

.pin-card__distance {
  font-weight: 600;
  color: var(--theme-text);
}

.pin-card__regions a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pin-card__regions a:hover,
.pin-card__regions a:focus-visible {
  color: var(--theme-accent);
}


/* ── Pin Single ───────────────────────────────────────────── */

.pin-single {
  display: grid;
  gap: var(--space-8, 2rem);
}

.pin-single__hero {
  display: grid;
  gap: var(--space-4, 1rem);
}

.pin-single__titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6, 1.5rem);
}

.pin-single__title {
  margin: 0;
  font-size: clamp(var(--text-xl, 1.3125rem), calc(1rem + 1.2vw), var(--text-3xl, 1.75rem));
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.pin-single__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2, 0.5rem);
  flex-shrink: 0;
}

.pin-single__tool {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  min-height: auto;
  padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
  border: 0;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--theme-text);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition:
    background var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    color var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-single__tool:hover,
.pin-single__tool:focus-visible {
  background: var(--theme-subtle);
  color: var(--theme-text);
  box-shadow: none;
}

.pin-single__tool--save[aria-pressed="true"] {
  color: var(--theme-accent);
}

.pin-single__tool--save[aria-pressed="true"] svg {
  fill: var(--theme-accent);
  stroke: var(--theme-accent);
}

.pin-single__tool svg {
  flex-shrink: 0;
}

.pin-single__intro {
  display: grid;
  gap: var(--space-3, 0.75rem);
  padding-block: var(--space-2, 0.5rem) var(--space-6, 1.5rem);
  border-bottom: 1px solid var(--theme-border-soft);
}

.pin-single__subtitle {
  margin: 0;
  font-size: var(--text-base, 1rem);
  font-weight: 400;
  line-height: 1.4;
  color: var(--theme-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--theme-border);
}

.pin-single__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4, 1rem);
}

.pin-single__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2, 0.5rem) var(--space-4, 1rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin-single__stat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  font-size: var(--text-base, 1rem);
  line-height: 1.5;
  color: var(--theme-text);
}

.pin-single__stat + .pin-single__stat::before {
  content: none;
}

.pin-single__stat:not(:last-child)::after {
  content: "·";
  margin-inline-start: var(--space-3, 0.75rem);
  color: var(--theme-muted);
  font-weight: 400;
}

.pin-single__stat-icon {
  color: var(--theme-text);
  flex-shrink: 0;
}

.pin-single__price {
  margin: 0;
}

.pin-single__price .pin-price__amount {
  font-size: var(--text-lg, 1.25rem);
  font-weight: 700;
  color: var(--theme-text);
}

.pin-single__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6, 1.5rem);
}

.pin-single__terms {
  margin: var(--space-2, 0.5rem) 0 0;
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
}

.pin-single__media {
  margin: 0;
  overflow: hidden;
  border-radius: var(--theme-radius, 14px);
  box-shadow: none;
}

.pin-single__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.pin-gallery {
  --pin-gallery-height: clamp(15rem, 32vw, 19.5rem);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2, 0.5rem);
  height: var(--pin-gallery-height);
  overflow: hidden;
  border-radius: var(--theme-radius, 14px);
}

.pin-gallery--single {
  grid-template-columns: minmax(0, 1fr);
  height: clamp(14rem, 45vw, 24rem);
}

.pin-gallery--duo {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.pin-gallery--trio .pin-gallery__grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.pin-gallery__primary,
.pin-gallery__cell {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: var(--theme-subtle);
  cursor: pointer;
}

.pin-gallery__primary::after,
.pin-gallery__cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast, 160ms) var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.pin-gallery__trigger:hover::after,
.pin-gallery__trigger:focus-visible::after {
  opacity: 0.12;
}

.pin-gallery__primary img,
.pin-gallery__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-base, 260ms) var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.pin-gallery__trigger:hover img,
.pin-gallery__trigger:focus-visible img {
  transform: scale(1.02);
}

.pin-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--space-2, 0.5rem);
  height: 100%;
}

.pin-gallery__cell--more::after {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--color-scrim) 28%, transparent);
  pointer-events: none;
}

.pin-gallery__more {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--color-on-primary);
  font-size: var(--text-xl, 1.3125rem);
  font-weight: 600;
  pointer-events: none;
}

.pin-gallery__show-all {
  position: absolute;
  right: var(--space-3, 0.75rem);
  bottom: var(--space-3, 0.75rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  min-height: 2rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--theme-text);
  border-radius: var(--radius-sm, 8px);
  background: var(--theme-surface);
  color: var(--theme-text);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: none;
  transition:
    box-shadow var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    transform var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    background var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-gallery__show-all:hover,
.pin-gallery__show-all:focus-visible {
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
  transform: translateY(-1px);
}

/* ── Lightbox — true fullscreen ──────────────────────────────────────── */
.pin-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  opacity: 0;
  transition: opacity 220ms ease;
}

.pin-gallery-lightbox.is-open {
  opacity: 1;
}

.pin-gallery-lightbox[hidden] {
  display: none;
}

/* Top bar: counter left, close right */
.pin-gallery-lightbox__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  pointer-events: none;
}

.pin-gallery-lightbox__counter {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pin-gallery-lightbox__close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 140ms ease;
}

.pin-gallery-lightbox__close:hover,
.pin-gallery-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

/* Stage: image fills full viewport, nav buttons overlay it */
.pin-gallery-lightbox__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
}

.pin-gallery-lightbox__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
  transition: opacity 260ms ease;
}

.pin-gallery-lightbox__image.is-loading {
  opacity: 0;
}

/* Prev / next — positioned over image */
.pin-gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 140ms ease, transform 140ms ease;
}

.pin-gallery-lightbox__nav--prev {
  left: 1.25rem;
}

.pin-gallery-lightbox__nav--next {
  right: 1.25rem;
}

.pin-gallery-lightbox__nav:hover,
.pin-gallery-lightbox__nav:focus-visible {
  background: rgba(255, 255, 255, 0.28);
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.pin-gallery-lightbox__nav--prev:hover {
  transform: translateY(-50%) translateX(-2px);
}

.pin-gallery-lightbox__nav--next:hover {
  transform: translateY(-50%) translateX(2px);
}

body.pin-gallery-lightbox-open {
  overflow: hidden;
}

/* Light theme — content gallery lightbox */
.pin-gallery-lightbox--light {
  background: #fff;
}

.pin-gallery-lightbox--light .pin-gallery-lightbox__bar {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.96) 0%, transparent 100%);
}

.pin-gallery-lightbox--light .pin-gallery-lightbox__counter {
  color: var(--theme-text, #111);
  text-shadow: none;
}

.pin-gallery-lightbox--light .pin-gallery-lightbox__close,
.pin-gallery-lightbox--light .pin-gallery-lightbox__nav {
  background: color-mix(in srgb, var(--theme-text, #111) 8%, transparent);
  color: var(--theme-text, #111);
}

.pin-gallery-lightbox--light .pin-gallery-lightbox__close:hover,
.pin-gallery-lightbox--light .pin-gallery-lightbox__close:focus-visible,
.pin-gallery-lightbox--light .pin-gallery-lightbox__nav:hover,
.pin-gallery-lightbox--light .pin-gallery-lightbox__nav:focus-visible {
  background: color-mix(in srgb, var(--theme-text, #111) 14%, transparent);
  outline: 2px solid color-mix(in srgb, var(--theme-text, #111) 22%, transparent);
  outline-offset: 2px;
}

/* Content body gallery — uniform grid (not header mosaic) */
.pin-content-gallery {
  display: grid;
  gap: var(--space-4, 1rem);
  padding-block: var(--space-6, 1.5rem);
  border-top: 1px solid var(--theme-border-soft);
}

.pin-content-gallery__title {
  margin: 0;
  font-size: var(--text-xl, 1.3125rem);
  font-weight: 600;
  line-height: 1.3;
}

.pin-content-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2, 0.5rem);
}

.pin-content-gallery__cell {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--theme-radius, 14px);
  background: var(--theme-subtle);
  cursor: pointer;
}

.pin-content-gallery__cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-scrim);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast, 160ms) var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.pin-content-gallery__cell:hover::after,
.pin-content-gallery__cell:focus-visible::after {
  opacity: 0.12;
}

.pin-content-gallery__cell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-base, 260ms) var(--ease-smooth, cubic-bezier(0.4, 0, 0.2, 1));
}

.pin-content-gallery__cell:hover img,
.pin-content-gallery__cell:focus-visible img {
  transform: scale(1.02);
}

@media (min-width: 640px) {
  .pin-content-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin-content-gallery__cell img,
  .pin-content-gallery__cell::after {
    transition: none;
  }
}

@media (max-width: 480px) {
  .pin-gallery-lightbox__nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .pin-gallery-lightbox__nav--prev {
    left: 0.625rem;
  }

  .pin-gallery-lightbox__nav--next {
    right: 0.625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pin-gallery__primary img,
  .pin-gallery__cell img,
  .pin-gallery__primary::after,
  .pin-gallery__cell::after,
  .pin-gallery__show-all,
  .pin-single__tool,
  .pin-amenities__toggle,
  .pin-gallery-lightbox,
  .pin-gallery-lightbox__image,
  .pin-gallery-lightbox__nav,
  .pin-gallery-lightbox__close {
    transition: none;
  }
}

@media (max-width: 744px) {
  .pin-gallery:not(.pin-gallery--single) {
    grid-template-columns: minmax(0, 1fr);
    height: clamp(14rem, 52vw, 18rem);
  }

  .pin-gallery__grid {
    display: none;
  }

  .pin-gallery__show-all {
    right: var(--space-2, 0.5rem);
    bottom: var(--space-2, 0.5rem);
  }
}

.pin-single__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 1100px) and (min-width: 901px) {
  .pin-single__layout {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
    gap: var(--space-6);
  }
}

.pin-single__main {
  display: grid;
  gap: var(--space-6, 1.5rem);
  min-width: 0;
}

.pin-single__aside {
  display: grid;
  gap: var(--space-4, 1rem);
  position: sticky;
  top: var(--theme-sticky-top, calc(5rem + var(--space-6, 1.5rem)));
  z-index: 10;
  align-self: start;
}

/* Contact / booking-style card */
.pin-actions {
  display: grid;
  gap: var(--space-4, 1rem);
  padding: var(--space-6, 1.5rem);
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--theme-radius, 14px);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
  transition: box-shadow var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-actions:hover {
  box-shadow: var(--theme-shadow);
}

.pin-actions__price {
  margin: 0;
  padding-bottom: var(--space-3, 0.75rem);
  border-bottom: 1px solid var(--theme-border-soft);
}

.pin-actions__price .pin-price__amount {
  font-size: var(--text-xl, 1.3125rem);
  font-weight: 700;
  color: var(--theme-text);
}

.pin-actions__row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3, 0.75rem);
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
  color: var(--theme-body);
}

.pin-actions__row--stack {
  flex-direction: column;
  gap: var(--space-1, 0.25rem);
}

.pin-actions__icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--theme-text);
}

.pin-actions__row a {
  color: var(--theme-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pin-actions__row a:hover,
.pin-actions__row a:focus-visible {
  color: var(--theme-accent);
}

.pin-actions__button,
.button.pin-actions__button {
  width: 100%;
  max-width: 100%;
  min-height: 2.75rem;
  box-shadow: none;
}

.pin-actions__button--primary:hover,
.pin-actions__button--primary:focus-visible {
  box-shadow: none;
}

.pin-actions__button--whatsapp {
  background: var(--theme-whatsapp);
  border-color: var(--theme-whatsapp);
  color: var(--color-on-primary);
}

.pin-actions__button--whatsapp:hover,
.pin-actions__button--whatsapp:focus-visible {
  background: var(--theme-whatsapp-hover);
  border-color: var(--theme-whatsapp-hover);
  color: var(--color-on-primary);
}

.pin-single__sponsored,
.pin-card__sponsored {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill, 999px);
  background: var(--theme-surface-muted, rgba(0, 0, 0, 0.06));
  color: var(--theme-text-muted, var(--theme-muted));
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pin-card__sponsored {
  position: absolute;
  top: var(--space-3, 0.75rem);
  left: var(--space-3, 0.75rem);
  z-index: 2;
}

.pin-single__titlebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2, 0.5rem);
}

#pin-lead-form {
  margin-top: var(--space-3, 0.75rem);
}

.pin-actions__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2, 0.5rem);
  margin-top: var(--space-1, 0.25rem);
  padding: var(--space-2, 0.5rem);
  color: var(--theme-text);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-actions__back:hover,
.pin-actions__back:focus-visible {
  color: var(--theme-accent);
}

.pin-actions p {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
}

.pin-actions strong {
  display: block;
  margin-bottom: var(--space-1, 0.25rem);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--theme-muted);
}

.pin-actions a:not(.button):not(.pin-actions__back) {
  color: var(--theme-accent);
  font-weight: 500;
}


/* Icon grid — shared amenities + listing details (Airbnb “What this place offers” pattern) */
.pin-icon-grid-section {
  display: grid;
  gap: var(--space-6, 1.5rem);
  padding-block: var(--space-8, 2rem);
}

.pin-icon-grid__title {
  margin: 0;
  font-size: var(--text-xl, 1.3125rem);
  font-weight: 600;
  line-height: 1.3;
}

.pin-icon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4, 1rem) var(--space-6, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin-icon-grid__item {
  display: flex;
  align-items: center;
  gap: var(--space-3, 0.75rem);
  min-width: 0;
  font-size: var(--text-base, 1rem);
  line-height: 1.4;
  color: var(--theme-text);
}

.pin-icon-grid__item--kv {
  align-items: flex-start;
}

.pin-icon-grid__item--hidden {
  display: none;
}

.pin-amenities.is-expanded .pin-icon-grid__item--hidden {
  display: flex;
}

/* Plain Lucide only — no border, circle, tint, or accent color (see pin-icon-grid.md). */
.pin-icon-grid__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--theme-text);
}

.pin-icon-grid__icon svg,
.pin-icon-grid__svg {
  display: block;
  fill: none;
  stroke: currentColor;
  color: inherit;
}

.pin-icon-grid__primary {
  min-width: 0;
}

.pin-icon-grid__body {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.pin-icon-grid__label {
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.35;
  color: var(--theme-muted);
}

.pin-icon-grid__value {
  font-size: var(--text-base, 1rem);
  line-height: 1.4;
  font-weight: 500;
  color: var(--theme-text);
  word-break: break-word;
}

.pin-icon-grid__value .pin-field__unit {
  font-weight: 400;
  color: var(--theme-muted);
}

.pin-icon-grid__value .pin-field__link {
  color: var(--theme-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pin-icon-grid__value .pin-field__link:hover,
.pin-icon-grid__value .pin-field__link:focus-visible {
  color: var(--theme-accent);
}

.pin-icon-grid__value .pin-field__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full, 9999px);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
}

.pin-icon-grid__value .pin-field__pill.is-active {
  background: var(--theme-subtle);
  color: var(--theme-text);
}

.pin-icon-grid__value .pin-field__pill.is-inactive {
  background: transparent;
  color: var(--theme-muted);
}

.pin-icon-grid__value .pin-field__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1, 0.25rem);
}

.pin-icon-grid__value .pin-field__tag {
  display: inline-flex;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full, 9999px);
  background: var(--theme-subtle);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
}

.pin-icon-grid__toggle,
.pin-amenities__toggle,
.pin-weather__toggle {
  justify-self: start;
  padding: 0.65rem 1rem;
  border: 1px solid var(--theme-text);
  border-radius: var(--radius-sm, 8px);
  background: var(--theme-surface);
  color: var(--theme-text);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition:
    background var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    box-shadow var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-icon-grid__toggle:hover,
.pin-icon-grid__toggle:focus-visible,
.pin-amenities__toggle:hover,
.pin-amenities__toggle:focus-visible,
.pin-weather__toggle:hover,
.pin-weather__toggle:focus-visible {
  background: var(--theme-subtle);
  box-shadow: var(--theme-shadow);
}

@media (max-width: 744px) {
  .pin-icon-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Amenities — Airbnb “What this place offers” */
.pin-about {
  display: grid;
  gap: var(--space-4, 1rem);
  padding-bottom: var(--space-8, 2rem);
}

.pin-about__title {
  margin: 0;
  font-size: var(--text-xl, 1.3125rem);
  font-weight: 600;
  line-height: 1.3;
}

.pin-about + .pin-listing-details,
.pin-about + .pin-beach-stories,
.pin-about + .pin-weather,
.pin-about + .pin-beach-note,
.pin-about + .pin-amenities,
.pin-about + .pin-beach-combine,
.pin-about + .pin-single__discovery,
.pin-listing-details + .pin-beach-stories,
.pin-listing-details + .pin-weather,
.pin-listing-details + .pin-beach-note,
.pin-listing-details + .pin-amenities,
.pin-listing-details + .pin-beach-combine,
.pin-beach-stories + .pin-weather,
.pin-beach-stories + .pin-tides,
.pin-beach-stories + .pin-wind,
.pin-beach-stories + .pin-beach-note,
.pin-beach-stories + .pin-amenities,
.pin-beach-stories + .pin-beach-combine,
.pin-weather + .pin-tides,
.pin-weather + .pin-wind,
.pin-weather + .pin-beach-note,
.pin-weather + .pin-amenities,
.pin-weather + .pin-beach-combine,
.pin-weather + .pin-single__discovery,
.pin-tides + .pin-wind,
.pin-tides + .pin-beach-note,
.pin-tides + .pin-amenities,
.pin-tides + .pin-beach-combine,
.pin-tides + .pin-single__discovery,
.pin-wind + .pin-beach-note,
.pin-wind + .pin-amenities,
.pin-wind + .pin-beach-combine,
.pin-wind + .pin-single__discovery,
.pin-beach-note + .pin-amenities,
.pin-beach-note + .pin-beach-combine,
.pin-amenities + .pin-beach-combine,
.pin-amenities + .pin-single__discovery,
.pin-beach-combine + .pin-single__discovery,
.pin-listing-details + .pin-single__discovery,
.pin-single__discovery + .pin-source-attribution--subtle,
.pin-single__main > .pin-listing-details:first-child,
.pin-single__main > .pin-amenities:first-child,
.pin-single__main > .pin-source-attribution--subtle:first-child {
  border-top: 1px solid var(--theme-border-soft);
}

/* .pin-amenities uses .pin-icon-grid-section + .pin-icon-grid (see pin-icon-grid block above) */

.pin-single__description {
  padding-bottom: 0;
}

/* .pin-listing-details uses .pin-icon-grid-section + .pin-icon-grid--kv */

.pin-beach-note {
  padding-block: var(--space-6, 1.5rem);
}

.pin-beach-note__title {
  margin: 0 0 var(--space-3, 0.75rem);
  font-size: var(--text-lg, 1.125rem);
  font-weight: 600;
  line-height: 1.3;
}

.pin-beach-note__text {
  margin: 0;
  max-width: 65ch;
  font-size: var(--text-base, 1rem);
  line-height: 1.6;
  color: var(--theme-text-muted, var(--theme-text));
}

.pin-beach-combine {
  padding-block: var(--space-8, 2rem);
}

.pin-beach-combine__title {
  margin: 0 0 var(--space-4, 1rem);
  font-size: var(--text-xl, 1.3125rem);
  font-weight: 600;
  line-height: 1.3;
}

.pin-beach-combine__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin-beach-combine__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--radius-pill, 999px);
  background: var(--theme-subtle);
  color: var(--theme-text);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition:
    background var(--dur-fast, 160ms) ease,
    border-color var(--dur-fast, 160ms) ease;
}

a.pin-beach-combine__chip:hover,
a.pin-beach-combine__chip:focus-visible {
  border-color: var(--theme-text);
  background: var(--theme-surface);
}

body.single-pin--praias .pin-icon-grid__title,
body.single-pin--praias .pin-listing-details__title,
body.single-pin--praias .pin-amenities__title {
  letter-spacing: -0.02em;
}

/* Beach guide — icon lists use .pin-icon-grid; prose sections stay custom */
.pin-beach-stories {
  display: flex;
  flex-direction: column;
}

.pin-beach-stories > .pin-beach-story + .pin-beach-story,
.pin-beach-stories > .pin-icon-grid-section + .pin-beach-story,
.pin-beach-stories > .pin-beach-story + .pin-icon-grid-section {
  border-block-start: 1px solid var(--theme-border);
}

.pin-beach-stories > :first-child {
  padding-block-start: 0;
}

.pin-beach-story:not(.pin-icon-grid-section) {
  display: grid;
  gap: var(--space-6, 1.5rem);
  padding-block: var(--space-8, 2rem);
}

.pin-beach-story__lead,
.pin-beach-story__prose {
  margin: 0;
  font-size: var(--text-base, 1rem);
  line-height: 1.55;
  color: var(--theme-text);
}

.pin-beach-story__lead {
  font-size: var(--text-lg, 1.125rem);
  line-height: 1.45;
}

.pin-beach-story--landmarks .pin-beach-story__lead {
  margin-block-end: 0;
}

.pin-beach-story--place .pin-beach-story__prose {
  margin-block-start: 0;
}

/* Piers — dual column when data splits */
.pin-beach-pier__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6, 1.5rem) var(--space-8, 2rem);
}

.pin-beach-pier__col {
  display: grid;
  gap: var(--space-3, 0.75rem);
  align-content: start;
}

.pin-beach-pier__col + .pin-beach-pier__col {
  padding-inline-start: var(--space-8, 2rem);
  border-inline-start: 1px solid var(--theme-border);
}

.pin-beach-pier__name {
  margin: 0;
  font-size: var(--text-base, 1rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--theme-text);
}

.pin-beach-pier__text {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.55;
  color: var(--theme-text);
}

.pin-beach-pier__single {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4, 1rem);
  align-items: start;
}

.pin-beach-pier__single .pin-beach-story__prose {
  margin: 0;
}

/* History — year figure + narrative */
.pin-beach-history__layout {
  display: grid;
  grid-template-columns: minmax(4.5rem, auto) 1fr;
  gap: var(--space-6, 1.5rem) var(--space-8, 2rem);
  align-items: start;
}

.pin-beach-history__year {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--theme-muted);
}

.pin-beach-history__layout .pin-beach-story__prose {
  margin: 0;
}

/* Best time — monochrome intensity chart */
.pin-beach-time__chart {
  margin-block-end: var(--space-2, 0.5rem);
}

.pin-beach-time__bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3, 0.75rem);
  align-items: end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin-beach-time__slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  text-align: center;
}

.pin-beach-time__bar {
  display: block;
  width: 100%;
  max-width: 2.75rem;
  height: calc(1.25rem + var(--bar-level, 0.5) * 3.5rem);
  border-radius: 2px;
  background: var(--theme-border-soft);
}

.pin-beach-time__slot.is-peak .pin-beach-time__bar {
  background: var(--theme-text);
}

.pin-beach-time__label {
  font-size: var(--text-xs, 0.75rem);
  font-weight: 500;
  line-height: 1.3;
  color: var(--theme-muted);
}

.pin-beach-time__slot.is-peak .pin-beach-time__label {
  font-weight: 600;
  color: var(--theme-text);
}

.pin-beach-time__peak {
  margin: var(--space-4, 1rem) 0 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.4;
  color: var(--theme-text);
}

.pin-beach-time__peak-label {
  font-weight: 600;
  color: var(--theme-muted);
}

.pin-beach-story--time .pin-beach-story__prose {
  margin-block-start: 0;
}

@media (max-width: 744px) {
  .pin-beach-pier__cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .pin-beach-pier__col + .pin-beach-pier__col {
    padding-inline-start: 0;
    padding-block-start: var(--space-6, 1.5rem);
    border-inline-start: 0;
    border-block-start: 1px solid var(--theme-border);
  }

  .pin-beach-history__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .pin-beach-history__year {
    font-size: 2.25rem;
  }
}

/* Listing details: same title rhythm as amenities (legacy class aliases kept for theme overrides) */
.pin-listing-details__title {
  margin: 0;
}

.pin-single__discovery {
  display: flex;
  flex-direction: column;
  gap: var(--space-10, 2.5rem);
  padding-block: var(--space-8, 2rem);
}

.pin-discovery__map {
  width: 100%;
  margin-block: var(--space-2, 0.5rem) var(--space-5, 1.25rem);
}

.pin-map-shell--discovery {
  width: 100%;
}

.pin-map--discovery {
  min-height: min(280px, 50vh);
  border: 1px solid var(--theme-border-soft);
  box-shadow: var(--theme-shadow);
}

.pin-discovery--regions {
  order: 1;
}

.pin-discovery--nearby {
  order: 2;
}

.pin-discovery--similar {
  order: 3;
}

.pin-discovery {
  display: grid;
  gap: var(--space-4, 1rem);
}

.pin-discovery__header {
  display: grid;
  gap: var(--space-2, 0.5rem);
}

.pin-discovery__title {
  margin: 0;
  font-size: var(--text-2xl, 1.5rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pin-discovery__lead {
  margin: 0;
  max-width: 42rem;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
  color: var(--theme-muted);
}

.pin-discovery__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin-discovery__chip-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  min-height: 2.5rem;
  padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
  border: 1px solid var(--theme-border-soft);
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-surface);
  color: var(--theme-text);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    border-color var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1)),
    box-shadow var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-discovery__chip-link:hover,
.pin-discovery__chip-link:focus-visible {
  background: var(--theme-subtle);
  border-color: var(--theme-border);
  box-shadow: var(--theme-shadow);
}

.pin-discovery__chip-icon,
.pin-discovery__chip-external {
  flex-shrink: 0;
  color: var(--theme-muted);
}

/* Discovery rows sit in the main column — 2-up grid, not horizontal scroll */
.pin-discovery .pin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 560px) {
  .pin-discovery .pin-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Structured custom fields (admin / archive fallback) */
.pin-structured-fields {
  margin-top: 0;
  padding-top: var(--space-8, 2rem);
  border-top: 1px solid var(--theme-border-soft);
}

.pin-structured-fields__header {
  margin-bottom: var(--space-4, 1rem);
}

.pin-structured-fields__header h2 {
  margin: 0;
  font-size: var(--text-2xl, 1.5rem);
  line-height: 1.2;
}

.pin-structured-fields__groups {
  display: grid;
  gap: var(--space-3, 0.75rem);
}

.pin-field-group {
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-md);
  background: var(--theme-surface);
  box-shadow: var(--theme-shadow);
}

.pin-field-group__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3, 0.75rem);
  padding: var(--space-4, 1rem);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.pin-field-group__summary::-webkit-details-marker {
  display: none;
}

.pin-field-group__summary::after {
  content: "+";
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 1.5rem;
  place-items: center;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  color: var(--theme-muted);
  line-height: 1;
}

.pin-field-group[open] .pin-field-group__summary::after {
  content: "-";
}

.pin-field-group__summary:focus-visible {
  outline: 2.5px solid var(--theme-accent);
  outline-offset: 3px;
}

.pin-field-group__count {
  margin-left: auto;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--theme-subtle);
  color: var(--theme-muted);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
}

.pin-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3, 0.75rem);
  padding: 0 var(--space-4, 1rem) var(--space-4, 1rem);
}

.pin-field {
  min-width: 0;
  padding: var(--space-4, 1rem);
  border: 1px solid var(--theme-border);
  border-radius: var(--radius-md);
  background: var(--theme-subtle);
}

.pin-field__label {
  margin: 0;
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.3;
}

.pin-field__description,
.pin-field__meta {
  margin: var(--space-2, 0.5rem) 0 0;
  color: var(--theme-muted);
  font-size: var(--text-xs, 0.75rem);
  line-height: 1.45;
}

.pin-field__value {
  margin-top: var(--space-2, 0.5rem);
  color: var(--theme-text);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.pin-field__value p,
.pin-field__meta {
  margin-bottom: 0;
}

.pin-field__unit {
  color: var(--theme-muted);
}

.pin-field__link {
  color: var(--theme-accent);
  font-weight: 700;
}

.pin-field__chips,
.pin-field__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin-field__chips li {
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: var(--theme-surface);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
}

.pin-field__list {
  display: grid;
  gap: var(--space-1, 0.25rem);
  padding-left: 1rem;
  list-style: disc;
}

.pin-field__table {
  display: grid;
  gap: var(--space-2, 0.5rem);
  margin: 0;
}

.pin-field__table div {
  display: grid;
  grid-template-columns: minmax(5.5rem, 0.8fr) minmax(0, 1fr);
  gap: var(--space-2, 0.5rem);
  align-items: baseline;
}

.pin-field__table dt {
  color: var(--theme-muted);
  font-size: var(--text-xs, 0.75rem);
  font-weight: 700;
}

.pin-field__table dd {
  margin: 0;
}

.pin-field__pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: var(--text-xs, 0.75rem);
  font-weight: 800;
}

.pin-field__pill.is-active {
  border: 1px solid var(--theme-accent);
  background: var(--theme-surface);
  color: var(--theme-accent);
}

.pin-field__pill.is-inactive {
  background: var(--theme-subtle);
  color: var(--theme-muted);
}

.pin-field__meter {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--theme-subtle);
}

.pin-field__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--theme-accent);
}


/* ── Map popup (Airbnb vertical card — single surface) ─────── */

.pin-map-popup {
  display: grid;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--font-body);
}

.pin-map-popup__media {
  position: relative;
  overflow: hidden;
  background: var(--theme-subtle);
}

.pin-map-popup__track {
  position: relative;
  aspect-ratio: 4 / 3;
}

.pin-map-popup__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast, 160ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
}

.pin-map-popup__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.pin-map-popup__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pin-map-popup__chrome {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  pointer-events: none;
}

.pin-map-popup__save,
.pin-map-popup__close,
.pin-map-popup__nav {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill, 9999px);
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.16);
  cursor: pointer;
  pointer-events: auto;
  transition: transform var(--dur-fast) var(--ease-expo-out);
}

.pin-map-popup__save:hover,
.pin-map-popup__close:hover,
.pin-map-popup__nav:hover,
.pin-map-popup__save:focus-visible,
.pin-map-popup__close:focus-visible,
.pin-map-popup__nav:focus-visible {
  transform: scale(1.05);
  outline: none;
}

.pin-map-popup__save svg path {
  fill: none;
  stroke: currentColor;
}

.pin-map-popup__save[aria-pressed="true"] {
  color: var(--theme-accent);
}

.pin-map-popup__save[aria-pressed="true"] svg path {
  fill: var(--theme-accent);
  stroke: var(--theme-accent);
}

.pin-map-popup__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  translate: 0 -50%;
  pointer-events: none;
}

.pin-map-popup__nav--prev {
  left: 0.625rem;
}

.pin-map-popup__nav--next {
  right: 0.625rem;
}

.pin-map-popup__dots {
  position: absolute;
  right: 0;
  bottom: 0.625rem;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  pointer-events: none;
}

.pin-map-popup__dot {
  width: 0.375rem;
  height: 0.375rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill, 9999px);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  pointer-events: auto;
}

.pin-map-popup__dot.is-active {
  background: var(--theme-surface);
}

.pin-map-popup__body {
  display: grid;
  gap: 0;
  padding: 0.75rem;
}

.pin-map-popup__body-link {
  display: grid;
  gap: 0;
  color: inherit;
  text-decoration: none;
}

.pin-map-popup__body-link:not(.pin-map-popup__body-link--static):hover .pin-map-popup__headline,
.pin-map-popup__body-link:not(.pin-map-popup__body-link--static):focus-visible .pin-map-popup__headline {
  text-decoration: underline;
}

.pin-map-popup__body-link:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.pin-map-popup__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

.pin-map-popup__headline {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.125rem;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-map-popup__rating {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1rem;
  white-space: nowrap;
  color: var(--theme-text);
}

.pin-map-popup__rating-icon {
  flex: 0 0 auto;
}

.pin-map-popup__review-count {
  color: var(--theme-muted);
}

.pin-map-popup__meta {
  margin: 0;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.125rem;
  color: var(--theme-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pin-map-popup__pricing {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.pin-map-popup__price-total {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.125rem;
  color: var(--theme-text);
}

.pin-map-popup__price-total strong {
  font-weight: 600;
}

.pin-map-popup__price-total span {
  font-weight: 400;
}

.pin-map-popup__price-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  background: var(--theme-subtle);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1rem;
  color: var(--theme-muted);
}

.pin-map-popup--no-media .pin-map-popup__body {
  padding: 0.75rem;
}

.pin-explorer .leaflet-popup-pane {
  z-index: 700;
}

/* One card surface on the Leaflet shell — not on .pin-map-popup */
.pin-map-popup-leaflet.leaflet-popup {
  margin-bottom: 0;
}

.pin-map-popup-leaflet .leaflet-popup-content-wrapper {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background: var(--theme-surface);
  color: var(--theme-text);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 6px 16px rgba(0, 0, 0, 0.12);
  pointer-events: auto;
}

.pin-map-popup-leaflet .leaflet-popup-content {
  width: 16.75rem !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: inherit;
  font-size: inherit;
}

.pin-map-popup-leaflet .leaflet-popup-content p {
  margin: 0;
}

.pin-map-popup-leaflet .leaflet-popup-close-button {
  display: none !important;
}

.pin-map-popup-leaflet .leaflet-popup-tip-container,
.pin-map-popup-leaflet .leaflet-popup-tip {
  display: none;
}


/* ── Pagination ───────────────────────────────────────────── */

.pin-pagination {
  min-height: 2.5rem;
  margin-top: var(--space-6, 1.5rem);
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
  text-align: center;
}

.pin-pagination.is-hidden {
  min-height: 0;
  margin-top: 0;
}

/* Explorer grid — Airbnb /s/homes: 2 cols default; 3 when list panel is wide; 1 on narrow phones */
.pin-explorer .pin-grid,
.pin-explorer .pin-grid--explorer {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-10, 2.5rem) var(--gap-grid);
}

@container pin-explorer-list (min-width: 62.5rem) {
  .pin-explorer .pin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pin-card.is-map-active .pin-card__media {
  outline: 2.5px solid var(--theme-text);
  outline-offset: 3px;
  border-radius: var(--theme-radius);
}


/* ── Responsive ───────────────────────────────────────────── */

@media (min-width: 901px) {
  .pin-filters--has-advanced .pin-filters__dialog-trigger {
    display: flex;
  }

  .pin-filters__modal:not([hidden]) {
    align-items: center;
    justify-items: center;
    padding: var(--space-8);
  }

  .pin-filters__modal-sheet {
    width: min(100%, 42rem);
    max-height: min(85dvh, 40rem);
    border-radius: var(--radius-xl);
    translate: 0 1rem;
    opacity: 0;
    transition:
      translate var(--dur-base) var(--ease-expo-out),
      opacity var(--dur-base) var(--ease-expo-out);
  }

  .pin-filters__modal.is-open .pin-filters__modal-sheet {
    translate: 0 0;
    opacity: 1;
  }

  .pin-filters__modal-handle {
    display: none;
  }

  .pin-explorer.is-map-visible {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "toolbar toolbar"
      "map map";
  }

  .pin-explorer.is-map-visible .pin-explorer__list-panel {
    display: none;
  }

  .pin-explorer.is-map-visible .pin-explorer__map-panel {
    height: calc(100vh - var(--theme-sticky-top) - var(--space-6));
    min-height: 32rem;
  }

  .pin-explorer.is-map-fullscreen .pin-explorer__map-panel {
    position: fixed;
    inset: 0;
    z-index: 100;
    height: 100dvh;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .pin-explorer.is-map-fullscreen .pin-explorer__toolbar,
  .pin-explorer.is-map-fullscreen .pin-explorer__list-panel,
  .pin-explorer.is-map-fullscreen .pin-explorer__mobile-actions {
    visibility: hidden;
    pointer-events: none;
  }

  .pin-explorer.is-map-fullscreen .pin-map__chrome {
    top: calc(var(--space-3) + env(safe-area-inset-top, 0px));
    left: calc(var(--space-3) + env(safe-area-inset-left, 0px));
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .pin-explorer {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 1fr);
  }
}

@media (max-width: 900px) {
  .pin-explorer {
    display: block;
    min-height: calc(100dvh - 5rem);
    padding-bottom: 7.5rem;
  }

  .pin-explorer__toolbar {
    position: sticky;
    top: 0;
    z-index: 8;
  }

  .pin-explorer__map-panel {
    position: sticky;
    top: 7rem;
    display: block;
    height: calc(100dvh - 7rem);
    min-height: 28rem;
    margin-inline: calc(var(--space-page-inline) * -1);
    border-radius: 0;
  }

  .pin-explorer__list-panel {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    height: min(72dvh, 42rem);
    margin: 0;
    padding: var(--space-4, 1rem) var(--space-page-inline) var(--space-8, 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(var(--pin-sheet-y, calc(100% - 7.25rem)));
    transition: transform var(--dur-base, 260ms) var(--ease-expo-out, cubic-bezier(0.16, 1, 0.3, 1));
    border-radius: 1.5rem 1.5rem 0 0;
    background: var(--theme-surface);
    box-shadow: var(--theme-shadow);
    touch-action: pan-y;
  }

  .pin-explorer.is-sheet-expanded .pin-explorer__list-panel {
    transform: translateY(var(--pin-sheet-y, 0));
  }

  .pin-explorer__list-panel.is-dragging {
    transition: none;
  }

  .pin-explorer__list-panel::before {
    content: none;
  }

  .pin-explorer__summary {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    justify-content: center;
    justify-items: center;
    gap: var(--space-2, 0.5rem);
    padding-bottom: var(--space-2, 0.5rem);
    background: var(--theme-surface);
    text-align: center;
  }

  .pin-explorer__sheet-handle {
    display: block;
    width: 4rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-pill, 9999px);
    background: transparent;
    cursor: grab;
    touch-action: none;
  }

  .pin-explorer__sheet-handle::before {
    content: "";
    display: block;
    width: 2.75rem;
    height: 0.3rem;
    margin: 0.5rem auto 0;
    border-radius: var(--radius-pill, 9999px);
    background: var(--theme-border-strong);
  }

  .pin-explorer__sheet-handle:active {
    cursor: grabbing;
  }

  .pin-explorer__mobile-actions {
    position: fixed;
    right: var(--space-4, 1rem);
    bottom: 8.25rem;
    z-index: 30;
    display: block;
  }

  .pin-explorer.is-sheet-expanded .pin-explorer__mobile-actions {
    display: none;
  }

  .pin-filters,
  .pin-map--static,
  .pin-single__layout,
  .pin-field-grid {
    grid-template-columns: 1fr;
  }

  .pin-single__layout {
    gap: var(--space-6);
  }

  .pin-single__aside {
    position: static;
  }

  .pin-single__main {
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
  }

  .pin-actions--sticky {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    margin: 0;
    padding: var(--space-4) var(--space-page-inline);
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    border-inline: 0;
    border-bottom: 0;
    box-shadow: var(--theme-shadow);
  }

  .pin-actions--sticky .pin-actions__back {
    display: none;
  }

  .pin-map__legend {
    border-left: none;
    border-top: 1px solid var(--theme-border);
  }

  .pin-filters--explorer {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .pin-filters__mobile-trigger {
    display: flex;
  }

  .pin-filters__desktop {
    display: none;
  }

  .pin-explorer__search-row {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .pin-explorer .pin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pin-filters {
    grid-template-columns: 1fr;
  }

  .pin-explorer__map-panel {
    height: calc(100dvh - 7rem);
    min-height: 28rem;
  }

  .pin-filters--explorer .pin-filters__submit {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
  }

  .pin-single__titlebar {
    flex-direction: column;
    align-items: stretch;
  }

  .pin-single__toolbar {
    justify-content: flex-start;
  }

  .pin-single__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pin-field__table div {
    grid-template-columns: 1fr;
    gap: 0;
  }
}


/* ── Reduced motion ───────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .pin-card,
  .pin-card__media img,
  .pin-map__static-marker,
  .pin-grid,
  .pin-filters__modal-sheet,
  .pin-filters__modal-backdrop,
  .pin-explorer__list-panel {
    transition-duration: 0.01ms !important;
  }

  .pin-card:hover,
  .pin-map__static-marker:hover,
  .pin-map__static-marker:focus-visible {
    transform: none !important;
  }

  .pin-filters__modal-backdrop,
  .pin-filters__modal-sheet {
    transition: none;
  }
}


/* ── Pin weather forecast (Open-Meteo + uPlot) ───────────── */

.pin-weather {
  display: grid;
  gap: var(--space-3, 0.75rem);
  min-width: 0;
  max-width: 100%;
  padding-block: var(--space-6, 1.5rem);
}

.pin-weather--imoveis,
.pin-weather--praias {
  padding-block: var(--space-5, 1.25rem);
}

.pin-weather__header {
  display: grid;
  gap: var(--space-1, 0.25rem);
}

.pin-weather__title {
  margin: 0;
}

.pin-weather__meta {
  margin: 0;
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.35;
}

.pin-weather__summary,
.pin-weather__strips {
  display: grid;
  gap: var(--space-4, 1rem);
}

.pin-weather__expand {
  display: grid;
  gap: var(--space-4, 1rem);
  min-width: 0;
}

.pin-weather__details {
  display: grid;
  gap: var(--space-4, 1rem);
  min-width: 0;
}

.pin-weather__details[hidden] {
  display: none;
}

.pin-tides--nested,
.pin-wind--nested {
  padding-block: 0;
}

.pin-weather__details .pin-tides--nested,
.pin-weather__details .pin-wind--nested {
  padding-block: var(--space-5, 1.25rem);
}

.pin-weather__details .pin-tides--nested:first-child,
.pin-weather__details .pin-wind--nested:first-child {
  padding-block-start: 0;
}

.pin-weather__block {
  display: grid;
  gap: var(--space-2, 0.5rem);
}

.pin-weather__subtitle {
  margin: 0;
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  line-height: 1.3;
}

.pin-weather__grid {
  display: grid;
  gap: var(--space-2, 0.5rem);
}

.pin-weather__grid--today {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pin-weather__grid--days {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pin-weather__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--wx-gap, 0.375rem);
  min-width: 0;
  padding: var(--wx-pad-y, 0.5rem) var(--wx-pad-x, 0.375rem);
  text-align: center;
}

.pin-weather__card--lg {
  --wx-gap: 0.5rem;
  --wx-pad-y: 0.625rem;
  --wx-label: 0.8125rem;
  --wx-temp: 1.125rem;
  --wx-emoji: 2rem;
}

.pin-weather__card--md {
  --wx-label: 0.75rem;
  --wx-temp: 1rem;
  --wx-emoji: 1.75rem;
}

.pin-weather__card-label {
  max-width: 100%;
  overflow: hidden;
  color: var(--theme-muted);
  font-size: var(--wx-label, 0.75rem);
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pin-weather__card .pin-weather__card-glyph {
  line-height: 1;
  font-size: var(--wx-emoji, 1.75rem);
}

.pin-weather__card-temp {
  color: var(--theme-text);
  font-size: var(--wx-temp, 1rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
  .pin-weather__grid--today {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pin-weather__grid--days {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 744px) {
  .pin-weather__grid--today,
  .pin-weather__grid--days {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .pin-weather__grid--today,
  .pin-weather__grid--days {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pin-weather__chart-wrap {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.pin-weather__series-data {
  display: none;
}

.pin-weather__emoji-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pin-weather__emoji-marker {
  position: absolute;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.25rem;
  line-height: 1;
  transform: translate(-50%, calc(-100% - 6px));
  font-variant-emoji: emoji;
}

.pin-weather__chart {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 200px;
  overflow: hidden;
}

.pin-weather__chart.uplot {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  font-family: var(--font-body, system-ui, sans-serif);
}

.pin-weather__chart .u-wrap,
.pin-weather__chart canvas {
  max-width: 100%;
}

.pin-weather__chart .u-legend {
  display: none;
}

.pin-weather__credit {
  margin: 0;
  color: var(--theme-muted);
  font-size: var(--text-xs, 0.75rem);
  line-height: 1.35;
}

.pin-weather__credit-note {
  color: var(--theme-muted-soft, var(--theme-muted));
}

.pin-weather__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}


/* ── Pin tide chart (Open-Meteo Marine + uPlot) ─────────── */

.pin-tides {
  display: grid;
  gap: var(--space-3, 0.75rem);
  min-width: 0;
  max-width: 100%;
  padding-block: var(--space-6, 1.5rem);
}

.pin-tides--praias {
  padding-block: var(--space-5, 1.25rem);
}

.pin-tides__header {
  display: grid;
  gap: var(--space-1, 0.25rem);
}

.pin-tides__title {
  margin: 0;
}

.pin-tides__meta {
  margin: 0;
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.35;
}

.pin-tides__chart-wrap {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.pin-tides__series-data {
  display: none;
}

.pin-tides__chart {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 200px;
  overflow: hidden;
}

/* uPlot ships width:min-content — clamp to the main column */
.pin-tides__chart.uplot {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  font-family: var(--font-body, system-ui, sans-serif);
}

.pin-tides__chart .u-wrap,
.pin-tides__chart canvas {
  max-width: 100%;
}

.pin-tides__chart .u-legend {
  display: none;
}

.pin-tides__credit {
  margin: 0;
  color: var(--theme-muted);
  font-size: var(--text-xs, 0.75rem);
  line-height: 1.35;
}

.pin-tides__credit-note {
  color: var(--theme-muted-soft, var(--theme-muted));
}

.pin-tides__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}


/* ── Pin wind chart (Open-Meteo + uPlot) ─────────────────── */

.pin-wind {
  display: grid;
  gap: var(--space-3, 0.75rem);
  min-width: 0;
  max-width: 100%;
  padding-block: var(--space-6, 1.5rem);
}

.pin-wind--praias {
  padding-block: var(--space-5, 1.25rem);
}

.pin-wind__header {
  display: grid;
  gap: var(--space-1, 0.25rem);
}

.pin-wind__title {
  margin: 0;
}

.pin-wind__meta {
  margin: 0;
  color: var(--theme-muted);
  font-size: var(--text-sm, 0.875rem);
  line-height: 1.35;
}

.pin-wind__chart-wrap {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.pin-wind__series-data {
  display: none;
}

.pin-wind__dir-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.pin-wind__dir-marker {
  position: absolute;
  color: var(--theme-text);
  font-size: 1rem;
  line-height: 1;
  transform-origin: center center;
}

.pin-wind__chart {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 200px;
  overflow: hidden;
}

.pin-wind__chart.uplot {
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  font-family: var(--font-body, system-ui, sans-serif);
}

.pin-wind__chart .u-wrap,
.pin-wind__chart canvas {
  max-width: 100%;
}

.pin-wind__chart .u-legend {
  display: none;
}

.pin-wind__credit {
  margin: 0;
  color: var(--theme-muted);
  font-size: var(--text-xs, 0.75rem);
  line-height: 1.35;
}

.pin-wind__credit-note {
  color: var(--theme-muted-soft, var(--theme-muted));
}

.pin-wind__credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.12em;
}

/* ── Empty states (explorer + AJAX) ───────────────────────── */

.pin-empty {
  width: 100%;
}

.pin-explorer__list-panel .pin-empty,
.pin-explorer__list-panel .hub360-empty {
  padding: var(--space-12) var(--space-6);
}

/* ── Real estate card metrics ─────────────────────────────── */

.pin-card__tx-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--theme-subtle);
  color: var(--theme-text);
  font-size: var(--text-badge);
  font-weight: 600;
}

.pin-card__specs {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--theme-muted);
  line-height: 1.43;
}

/* ── Source attribution ─────────────────────────────────────── */

.pin-source-attribution--subtle {
  margin: 0;
  padding-block: var(--space-6);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--theme-muted);
}

.pin-source-attribution--subtle .pin-source-attribution__credit {
  color: var(--theme-muted);
}

.pin-source-attribution--subtle .pin-source-attribution__sep {
  margin-inline: 0.35em;
  color: var(--theme-border);
}

.pin-source-attribution--subtle .pin-source-attribution__meta {
  color: var(--theme-muted);
}

.pin-source-attribution--empty {
  margin: 0;
  padding: var(--space-4);
  border: 1px dashed var(--theme-border-soft);
  border-radius: var(--theme-radius);
  background: var(--theme-subtle);
}

.pin-badge--partner {
  background: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-subtle));
  color: var(--theme-text);
}

.pin-live-data-unavailable {
  border: 1px dashed var(--theme-border-soft);
  border-radius: var(--theme-radius);
  background: var(--theme-subtle);
}
