:root {
  color-scheme: light;
  --ink: #18201d;
  --muted: #5a665f;
  --support: #3f4b45;
  --line: rgba(24, 32, 29, 0.14);
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #fff;
  --surface-muted: #f4f7f4;
  --field-surface: #fff;
  --surface-hover: rgba(37, 111, 87, 0.08);
  --popup-surface: #fff;
  --popup-hover-surface: #f8fbf8;
  --popup-border: rgba(24, 32, 29, 0.05);
  --popup-control-surface: rgba(255, 255, 255, 0.88);
  --popup-control-hover: #fff;
  --media-surface: #dfe5df;
  --media-gradient: linear-gradient(135deg, rgba(37, 111, 87, 0.14), rgba(217, 111, 50, 0.08));
  --accent: #256f57;
  --accent-hover: #1f5e4a;
  --accent-contrast: #fff;
  --accent-2: #d96f32;
  --focus: rgba(37, 111, 87, 0.42);
  --danger: #7f1d1d;
  --danger-line: rgba(185, 28, 28, 0.28);
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.18);
  --popup-shadow:
    0 1px 2px rgba(17, 24, 39, 0.08),
    0 18px 40px rgba(17, 24, 39, 0.18),
    0 38px 70px rgba(17, 24, 39, 0.14);
  --page-bg: #eef1ed;
  --button-shadow: 0 8px 16px rgba(37, 111, 87, 0.2);
  --control-shadow: 0 8px 18px rgba(17, 24, 39, 0.16);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="clear"] {
  color-scheme: light;
  --ink: #1c2d27;
  --muted: #607169;
  --support: #384a43;
  --line: rgba(34, 65, 53, 0.2);
  --surface: rgba(239, 246, 236, 0.9);
  --surface-solid: #f4f8f1;
  --surface-muted: #e5eee2;
  --field-surface: rgba(255, 255, 255, 0.74);
  --surface-hover: rgba(37, 111, 87, 0.1);
  --popup-surface: #f4f8f1;
  --popup-hover-surface: #eef5ea;
  --popup-border: rgba(34, 65, 53, 0.16);
  --popup-control-surface: rgba(244, 248, 241, 0.9);
  --popup-control-hover: #fff;
  --media-surface: #dce6dc;
  --media-gradient: linear-gradient(135deg, rgba(37, 111, 87, 0.16), rgba(217, 111, 50, 0.1));
  --accent: #256f57;
  --accent-hover: #1f5e4a;
  --accent-contrast: #fff;
  --focus: rgba(37, 111, 87, 0.42);
  --danger: #7f1d1d;
  --danger-line: rgba(185, 28, 28, 0.28);
  --shadow: 0 16px 38px rgba(26, 55, 43, 0.2);
  --popup-shadow:
    0 1px 2px rgba(26, 55, 43, 0.1),
    0 18px 42px rgba(26, 55, 43, 0.2),
    0 34px 68px rgba(26, 55, 43, 0.14);
  --page-bg: #eef4ec;
  --button-shadow: 0 8px 16px rgba(37, 111, 87, 0.2);
  --control-shadow: 0 8px 18px rgba(26, 55, 43, 0.18);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body,
.shell,
.map {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--page-bg);
}

button,
input,
select {
  font: inherit;
}

.shell {
  position: relative;
}

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

.toolbar {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 14px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  width: max-content;
  max-width: min(640px, calc(100% - 190px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 36px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 122px;
  max-height: 36px;
  object-fit: contain;
  object-position: center;
}

.location-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(360px, 40vw);
  min-width: 240px;
}

.search,
.location-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--field-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(17, 24, 39, 0.08);
  flex: 1 1 auto;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.search {
  width: min(190px, 22vw);
  min-width: 150px;
}

.search::before,
.location-field::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  width: 12px;
  height: 12px;
  border: 1.8px solid var(--muted);
  border-radius: 999px;
  opacity: 0.72;
  transform: translateY(-58%);
  pointer-events: none;
}

.search::after,
.location-field::after {
  content: "";
  position: absolute;
  top: calc(50% + 5px);
  left: 25px;
  width: 6px;
  height: 1.8px;
  border-radius: 999px;
  background: var(--muted);
  opacity: 0.72;
  transform: translateY(-50%) rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

select,
button {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--field-surface);
}

.search input,
.location-field input {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 14px 0 38px;
  border: 0;
  border-radius: inherit;
  color: var(--ink);
  background: transparent;
  outline: 0;
}

.search input::placeholder,
.location-field input::placeholder {
  color: var(--muted);
  opacity: 0.76;
}

select {
  padding: 0 28px 0 10px;
}

button {
  min-width: 70px;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 650;
}

button:hover,
select:hover,
.search:hover,
.location-field:hover {
  border-color: var(--accent);
}

.search:focus-within,
.location-field:focus-within {
  border-color: var(--accent);
  background: var(--surface-solid);
  box-shadow:
    0 0 0 3px var(--focus),
    0 8px 18px rgba(17, 24, 39, 0.14);
}

.location-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.location-option,
.location-results-empty {
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: var(--surface-solid);
  text-align: left;
}

.location-option {
  display: grid;
  gap: 2px;
}

.location-option:hover,
.location-option[aria-selected="true"] {
  background: var(--surface-hover);
}

.location-option-name,
.location-option-context {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-option-name {
  font-size: 13px;
  font-weight: 750;
}

.location-option-context,
.location-results-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.search-area {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 40px;
  min-width: 148px;
  max-width: calc(100% - 28px);
  padding: 0 16px;
  border-color: transparent;
  border-radius: 999px;
  color: var(--accent-contrast);
  background: var(--accent);
  font-size: 14px;
  box-shadow: var(--shadow);
}

.search-area:hover {
  border-color: transparent;
  background: var(--accent-hover);
}

.search-area[hidden] {
  display: none;
}

.status,
.empty,
.error {
  position: absolute;
  z-index: 2;
  left: 14px;
  bottom: 46px;
  max-width: min(520px, calc(100% - 28px));
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.35;
}

.empty,
.error {
  color: var(--ink);
}

.error {
  border-color: var(--danger-line);
  color: var(--danger);
}

.rw-popup {
  --rw-popup-card-height: 128px;
  --rw-popup-media-size: 112px;
  --rw-popup-gap: 9px;
  --rw-popup-pad: 8px;
  display: grid;
  grid-template-columns: var(--rw-popup-media-size) minmax(0, 1fr);
  gap: var(--rw-popup-gap);
  width: min(320px, calc(100vw - 52px));
  height: var(--rw-popup-card-height);
  max-width: none;
  padding: var(--rw-popup-pad);
  color: var(--ink);
  background: var(--popup-surface);
  transition: background-color 180ms ease;
}

.rw-popup:hover,
.rw-popup:focus-within {
  background: var(--popup-hover-surface);
}

.rw-popup-media {
  position: relative;
  isolation: isolate;
  align-self: start;
  overflow: hidden;
  width: var(--rw-popup-media-size);
  height: var(--rw-popup-media-size);
  margin: 0;
  border-radius: 6px;
  background:
    var(--media-gradient),
    var(--media-surface);
}

.rw-popup-media::after {
  content: "";
  position: absolute;
  inset: -18% -85%;
  z-index: 1;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.26) 50%, transparent 60%);
  opacity: 0;
  transform: translateX(-48%);
  transition:
    opacity 220ms ease,
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.rw-popup-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.rw-popup:hover .rw-popup-media img,
.rw-popup:focus-within .rw-popup-media img {
  transform: scale(1.035);
}

.rw-popup:hover .rw-popup-media::after,
.rw-popup:focus-within .rw-popup-media::after {
  opacity: 1;
  transform: translateX(48%);
}

.rw-popup-body {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.rw-popup-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 15px;
  margin-bottom: 2px;
  gap: 6px;
}

.rw-popup-title {
  display: -webkit-box;
  margin: 0 0 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 760;
  line-height: 1.15;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rw-popup-meta,
.rw-popup-rating,
.rw-popup-details,
.rw-popup-address {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.rw-popup-meta {
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rw-popup-header .rw-popup-meta {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
  -webkit-line-clamp: 1;
}

.rw-popup-rating {
  margin-bottom: 1px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  -webkit-line-clamp: 1;
}

.rw-popup-details {
  color: var(--support);
  font-size: 11px;
  font-weight: 650;
  -webkit-line-clamp: 1;
}

.rw-popup-address {
  margin-top: 1px;
  -webkit-line-clamp: 1;
}

.rw-popup-price {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-popup-footer {
  grid-row: -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 18px;
  margin-top: 0;
  padding-top: 0;
}

.rw-popup-footer-actions {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}

.rw-popup-footer.has-carousel {
  gap: 5px;
}

.rw-popup-footer.has-carousel .rw-popup-footer-actions {
  gap: 4px;
}

.rw-popup-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  max-width: 92px;
  height: auto;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--accent);
  background: transparent;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition:
    color 160ms ease,
    text-decoration-color 160ms ease,
    transform 160ms ease;
}

.rw-popup-link:hover,
.rw-popup-link:focus-visible {
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.rw-popup-link-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-popup-link-icon {
  display: block;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.82;
  transform: translate(0, 0);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.rw-popup-link:hover .rw-popup-link-icon,
.rw-popup-link:focus-visible .rw-popup-link-icon {
  opacity: 1;
  transform: translate(1px, -1px);
}

.rw-popup-link:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.rw-popup-footer.has-carousel .rw-popup-link {
  justify-content: center;
  flex: 0 0 22px;
  width: 22px;
  min-width: 22px;
  max-width: 22px;
  height: 20px;
  min-height: 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
}

.rw-popup-footer.has-carousel .rw-popup-link:hover,
.rw-popup-footer.has-carousel .rw-popup-link:focus-visible {
  border-color: var(--line);
  background: var(--surface-hover);
  transform: scale(1.04);
}

.rw-popup-footer.has-carousel .rw-popup-link-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rw-popup-carousel {
  display: block;
  width: min(320px, calc(100vw - 52px));
}

.rw-popup-carousel-stage {
  position: relative;
  display: grid;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  touch-action: pan-y;
  user-select: none;
}

.rw-popup-carousel-stage.is-dragging {
  cursor: grabbing;
}

.rw-popup-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: var(--rw-popup-media-size) minmax(0, 1fr);
  gap: var(--rw-popup-gap);
  min-height: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px) scale(0.99);
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 260ms;
}

.rw-popup-carousel[data-rw-carousel-direction="previous"] .rw-popup-slide {
  transform: translateX(-8px) scale(0.99);
}

.rw-popup-slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
  transition-delay: 0s;
}

.rw-popup-carousel-stage.is-dragging .rw-popup-slide.is-active {
  transform: translateX(var(--rw-drag-offset, 0)) scale(0.995);
  transition-duration: 80ms;
}

.rw-popup-slide.is-exiting-next,
.rw-popup-slide.is-exiting-previous {
  z-index: 0;
  visibility: visible;
  opacity: 0;
  pointer-events: none;
  transition-delay: 0s;
}

.rw-popup-slide.is-exiting-next {
  transform: translateX(-8px) scale(0.99);
}

.rw-popup-slide.is-exiting-previous {
  transform: translateX(8px) scale(0.99);
}

.rw-popup-control {
  display: inline-grid;
  width: 20px;
  min-width: 0;
  height: 20px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--support);
  background: transparent;
  box-shadow: none;
  line-height: 0;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.rw-popup-control:hover {
  border-color: var(--line);
  color: var(--accent);
  background: var(--surface-hover);
  box-shadow: 0 3px 9px rgba(17, 24, 39, 0.08);
  transform: scale(1.04);
}

.rw-popup-control:active {
  transform: scale(0.96);
}

.rw-popup-control:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.rw-popup-control-icon {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

[data-rw-carousel-prev]:hover .rw-popup-control-icon,
[data-rw-carousel-prev]:focus-visible .rw-popup-control-icon {
  transform: translateX(-1px);
}

[data-rw-carousel-next]:hover .rw-popup-control-icon,
[data-rw-carousel-next]:focus-visible .rw-popup-control-icon {
  transform: translateX(1px);
}

.rw-popup-carousel-nav {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: var(--support);
}

.rw-popup-carousel-count {
  min-width: 24px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 720;
  line-height: 1;
  text-align: center;
}

.mapboxgl-popup-content {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--popup-border);
  border-radius: 8px;
  background: var(--popup-surface);
  box-shadow: var(--popup-shadow);
  animation: rw-popup-enter 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rw-popup-from-marker .mapboxgl-popup-tip {
  display: none;
}

.rw-popup-from-marker .mapboxgl-popup-content {
  transform-origin: 50% 100%;
  animation: rw-marker-card-enter 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: clip-path, transform, opacity;
}

.mapboxgl-popup-close-button {
  z-index: 3;
  top: 6px;
  right: 6px;
  width: 26px;
  min-width: 0;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--popup-control-surface);
  font-size: 18px;
  line-height: 24px;
}

.mapboxgl-popup-close-button:hover {
  background: var(--popup-control-hover);
}

@keyframes rw-popup-enter {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rw-marker-card-enter {
  0% {
    opacity: 0.98;
    clip-path: inset(calc(100% - 34px) calc(50% - 42px) 0 calc(50% - 42px) round 999px);
    transform: translateY(7px) scale(0.98);
  }

  45% {
    clip-path: inset(calc(100% - 92px) 44px 0 44px round 18px);
  }

  100% {
    opacity: 1;
    clip-path: inset(0 round 8px);
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rw-popup,
  .rw-popup-media::after,
  .rw-popup-media img,
  .rw-popup-slide,
  .rw-popup-control,
  .rw-popup-control-icon,
  .rw-popup-link-icon,
  .rw-popup-link {
    transition: none;
  }

  .rw-popup:hover .rw-popup-media::after,
  .rw-popup:focus-within .rw-popup-media::after {
    opacity: 0;
    transform: none;
  }

  .rw-popup:hover .rw-popup-media img,
  .rw-popup-control:hover,
  .rw-popup-control:active,
  [data-rw-carousel-prev]:hover .rw-popup-control-icon,
  [data-rw-carousel-prev]:focus-visible .rw-popup-control-icon,
  [data-rw-carousel-next]:hover .rw-popup-control-icon,
  [data-rw-carousel-next]:focus-visible .rw-popup-control-icon,
  .rw-popup-footer.has-carousel .rw-popup-link:hover,
  .rw-popup-footer.has-carousel .rw-popup-link:focus-visible,
  .rw-popup-link:hover .rw-popup-link-icon,
  .rw-popup-link:focus-visible .rw-popup-link-icon,
  .rw-popup-link:hover,
  .rw-popup-link:focus-visible {
    transform: none;
  }

  .mapboxgl-popup-content {
    animation: none;
  }
}

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

@media (max-width: 640px) {
  html,
  body,
  .shell,
  .map {
    min-height: 0;
  }

  .toolbar {
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    left: 10px;
    display: flex;
    width: auto;
    max-width: none;
    padding: 6px 8px;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .location-search {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .brand {
    width: 92px;
    height: 40px;
    flex: 0 0 92px;
    justify-content: flex-start;
  }

  .brand-logo {
    max-width: 92px;
    max-height: 38px;
  }

  .search input,
  .location-field input,
  select,
  button {
    height: 40px;
  }

  .search,
  .location-field {
    height: 40px;
  }

  .search,
  select,
  #reset,
  .status {
    display: none;
  }

  .search-area {
    z-index: 5;
    top: auto;
    right: auto;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 50%;
    width: max-content;
    min-width: min(220px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.54);
    box-shadow:
      0 1px 2px rgba(17, 24, 39, 0.08),
      0 14px 30px rgba(17, 24, 39, 0.24);
    transform: translateX(-50%);
  }

  .empty,
  .error {
    right: 10px;
    bottom: calc(36px + env(safe-area-inset-bottom));
    left: 10px;
    max-width: none;
    padding: 7px 10px;
    font-size: 12px;
  }

  .mapboxgl-popup.rw-popup-from-marker,
  .mapboxgl-popup.rw-popup-from-cluster {
    position: fixed;
    z-index: 6;
    top: auto !important;
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    left: 10px !important;
    width: auto;
    max-width: none !important;
    transform: none !important;
  }

  .mapboxgl-popup.rw-popup-from-marker .mapboxgl-popup-content,
  .mapboxgl-popup.rw-popup-from-cluster .mapboxgl-popup-content {
    width: 100%;
    max-height: 70vh;
    max-height: min(70vh, calc(100vh - 150px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: rw-popup-enter 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: auto;
  }

  .rw-popup,
  .rw-popup-carousel {
    width: 100%;
    max-width: none;
  }

  .rw-popup {
    --rw-popup-card-height: 128px;
    --rw-popup-media-size: 112px;
    --rw-popup-pad: 8px;
  }

  .rw-popup-media {
    margin: 0;
  }

  .rw-popup-title {
    font-size: 14px;
  }

  .rw-popup-meta {
    margin-bottom: 3px;
    -webkit-line-clamp: 1;
  }

  .rw-popup-address {
    -webkit-line-clamp: 1;
  }

  .rw-popup-footer {
    min-height: 20px;
  }

  .rw-popup-control {
    width: 20px;
    height: 20px;
    margin: 0;
  }
}

@supports (height: 100dvh) {
  @media (max-width: 640px) {
    .rw-popup {
      --rw-popup-card-height: 128px;
    }

    .mapboxgl-popup.rw-popup-from-marker .mapboxgl-popup-content,
    .mapboxgl-popup.rw-popup-from-cluster .mapboxgl-popup-content {
      max-height: min(70dvh, calc(100dvh - 150px));
    }
  }
}

@media (max-width: 640px) and (max-height: 520px) {
  .mapboxgl-popup.rw-popup-from-marker .mapboxgl-popup-content,
  .mapboxgl-popup.rw-popup-from-cluster .mapboxgl-popup-content {
    max-height: 74vh;
    max-height: calc(100vh - 82px);
  }
}
