.bk-map-page {
  --bk-map-radius: 8px;
  --bk-map-radius-inner: 6px;
  --bk-map-border: rgba(15, 20, 36, 0.10);
  --bk-map-border-soft: rgba(15, 20, 36, 0.08);
  --bk-map-shadow-glass: 0 24px 70px -38px rgba(15, 20, 36, 0.48), 0 8px 24px -18px rgba(15, 20, 36, 0.26);
  --bk-map-shadow-nav: 0 18px 52px -32px rgba(15, 20, 36, 0.42), 0 6px 18px -14px rgba(15, 20, 36, 0.22);
  --bk-map-nav-bg: rgba(255, 255, 255, 0.70);
  --bk-map-panel-bg: rgba(255, 255, 255, 0.50);
  --bk-map-search-panel-bg: rgba(255, 255, 255, 0.20);
  --bk-map-control-bg: rgba(255, 255, 255, 0.07);

  position: relative;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  background: #eef0f3;
  color: var(--color-ink, #0f1424);
}

.bk-map-nav {
  position: fixed;
  top: 12px;
  right: 16px;
  left: 16px;
  z-index: 650;
}

.bk-map-nav > nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 50px;
  padding: 10px 16px;
  border: 1px solid var(--bk-map-border);
  border-radius: var(--bk-map-radius);
  background: var(--bk-map-nav-bg);
  box-shadow: var(--bk-map-shadow-nav);
  -webkit-backdrop-filter: blur(36px) saturate(175%);
  backdrop-filter: blur(36px) saturate(175%);
}

.bk-map-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--color-ink, #0f1424);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
}

.bk-map-brand span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 5px;
  background: var(--color-ink, #0f1424);
  color: #ffffff;
  font-size: 11px;
  line-height: 1;
  font-weight: 650;
}

.bk-map-brand strong {
  font-weight: 650;
}

.bk-map-search {
  display: flex;
  min-width: 0;
  justify-content: center;
}

.bk-map-search-trigger {
  display: grid;
  width: min(420px, 100%);
  min-width: 210px;
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 9px 7px 13px;
  border: 1px solid rgba(15, 20, 36, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--color-muted, #767c92);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.bk-map-search-trigger:hover,
.bk-map-search-trigger:focus-visible {
  background: rgba(255, 255, 255, 0.34);
  color: var(--color-ink-2, #3c4156);
}

.bk-map-search-trigger span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bk-map-search-trigger kbd {
  display: inline-flex;
  min-width: 34px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bk-map-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  color: var(--color-ink-2, #3c4156);
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.bk-map-feedback {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-ink, #0f1424);
  color: #ffffff;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.bk-map-feedback:hover,
.bk-map-feedback:focus-visible {
  background: #1a2140;
  color: #ffffff;
}

.bk-map {
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.bk-map-search-dialog {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 760;
  width: min(520px, calc(100vw - 32px));
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.bk-map-search-dialog.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.bk-map-search-panel {
  overflow: hidden;
  border: 1px solid var(--bk-map-border);
  border-radius: var(--bk-map-radius);
  background: var(--bk-map-search-panel-bg);
  box-shadow: var(--bk-map-shadow-glass);
  -webkit-backdrop-filter: blur(36px) saturate(175%);
  backdrop-filter: blur(36px) saturate(175%);
}

.bk-map-search-field {
  padding: 10px;
  border-bottom: 1px solid rgba(15, 20, 36, 0.08);
}

.bk-map-search-field input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: var(--bk-map-radius-inner);
  background: rgba(255, 255, 255, 0.52);
  color: var(--color-ink, #0f1424);
  font: inherit;
  font-size: 15px;
  padding: 11px 12px;
}

.bk-map-search-field input::placeholder {
  color: var(--color-muted, #767c92);
}

.bk-map-search-results {
  display: grid;
  max-height: min(48dvh, 380px);
  overflow: hidden auto;
  padding: 6px;
}

.bk-map-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--bk-map-radius-inner);
  background: transparent;
  color: var(--color-ink, #0f1424);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bk-map-search-result:hover,
.bk-map-search-result:focus-visible {
  background: rgba(255, 255, 255, 0.54);
  outline: 0;
}

.bk-map-search-result span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.bk-map-search-result strong,
.bk-map-search-result small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bk-map-search-result strong {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}

.bk-map-search-result small,
.bk-map-search-result em,
.bk-map-search-empty {
  color: var(--color-muted, #767c92);
  font-size: 12px;
}

.bk-map-search-result em {
  font-style: normal;
  font-weight: 650;
}

.bk-map-search-empty {
  padding: 16px 14px;
}

.bk-map-glass-modal {
  border: 1px solid var(--bk-map-border);
  border-radius: var(--bk-map-radius);
  background: var(--bk-map-panel-bg);
  box-shadow: var(--bk-map-shadow-glass);
  -webkit-backdrop-filter: blur(32px) saturate(130%);
  backdrop-filter: blur(32px) saturate(130%);
}

.bk-map-sidebar {
  position: fixed;
  top: 78px;
  left: 16px;
  z-index: 520;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(336px, calc(100vw - 32px));
  max-height: calc(100dvh - 94px);
  overflow: hidden auto;
  padding: 18px;
}

.bk-map-filters {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.bk-map-filters section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bk-map-label {
  margin-bottom: 3px;
  color: var(--color-muted, #767c92);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.bk-map-segments {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--bk-map-border-soft);
  border-radius: var(--bk-map-radius);
  background: rgba(15, 20, 36, 0.04);
}

.bk-map-segment {
  position: relative;
  cursor: pointer;
}

.bk-map-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bk-map-segment span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: var(--bk-map-radius-inner);
  color: var(--color-ink-2, #3c4156);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.bk-map-segment input:focus-visible + span {
  outline: 2px solid var(--color-bk-indigo, #3a4cd9);
  outline-offset: 2px;
}

.bk-map-segment input:checked + span {
  background: #ffffff;
  color: var(--color-bk-indigo, #3a4cd9);
  box-shadow: 0 1px 2px rgba(15, 20, 36, 0.08);
}

.bk-map-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #eef0f3;
}

.bk-map-canvas {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.bk-map .maplibregl-ctrl-top-right {
  top: 84px;
  right: 38px;
}

.bk-map .maplibregl-ctrl-top-right .maplibregl-ctrl {
  margin: 0;
}

.bk-map .maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid var(--bk-map-border);
  border-radius: var(--bk-map-radius);
  background: var(--bk-map-control-bg);
  box-shadow: var(--bk-map-shadow-nav);
  -webkit-backdrop-filter: blur(28px) saturate(175%);
  backdrop-filter: blur(28px) saturate(175%);
}

.bk-map .maplibregl-ctrl-group button {
  background-color: transparent;
}

.bk-map .maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--bk-map-border);
}

.bk-map .maplibregl-ctrl-group button:hover,
.bk-map .maplibregl-ctrl-group button:focus-visible {
  background-color: rgba(255, 255, 255, 0.30);
}

.bk-map-detail-panel {
  position: fixed;
  top: 78px;
  right: 16px;
  bottom: 16px;
  z-index: 500;
  width: min(420px, calc(100vw - 36px));
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + 28px));
  transition: transform 180ms ease, opacity 180ms ease;
}

.bk-map-detail-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.bk-map-detail-shell {
  position: relative;
  height: 100%;
  overflow: hidden auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.bk-map-detail-close {
  position: sticky;
  top: 10px;
  left: calc(100% - 46px);
  z-index: 2;
  display: flex;
  width: 32px;
  height: 32px;
  margin: 10px 10px -42px auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bk-map-border);
  border-radius: var(--bk-map-radius);
  background: rgba(255, 255, 255, 0.86);
  color: rgba(15, 20, 36, 0.62);
  font: 22px/1 var(--font-sans, system-ui, sans-serif);
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.bk-map-detail-close:hover,
.bk-map-detail-close:focus-visible {
  background: #ffffff;
  color: var(--color-ink, #0f1424);
}

.bk-map-detail-shell turbo-frame {
  display: block;
  min-height: 100%;
}

.bk-map-detail-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 32px;
  color: var(--color-muted, #767c92);
  font-size: 13px;
}

.bk-map-detail-content {
  display: grid;
  gap: 18px;
  padding: 18px;
  color: var(--color-ink, #0f1424);
}

.bk-map-detail-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: -18px -18px 0;
}

.bk-map-detail-photo {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(160deg, #eef3ff 0%, #e7f5ec 52%, #f6e8ef 100%);
}

.bk-map-detail-photo::before {
  content: "";
  position: absolute;
  inset: 14% 18% -10% 28%;
  background:
    linear-gradient(90deg, rgba(58, 76, 217, 0.22), rgba(31, 111, 83, 0.18)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.34) 0 1px, transparent 1px 18px);
  transform: skewX(-8deg);
}

.bk-map-detail-photo-main {
  grid-row: span 2;
  min-height: 238px;
}

.bk-map-detail-photo span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--color-ink-2, #3c4156);
  font-size: 11px;
  line-height: 1;
  font-weight: 650;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.bk-map-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.bk-map-detail-header h2 {
  margin: 4px 0 0;
  color: var(--color-ink, #0f1424);
  font-size: 26px;
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 650;
}

.bk-map-detail-thai {
  margin-top: 6px;
  color: var(--color-ink-2, #3c4156);
  font-size: 15px;
  line-height: 1.35;
}

.bk-map-detail-rating {
  display: grid;
  min-width: 54px;
  justify-items: center;
  gap: 1px;
  padding: 8px 9px;
  border: 1px solid rgba(58, 76, 217, 0.18);
  border-radius: var(--bk-map-radius);
  background: rgba(58, 76, 217, 0.08);
  color: var(--color-bk-indigo, #3a4cd9);
}

.bk-map-detail-rating span {
  font-size: 18px;
  line-height: 1;
  font-weight: 750;
}

.bk-map-detail-rating small {
  color: var(--color-muted, #767c92);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 650;
}

.bk-map-detail-location {
  display: grid;
  gap: 8px;
  color: var(--color-ink-2, #3c4156);
  font-size: 13px;
  line-height: 1.4;
}

.bk-map-detail-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bk-map-detail-prices div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--bk-map-border-soft);
  border-radius: var(--bk-map-radius);
  background: rgba(15, 20, 36, 0.025);
}

.bk-map-detail-prices span,
.bk-map-detail-facts dt {
  color: var(--color-muted, #767c92);
  font-size: 10.5px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bk-map-detail-prices strong {
  color: var(--color-ink, #0f1424);
  font-size: 18px;
  line-height: 1.15;
  font-weight: 700;
}

.bk-map-detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--bk-map-border-soft);
  border-radius: var(--bk-map-radius);
  background: #ffffff;
}

.bk-map-detail-facts div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border-bottom: 1px solid var(--bk-map-border-soft);
}

.bk-map-detail-facts div:nth-child(odd) {
  border-right: 1px solid var(--bk-map-border-soft);
}

.bk-map-detail-facts div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.bk-map-detail-facts dd {
  min-width: 0;
  margin: 0;
  color: var(--color-ink, #0f1424);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
}

.bk-map-detail-actions {
  display: grid;
  gap: 8px;
}

.bk-map-detail-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: var(--bk-map-radius);
  background: var(--color-ink, #0f1424);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.bk-map-detail-cta:hover,
.bk-map-detail-cta:focus-visible {
  background: #1a2140;
  color: #ffffff;
}

.bk-map-detail-cta-secondary {
  min-height: 40px;
  border: 1px solid var(--bk-map-border);
  background: rgba(15, 20, 36, 0.035);
  color: var(--color-ink-2, #3c4156);
  font-size: 13px;
  font-weight: 650;
}

.bk-map-detail-cta-secondary:hover,
.bk-map-detail-cta-secondary:focus-visible {
  border-color: rgba(15, 20, 36, 0.18);
  background: rgba(15, 20, 36, 0.065);
  color: var(--color-ink, #0f1424);
}

.bk-map .maplibregl-popup-content {
  font-family: var(--font-sans, system-ui, sans-serif);
}

.bk-map .bk-project-popup .maplibregl-popup-content,
.bk-map .bk-project-hover .maplibregl-popup-content {
  border: 1px solid var(--bk-map-border);
  border-radius: var(--bk-map-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px -22px rgba(15, 20, 36, 0.45), 0 6px 18px -10px rgba(15, 20, 36, 0.24);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.bk-map .bk-project-popup .maplibregl-popup-content {
  padding: 0;
}

.bk-map .bk-project-hover .maplibregl-popup-content {
  padding: 0;
}

.bk-map .bk-project-filtered-hover .maplibregl-popup-content {
  padding: 0;
  border: 1px solid rgba(15, 20, 36, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px -18px rgba(15, 20, 36, 0.34);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.bk-map .bk-project-popup .maplibregl-popup-content {
  margin: 0;
}

.bk-map .bk-project-popup .maplibregl-popup-tip,
.bk-map .bk-project-hover .maplibregl-popup-tip,
.bk-map .bk-project-filtered-hover .maplibregl-popup-tip {
  display: none;
}

.bk-map .bk-project-popup .maplibregl-popup-close-button {
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: rgba(15, 20, 36, 0.58);
  font: 18px/24px var(--font-sans, system-ui, sans-serif);
}

.bk-map .bk-project-popup .maplibregl-popup-close-button:hover,
.bk-map .bk-project-popup .maplibregl-popup-close-button:focus-visible {
  background: rgba(15, 20, 36, 0.06);
  color: var(--color-ink, #0f1424);
}

.bk-project-popup-card {
  display: grid;
  gap: 12px;
  width: 292px;
  max-width: min(292px, calc(100vw - 48px));
  padding: 16px;
  color: var(--color-ink, #0f1424);
}

.bk-project-hover .bk-project-popup-card {
  width: 260px;
  gap: 9px;
  padding: 12px;
}

.bk-project-popup-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.bk-project-popup-name {
  color: var(--color-ink, #0f1424);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 650;
}

.bk-project-hover .bk-project-popup-name {
  font-size: 14px;
}

.bk-project-filtered-tooltip {
  max-width: min(220px, calc(100vw - 48px));
  overflow: hidden;
  padding: 6px 9px;
  color: rgba(15, 20, 36, 0.62);
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bk-project-popup-detail {
  margin-top: 5px;
  color: var(--color-ink-2, #3c4156);
  font-size: 12.5px;
  line-height: 1.35;
}

.bk-project-hover .bk-project-popup-detail {
  font-size: 12px;
}

.bk-project-popup-match {
  min-width: 0;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(58, 76, 217, 0.10);
  color: var(--color-bk-indigo, #3a4cd9);
  font-size: 10.5px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bk-project-popup-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bk-project-popup-prices span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(15, 20, 36, 0.08);
  border-radius: 6px;
  background: rgba(15, 20, 36, 0.025);
  color: var(--color-ink-2, #3c4156);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

.bk-project-popup-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--color-ink, #0f1424);
  color: #ffffff !important;
  font-size: 13px;
  line-height: 1;
  font-weight: 650;
  text-decoration: none !important;
}

.bk-project-popup-link:hover,
.bk-project-popup-link:focus-visible {
  background: #1a2140;
}

.bk-project-popup-hint {
  color: var(--color-muted, #767c92);
  font-size: 11.5px;
  line-height: 1;
  font-weight: 600;
}

@media (max-width: 900px) {
  .bk-map-page {
    min-height: 620px;
  }

  .bk-map-nav {
    top: 8px;
    right: 8px;
    left: 8px;
  }

  .bk-map-nav > nav {
    min-height: 46px;
    padding: 8px 10px;
  }

  .bk-map-search-trigger {
    min-width: 0;
  }

  .bk-map-search-trigger span {
    display: block;
  }

  .bk-map-search-trigger kbd {
    display: none;
  }

  .bk-map-search-dialog {
    top: 58px;
    width: calc(100vw - 16px);
  }

  .bk-map .maplibregl-ctrl-top-right {
    top: 62px;
    right: 24px;
  }

  .bk-map-brand strong {
    display: none;
  }

  .bk-map-sidebar {
    top: 64px;
    right: 8px;
    left: 8px;
    width: auto;
    max-height: min(36dvh, 300px);
    padding: 12px;
    gap: 10px;
  }

  .bk-map-filters {
    gap: 10px;
  }

  .bk-map-filters section {
    gap: 3px;
  }

  .bk-map-label {
    margin-bottom: 1px;
    font-size: 10px;
  }

  .bk-map-segments {
    gap: 5px;
    padding: 4px;
  }

  .bk-map-segment span {
    min-height: 28px;
    padding: 4px 10px;
    white-space: nowrap;
  }

  .bk-map-detail-panel {
    --bk-map-detail-mobile-height: min(54vh, 680px);

    top: calc(100vh - var(--bk-map-detail-mobile-height) - 8px);
    right: 8px;
    bottom: auto;
    left: 8px;
    width: auto;
    height: var(--bk-map-detail-mobile-height);
    max-height: none;
    transform: translateY(calc(100% + 20px));
  }

  @supports (height: 100dvh) {
    .bk-map-detail-panel {
      --bk-map-detail-mobile-height: min(54dvh, 680px);

      top: calc(100dvh - var(--bk-map-detail-mobile-height) - 8px - env(safe-area-inset-bottom));
    }
  }

  .bk-map-detail-panel.is-open {
    transform: translateY(0);
  }

  .bk-map-detail-content {
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
}
