:root {
  --ink: #16302d;
  --muted: #61716d;
  --paper: #f7f4ec;
  --paper-deep: #eee9dc;
  --white: #fffdf8;
  --line: rgba(22, 48, 45, 0.13);
  --accent: #ee6848;
  --accent-dark: #cb4f34;
  --green: #1d7066;
  --shadow: 0 18px 55px rgba(35, 45, 42, 0.16);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--paper);
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
#map:focus-visible {
  outline: 3px solid rgba(238, 104, 72, 0.45);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 10000;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: 100%;
  height: 100dvh;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.source-icon svg,
.table-metric-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.map-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #dfe7e3;
}

#map {
  width: 100%;
  height: 100%;
  background: #dfe7e3;
}

.place-connector {
  position: absolute;
  z-index: 590;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.place-connector.is-visible {
  opacity: 1;
}

.place-connector path {
  fill: none;
  stroke-linecap: round;
}

.place-connector-casing {
  stroke: rgba(18, 35, 32, 0.45);
  stroke-width: 5;
}

.place-connector-line {
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2;
}

.place-connector-dot {
  fill: white;
  stroke: rgba(18, 35, 32, 0.55);
  stroke-width: 2;
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-control-attribution {
  padding: 3px 6px !important;
  color: #71807b;
  background: rgba(255, 253, 248, 0.78) !important;
  font-size: 8px !important;
  backdrop-filter: blur(8px);
}

.leaflet-control-attribution a {
  color: #4d6962;
}

.leaflet-bar {
  overflow: hidden;
  border: 0 !important;
  border-radius: 11px !important;
  box-shadow: 0 8px 24px rgba(29, 46, 42, 0.15) !important;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  width: 34px !important;
  height: 34px !important;
  color: var(--ink) !important;
  background: rgba(255, 253, 248, 0.95) !important;
  border-color: var(--line) !important;
  line-height: 32px !important;
}

.place-marker {
  background: transparent;
  border: 0;
}

.marker-bubble {
  position: relative;
  display: flex;
  align-items: center;
  width: max-content;
  max-width: 124px;
  height: 30px;
  padding: 4px 8px 4px 5px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.96);
  border: 1px solid rgba(22, 48, 45, 0.17);
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(25, 47, 43, 0.18);
  transform: translate(1px, 5px);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.marker-bubble::before {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 12px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-right: 1px solid rgba(22, 48, 45, 0.17);
  border-bottom: 1px solid rgba(22, 48, 45, 0.17);
  transform: rotate(45deg);
}

.marker-bubble::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 14px;
  width: 7px;
  height: 4px;
  background: rgba(23, 48, 45, 0.2);
  border-radius: 50%;
  filter: blur(2px);
}

.place-marker:hover .marker-bubble,
.place-marker:focus .marker-bubble {
  z-index: 2;
  box-shadow: 0 7px 19px rgba(25, 47, 43, 0.25);
  transform: translate(1px, 5px);
}

.marker-value {
  position: relative;
  z-index: 1;
  display: grid;
  flex: none;
  place-items: center;
  min-width: 34px;
  height: 20px;
  padding: 0 5px;
  color: white;
  background: var(--marker-color);
  border-radius: 6px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.marker-name {
  position: relative;
  z-index: 1;
  overflow: hidden;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marker-bubble.is-pinned {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(238, 104, 72, 0.22), 0 7px 19px rgba(25, 47, 43, 0.2);
}

.map-pane {
  position: absolute;
  z-index: 650;
  top: 17px;
  left: 18px;
  width: min(220px, calc(100% - 36px));
  max-height: calc(100% - 34px);
  overflow: hidden;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(22, 48, 45, 0.12);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: width 200ms ease;
  backdrop-filter: blur(16px);
}

.map-pane.has-place,
.map-pane.has-shortlist {
  width: min(318px, calc(100% - 36px));
}

.layer-picker {
  padding: 9px 12px 7px;
}

.metric-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.layer-picker-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.layer-select-wrap {
  position: relative;
  min-width: 0;
  flex: 1;
}

.layer-select-wrap select {
  width: 100%;
  min-height: 25px;
  padding: 0 25px 0 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 5px;
  appearance: none;
  cursor: pointer;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
}

.layer-select-wrap svg {
  position: absolute;
  top: 50%;
  right: 2px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  pointer-events: none;
  transform: translateY(-50%);
}

.layer-picker-row > span {
  flex: none;
  color: var(--muted);
  font-size: 9px;
}

.map-legend {
  padding: 7px 12px;
  border-top: 1px solid var(--line);
}

.legend-heading,
.legend-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legend-heading {
  margin-bottom: 4px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legend-heading button {
  padding: 0;
  color: var(--green);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.legend-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.legend-scale span {
  height: 5px;
  background: var(--legend-color);
}

.legend-scale span:first-child {
  border-radius: 99px 0 0 99px;
}

.legend-scale span:last-child {
  border-radius: 0 99px 99px 0;
}

.legend-values {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.detail-card {
  position: relative;
  display: none;
  border-top: 1px solid var(--line);
}

.detail-card.is-open {
  display: block;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.detail-location {
  padding: 10px 12px 7px;
}

.detail-location span {
  color: var(--accent-dark);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-location h2 {
  margin: 3px 34px 0 0;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
}

.detail-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  margin: 0 8px;
  padding: 9px 10px;
  color: var(--detail-ink, white);
  background: var(--detail-color);
  border-radius: 11px;
}

.detail-hero span,
.detail-hero small {
  font-size: 8px;
  font-weight: 700;
}

.detail-hero strong {
  grid-row: 1 / 3;
  grid-column: 2;
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.detail-hero small {
  margin-top: 3px;
  opacity: 0.76;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 7px 12px 5px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 42px;
  padding: 6px;
  color: var(--metric-ink, var(--ink));
  background: var(--metric-color, var(--white));
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: filter 140ms ease, box-shadow 140ms ease;
}

.detail-metric:hover {
  filter: brightness(0.94);
}

.detail-metric:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.detail-metric.is-active {
  box-shadow: inset 4px 0 var(--metric-ink, var(--ink));
}

.detail-metric span {
  color: inherit;
  opacity: 0.72;
  font-size: 7.5px;
  font-weight: 700;
}

.detail-metric strong {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.activity-summary {
  margin: 7px 12px 3px;
}

.activity-summary > span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.activity-tags {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  margin-top: 5px;
}

.activity-tags strong {
  display: grid;
  min-height: 18px;
  padding: 3px 2px;
  place-items: center;
  color: var(--green);
  background: #e5ece5;
  border-radius: 5px;
  font-size: 7px;
  font-weight: 750;
}

.food-summary {
  margin: 7px 12px 3px;
}

.weather-summary {
  margin: 7px 12px 3px;
}

.seasonality-summary {
  margin: 7px 12px 3px;
}

.heritage-summary {
  margin: 7px 12px 3px;
}

.settling-summary {
  margin: 7px 12px 3px;
}

.disaster-summary {
  margin: 7px 12px 3px;
}

.money-summary {
  margin: 7px 12px 3px;
}

.stay-summary {
  margin: 7px 12px 3px;
}

.culture-summary {
  margin: 7px 12px 3px;
}

.culture-breakdown {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.culture-breakdown span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 5px 3px;
  color: var(--culture-ink);
  background: var(--culture-color);
  font-size: 7.5px;
  font-weight: 700;
}

.culture-breakdown strong {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.culture-breakdown small {
  opacity: 0.72;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.connectivity-summary {
  margin: 7px 12px 3px;
}

.connectivity-breakdown,
.weather-breakdown,
.seasonality-breakdown,
.heritage-breakdown,
.settling-breakdown,
.disaster-breakdown,
.money-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.weather-breakdown {
  grid-template-columns: repeat(4, 1fr);
}

.seasonality-breakdown {
  grid-template-columns: repeat(4, 1fr);
}

.heritage-breakdown {
  grid-template-columns: repeat(2, 1fr);
}

.settling-breakdown {
  grid-template-columns: repeat(3, 1fr);
}

.disaster-breakdown {
  grid-template-columns: repeat(3, 1fr);
}

.money-breakdown {
  grid-template-columns: repeat(4, 1fr);
}

.stay-breakdown {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.connectivity-breakdown span,
.weather-breakdown span,
.seasonality-breakdown span,
.heritage-breakdown span,
.settling-breakdown span,
.disaster-breakdown span,
.money-breakdown span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 6px 5px;
  color: var(--muted);
  background: var(--white);
  font-size: 8px;
  line-height: 1.2;
}

.stay-breakdown span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 6px 5px;
  color: var(--muted);
  background: var(--white);
  font-size: 8px;
  line-height: 1.2;
}

.connectivity-breakdown strong,
.weather-breakdown strong,
.seasonality-breakdown strong,
.heritage-breakdown strong,
.disaster-breakdown strong,
.money-breakdown strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stay-breakdown strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
}

.connectivity-airlines {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.connectivity-airlines strong {
  padding: 4px 6px;
  color: #355b73;
  background: #e2ebef;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 750;
}

.food-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.food-breakdown span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 6px 5px;
  color: var(--muted);
  background: var(--white);
  font-size: 8px;
  line-height: 1.2;
}

.food-breakdown strong {
  color: var(--ink);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.food-tags {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 4px;
}

.food-tags strong {
  display: grid;
  min-height: 18px;
  padding: 3px;
  place-items: center;
  color: #7a5621;
  background: #f1e7cb;
  border-radius: 5px;
  font-size: 7.5px;
  font-weight: 750;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 9px;
}

.detail-pin {
  height: 32px;
  color: white;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.detail-pin.is-pinned {
  color: var(--accent-dark);
  background: rgba(238, 104, 72, 0.1);
  border-color: rgba(238, 104, 72, 0.3);
}

.detail-actions a {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
}

.compare-tray {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 10px;
  padding: 9px 10px 10px;
  background: rgba(22, 48, 45, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.compare-tray.has-places {
  display: grid;
}

.compare-heading {
  color: white;
}

.compare-heading span,
.compare-heading strong {
  display: block;
}

.compare-heading span {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compare-heading strong {
  margin-top: 3px;
  color: #a5b7b2;
  font-size: 10px;
}

.compare-places {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.compare-places::-webkit-scrollbar {
  display: none;
}

.compare-empty {
  color: #a5b7b2;
  font-size: 11px;
}

.compare-chip {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  max-width: 112px;
  height: 30px;
  padding: 0 7px 0 10px;
  color: var(--ink);
  background: #f2efe7;
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.compare-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-chip svg {
  flex: none;
  width: 15px;
  height: 15px;
  padding: 2px;
  fill: none;
  stroke: #71807b;
  stroke-linecap: round;
  stroke-width: 2;
}

.compare-button {
  height: 30px;
  padding: 0 12px;
  color: var(--ink);
  background: #f5be6e;
  border: 0;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.compare-button:disabled {
  color: #6f817c;
  background: #38534f;
  cursor: not-allowed;
}

.modal {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 0;
  background: transparent;
  border: 0;
}

.modal::backdrop {
  background: rgba(13, 30, 28, 0.55);
  backdrop-filter: blur(5px);
}

.modal[open] {
  display: grid;
  place-items: center;
}

.modal-shell {
  width: min(860px, calc(100% - 34px));
  max-height: min(710px, calc(100% - 34px));
  overflow: auto;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(7, 20, 18, 0.32);
}

.sources-modal-shell {
  width: min(680px, calc(100% - 34px));
}

.compare-modal-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compare-modal-shell .modal-header {
  position: relative;
  flex: none;
}

.modal-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 25px 17px;
  background: rgba(247, 244, 236, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.modal-header .eyebrow {
  margin-bottom: 4px;
}

.modal-header h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.compare-table-wrap {
  flex: 1;
  min-height: 0;
  padding: 0 25px 25px;
  overflow: auto;
}

.compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.compare-table th,
.compare-table td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.compare-table thead th {
  position: sticky;
  z-index: 3;
  top: 0;
  color: var(--muted);
  background: rgba(247, 244, 236, 0.98);
  box-shadow: 0 1px 0 var(--line);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compare-table thead th:first-child {
  width: 185px;
}

.compare-table thead strong,
.compare-table thead span {
  display: block;
}

.compare-table thead strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.compare-table thead span {
  margin-top: 3px;
}

.compare-table tbody th {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
}

.compare-table td strong,
.compare-table td small {
  display: block;
}

.compare-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 550;
}

.table-metric-label {
  padding: 8px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 750;
  text-align: left;
  cursor: help;
}

.table-metric-label:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.table-metric-icon,
.source-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--green);
  background: #e2e9e2;
  border-radius: 8px;
}

.compare-table td {
  color: var(--table-ink, var(--ink));
  background: var(--table-color, transparent);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.compare-table td.is-best small {
  color: inherit;
  font-weight: 750;
  opacity: 0.76;
}

.source-intro {
  margin: 20px 25px 4px;
  color: var(--muted);
  font-size: 11px;
}

.sources-list {
  padding: 8px 25px 25px;
}

.source-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.source-row:hover strong {
  color: var(--accent-dark);
}

.source-row strong,
.source-row small {
  display: block;
}

.source-row strong {
  font-size: 11px;
}

.source-row small {
  max-width: 370px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.source-meta {
  color: var(--green);
  font-size: 8px;
  font-weight: 750;
  line-height: 1.45;
  text-align: right;
}

.source-meta > span,
.source-meta a {
  display: block;
}

.source-meta a {
  color: var(--green);
  text-decoration: none;
}

.toast {
  position: fixed;
  z-index: 11000;
  top: 14px;
  left: 50%;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border-radius: 9px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 10px;
  font-weight: 750;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .map-pane.has-place,
  .map-pane.has-shortlist {
    width: 290px;
  }

  .marker-name {
    display: none;
  }

  .marker-bubble {
    width: max-content;
    padding-right: 5px;
  }
}

@media (max-width: 720px) {
  .map-stage {
    position: fixed;
    inset: 0;
  }

  .map-pane {
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    left: max(10px, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .map-pane.has-place,
  .map-pane.has-shortlist {
    width: auto;
  }

  .layer-select-wrap select {
    min-height: 34px;
  }

  .icon-button,
  .detail-close {
    width: 36px;
    height: 36px;
  }

  .detail-close {
    top: 6px;
    right: 6px;
  }

  .detail-pin {
    min-height: 40px;
  }

  .compare-places {
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }

  .compare-chip {
    max-width: 120px;
    height: 36px;
    scroll-snap-align: start;
  }

  .compare-button {
    height: 36px;
  }

  .leaflet-control-zoom a {
    width: 42px !important;
    height: 42px !important;
    line-height: 40px !important;
  }

  .leaflet-bottom.leaflet-right {
    right: env(safe-area-inset-right);
    bottom: env(safe-area-inset-bottom);
  }

  .leaflet-control-attribution {
    max-width: calc(100vw - 8px);
    font-size: 7px !important;
    line-height: 1.25;
  }

  .modal-shell {
    width: calc(100% - 12px);
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 15px;
  }

  .modal-header {
    padding: 15px 14px;
  }

  .modal-header h2 {
    font-size: 24px;
  }

  .compare-table-wrap,
  .sources-list {
    padding-right: 12px;
    padding-left: 12px;
  }

  .compare-table thead th:not(:first-child),
  .compare-table td {
    min-width: 110px;
  }

  .compare-table thead th:first-child,
  .compare-table tbody th {
    position: sticky;
    z-index: 1;
    left: 0;
    background: var(--paper);
  }

  .compare-table thead th:first-child {
    z-index: 4;
    width: 145px;
    min-width: 145px;
  }

  .compare-table th,
  .compare-table td {
    padding: 12px 9px;
  }

  .source-intro {
    margin-right: 12px;
    margin-left: 12px;
  }

  .source-row {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
  }

  .source-meta {
    grid-column: 2;
  }

  .source-meta a {
    display: inline-block;
    min-height: 32px;
    padding-top: 8px;
    margin-right: 10px;
  }
}

@media (max-width: 430px) {
  .metric-kicker,
  .layer-picker-row > span {
    font-size: 8px;
  }

  .layer-select-wrap select {
    font-size: 19px;
  }

}

@media (max-height: 760px) {
  .layer-picker {
    padding: 6px 10px 4px;
  }

  .layer-select-wrap select {
    min-height: 22px;
    font-size: 16px;
  }

  .map-legend {
    padding: 5px 10px;
  }

  .legend-heading {
    margin-bottom: 2px;
  }

  .legend-values {
    margin-top: 2px;
    font-size: 7px;
  }

  .detail-location {
    padding: 7px 10px 5px;
  }

  .detail-location h2 {
    font-size: 21px;
  }

  .detail-hero {
    padding: 7px 9px;
  }

  .detail-hero strong {
    font-size: 22px;
  }

  .detail-metrics {
    margin: 5px 10px 3px;
  }

  .detail-metric {
    min-height: 36px;
    padding: 4px;
  }

  .activity-summary,
  .weather-summary,
  .seasonality-summary,
  .heritage-summary,
  .settling-summary,
  .disaster-summary,
  .money-summary,
  .stay-summary,
  .food-summary,
  .culture-summary,
  .connectivity-summary {
    margin: 5px 10px 2px;
  }

  .activity-tags {
    margin-top: 3px;
  }

  .activity-tags strong,
  .food-tags strong {
    min-height: 15px;
    padding: 2px;
  }

  .detail-actions {
    padding: 3px 10px 7px;
  }

  .detail-pin {
    height: 30px;
  }
}

@media (max-width: 720px) and (max-height: 760px) {
  .map-pane {
    max-height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  .layer-select-wrap select {
    min-height: 30px;
  }

  .detail-pin {
    min-height: 34px;
  }

  .compare-chip,
  .compare-button {
    height: 32px;
  }

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

@media (min-width: 560px) and (max-height: 760px) {
  .map-pane.has-place,
  .map-pane.has-shortlist {
    width: min(650px, calc(100% - 36px));
  }

  .detail-metrics {
    grid-template-columns: repeat(8, 1fr);
  }

  .detail-location {
    padding: 3px 10px 2px;
  }

  .detail-location h2 {
    margin-top: 1px;
    font-size: 19px;
  }

  .detail-hero {
    display: none;
  }

  .map-legend {
    padding: 3px 10px;
  }

  .legend-heading {
    margin-bottom: 1px;
  }

  .legend-scale span {
    height: 3px;
  }

  .legend-values {
    margin-top: 1px;
    font-size: 6.5px;
  }

  .activity-tags {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .compare-tray {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    padding: 5px 7px;
  }

  .compare-places {
    grid-row: 1;
    grid-column: 2;
  }

  .compare-chip,
  .compare-button {
    height: 30px;
  }

  .detail-actions {
    padding: 2px 10px 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
