:root {
  color-scheme: light;
  --ink: #132826;
  --muted: #60736f;
  --paper: #f8f5ee;
  --surface: #ffffff;
  --line: rgba(19, 40, 38, 0.12);
  --primary: #0d6f63;
  --primary-dark: #084b44;
  --coral: #d65f45;
  --gold: #dcae4f;
  --blue: #2878a8;
  --violet: #7259a8;
  --shadow: 0 20px 60px rgba(15, 43, 40, 0.16);
}

/* Critical Leaflet layout styles in case the CDN stylesheet is blocked. */
.leaflet-container {
  overflow: hidden;
  font-family: inherit;
  background: #dbe9e2;
  outline: 0;
  touch-action: pan-x pan-y;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
  user-select: none;
  -webkit-user-drag: none;
}

.leaflet-tile {
  visibility: hidden;
  border: 0;
}

.leaflet-tile-loaded {
  visibility: inherit;
}

.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-shadow-pane,
.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane {
  z-index: auto;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

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

.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-control {
  float: left;
  clear: both;
}

.leaflet-right .leaflet-control {
  float: right;
}

.leaflet-top .leaflet-control {
  margin-top: 10px;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 10px;
}

.leaflet-left .leaflet-control {
  margin-left: 10px;
}

.leaflet-right .leaflet-control {
  margin-right: 10px;
}

.leaflet-control-zoom a {
  display: block;
  width: 32px;
  height: 32px;
  border-bottom: 1px solid #ccc;
  background: #fff;
  color: #132826;
  font-size: 22px;
  line-height: 30px;
  text-align: center;
  text-decoration: none;
}

.leaflet-control-zoom a:first-child {
  border-radius: 4px 4px 0 0;
}

.leaflet-control-zoom a:last-child {
  border-bottom: 0;
  border-radius: 0 0 4px 4px;
}

.leaflet-control-attribution {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 11px;
}

.leaflet-popup {
  position: absolute;
  margin-bottom: 20px;
  text-align: center;
}

.leaflet-popup-content-wrapper {
  padding: 1px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.leaflet-popup-content {
  margin: 12px 14px;
  min-width: 170px;
  text-align: left;
}

.leaflet-popup-tip-container {
  position: absolute;
  left: 50%;
  width: 40px;
  height: 20px;
  margin-left: -20px;
  overflow: hidden;
  pointer-events: none;
}

.leaflet-popup-tip {
  width: 16px;
  height: 16px;
  margin: -8px auto 0;
  background: #fff;
  transform: rotate(45deg);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.leaflet-popup-close-button {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 4px 0 0;
  width: 22px;
  height: 22px;
  color: #60736f;
  text-align: center;
  text-decoration: none;
  font: 18px/18px Tahoma, Verdana, sans-serif;
}

.leaflet-interactive {
  cursor: pointer;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(13, 111, 99, 0.1), transparent 420px),
    var(--paper);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 10px max(22px, env(safe-area-inset-bottom));
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0;
  text-transform: uppercase;
}

h2,
p {
  margin-top: 0;
}

.map-panel {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  height: min(58vh, 620px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #dbe9e2;
  box-shadow: var(--shadow);
}

.map {
  position: absolute;
  inset: 0;
}

.map-toolbar {
  position: absolute;
  z-index: 500;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
}

.filter-chip,
.sort-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.filter-chip {
  padding: 0 14px;
}

.filter-chip.is-active,
.sort-button[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.content-panel {
  padding-top: 14px;
}

.section-heading {
  display: flex;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h2,
.notes h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.heading-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
}

.countdown-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(214, 95, 69, 0.35);
  border-radius: 999px;
  background: rgba(214, 95, 69, 0.12);
  color: #873323;
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.sort-button {
  flex: 0 0 auto;
  padding: 0 15px;
}

.places-list {
  display: grid;
  gap: 10px;
}

.place-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 43, 40, 0.08);
}

.place-card.is-hidden {
  display: none;
}

.place-card.is-active {
  border-color: rgba(13, 111, 99, 0.62);
  box-shadow: 0 16px 36px rgba(13, 111, 99, 0.16);
}

.place-card__main {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  width: 100%;
  padding: 15px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.place-card__pin {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 900;
}

.place-card__body,
.place-card__topline {
  min-width: 0;
}

.place-card__body,
.place-card__name,
.place-card__meta,
.place-card__topline {
  display: block;
}

.place-card__topline {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.place-card__type,
.place-card__distance {
  min-width: 0;
}

.place-card__distance {
  flex: 0 0 auto;
  color: var(--primary-dark);
}

.place-card__name {
  margin-bottom: 5px;
  font-size: 1.03rem;
  line-height: 1.2;
}

.place-card__meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.place-card__details {
  display: none;
  padding: 0 15px 15px 65px;
}

.place-card.is-active .place-card__details {
  display: block;
}

.place-card__details p {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.place-card__details p strong {
  color: var(--ink);
}

.place-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.action-link,
.vote-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 900;
  text-decoration: none;
}

.vote-button {
  gap: 7px;
  cursor: pointer;
}

.vote-button__icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(13, 111, 99, 0.12);
  color: var(--primary-dark);
  line-height: 1;
}

.vote-button[aria-pressed="true"] {
  border-color: var(--gold);
  background: rgba(220, 174, 79, 0.18);
}

.vote-button[aria-pressed="true"] .vote-button__icon {
  background: var(--gold);
  color: #2f250e;
}

.action-link--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.notes {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.notes p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: var(--ink);
}

.map-popup h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.map-popup p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.marker-dot {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(19, 40, 38, 0.28);
  font-size: 0.76rem;
  font-weight: 900;
}

.marker-dot--hotel {
  background: var(--coral);
}

.marker-dot--beach {
  background: var(--blue);
}

.marker-dot--nature {
  background: var(--primary);
}

.marker-dot--city {
  background: var(--coral);
}

.marker-dot--attraction {
  background: var(--violet);
}

.marker-dot--service {
  background: var(--gold);
  color: #2f250e;
}

@media (min-width: 860px) {
  .app-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
    gap: 22px;
    align-items: start;
    padding-top: 16px;
  }

  .map-panel {
    position: sticky;
    top: 22px;
    height: calc(100vh - 44px);
    min-height: 680px;
  }

  .content-panel {
    padding-top: 0;
  }
}

@media (max-width: 520px) {
  .section-heading {
    align-items: start;
  }

  .heading-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .countdown-link,
  .sort-button {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 0.82rem;
  }

  .map-panel {
    height: 58vh;
    min-height: 360px;
  }

  .leaflet-control-zoom {
    display: none;
  }

  .place-card__main {
    grid-template-columns: 34px 1fr;
    padding: 14px 12px;
  }

  .place-card__pin {
    width: 34px;
    height: 34px;
  }

  .place-card__details {
    padding-left: 58px;
    padding-right: 12px;
  }
}
