body {
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  color: #1e293b;
}

.ph-site-branding {
  min-width: 0;
}

.ph-site-branding p:last-child {
  letter-spacing: -0.01em;
}

@media (max-width: 639px) {
  body.ph-landing-open #status-bar {
    display: none;
  }

  #start-overlay {
    align-items: flex-start;
    padding: 0.5rem;
    padding-top: max(0.5rem, env(safe-area-inset-top, 0px));
  }

  #start-overlay .ph-start-panel {
    margin-inline: 0;
    max-height: calc(100dvh - 5.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #start-overlay .ph-popup-brand-header {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  #start-overlay .ph-popup-brand-header__main {
    gap: 0.5rem;
  }

  #start-overlay .ph-popup-brand-logo--lg {
    width: 36px;
    height: 36px;
  }

  #start-overlay .ph-popup-brand-title {
    font-size: 0.8125rem;
  }

  #start-overlay .ph-popup-brand-subtitle {
    font-size: 0.625rem;
  }

  #start-overlay .ph-start-panel__body {
    padding: 0.75rem;
  }

  #start-overlay .ph-start-panel__intro {
    margin-bottom: 0.625rem;
    padding: 0.5rem 0.625rem;
    font-size: 0.6875rem;
    line-height: 1.35;
  }

  #start-overlay .ph-start-panel__intro .font-semibold {
    font-size: 0.75rem;
  }

  #start-overlay .ph-start-panel__form label {
    font-size: 0.625rem;
  }

  #start-overlay #postcode-input {
    padding: 0.45rem 0.625rem;
    font-size: 0.8125rem;
  }

  #start-overlay #btn-go {
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
  }

  #start-overlay #btn-go-icon,
  #start-overlay #btn-go-spinner {
    width: 0.875rem;
    height: 0.875rem;
  }

  #start-overlay #postcode-error {
    font-size: 0.625rem;
  }

  #start-overlay .ph-start-panel__divider {
    margin-block: 0.625rem;
    font-size: 0.625rem;
  }

  #start-overlay .ph-start-panel__actions button {
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  #start-overlay .ph-start-panel__actions .size-4 {
    width: 0.875rem;
    height: 0.875rem;
  }
}

.ph-header-logo-btn {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 0.75rem;
  line-height: 0;
}

.ph-header-logo-btn:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.ph-header-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.ph-header-logo-btn:hover .ph-header-logo {
  transform: scale(1.12);
}

.ph-start-header-logo {
  width: 52px;
  height: 52px;
}

.ph-splash-header-logo {
  width: 44px;
  height: 44px;
}

.ph-compass {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 3px 10px rgb(15 23 42 / 0.32));
  transition:
    transform 0.22s ease,
    filter 0.22s ease;
  transform-origin: center center;
}

.ph-compass:hover {
  transform: scale(1.14);
  filter: drop-shadow(0 5px 14px rgb(15 23 42 / 0.38));
}

.ph-compass.is-dragging {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 12px rgb(15 23 42 / 0.4));
}

#map {
  position: relative;
  z-index: 0;
}

#map-controls {
  z-index: 905;
}

.ph-map-insight-modal {
  z-index: 980;
}

.ph-map-overlay-modal {
  position: absolute;
}

#map-root:fullscreen .ph-map-insight-modal,
#map-root:-webkit-full-screen .ph-map-insight-modal,
#map-root:fullscreen .ph-map-overlay-modal,
#map-root:-webkit-full-screen .ph-map-overlay-modal,
#map-root:fullscreen #detail-dialog,
#map-root:-webkit-full-screen #detail-dialog {
  position: absolute;
}

#map-root:fullscreen,
#map-root:-webkit-full-screen {
  width: 100%;
  height: 100%;
  background: #fff;
}

body.ph-map-focus > header,
body.ph-map-focus > footer {
  display: none;
}

body.ph-map-focus > main {
  flex: 1 1 auto;
}

.ph-schools-toggle:has(input:checked) {
  background: #e0f2fe;
  box-shadow: inset 0 0 0 1px #7dd3fc;
}

.ph-layers-menu:not(.hidden) {
  display: block;
}

.ph-map-tools-flyout {
  display: none;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: calc(100vw - 1.5rem);
  max-height: min(calc(100dvh - 7rem), 22rem);
}

.ph-map-tools-flyout:not(.hidden) {
  display: flex;
}

.ph-map-tools-flyout--sub-open {
  max-height: min(calc(100dvh - 7rem), 24rem);
}

.ph-map-tools-menu {
  width: 11.75rem;
  flex-shrink: 0;
  max-height: inherit;
  overflow-y: auto;
}

.ph-map-tools-subpanel {
  display: none;
  width: min(15rem, calc(100vw - 13.5rem));
  flex-shrink: 0;
  flex-direction: column;
  max-height: inherit;
  overflow: hidden;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  outline: 1px solid #e4e4e7;
}

.ph-map-tools-subpanel:not(.hidden) {
  display: flex;
}

.ph-map-tools-subpanel-pane {
  display: none;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.ph-map-tools-subpanel-pane:not(.hidden) {
  display: flex;
}

.ph-map-tools-subpanel-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border-bottom: 1px solid #f4f4f5;
  padding: 0.65rem 0.75rem;
}

.ph-map-tools-subpanel-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #18181b;
}

.ph-map-tools-subpanel-sub {
  margin-top: 0.125rem;
  font-size: 0.6875rem;
  color: #71717a;
}

.ph-map-tools-subpanel-close {
  margin-left: auto;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  color: #71717a;
  transition: background 0.15s ease, color 0.15s ease;
}

.ph-map-tools-subpanel-close:hover {
  background: #f4f4f5;
  color: #27272a;
}

.ph-map-tools-subpanel-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ph-map-tools-item--expandable .ph-map-tools-chevron {
  transition: transform 0.15s ease, color 0.15s ease;
}

.ph-map-tools-item--expandable[aria-expanded="true"] .ph-map-tools-chevron {
  transform: rotate(90deg);
  color: #10b981;
}

@media (max-width: 639px) {
  .ph-map-tools-flyout {
    flex-direction: column;
    max-height: min(calc(100dvh - 7rem), 70dvh);
  }

  .ph-map-tools-flyout--sub-open .ph-map-tools-menu {
    max-height: none;
    overflow: visible;
  }

  .ph-map-tools-subpanel {
    width: 11.75rem;
  }
}

.ph-map-tools-item {
  display: flex;
  width: 100%;
  cursor: pointer;
  align-items: center;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  border-radius: 0.6rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.ph-map-tools-item:hover {
  background: #f4f4f5;
}

.ph-map-tools-item.ph-insight-btn {
  position: relative;
}

.ph-map-tools-item--active,
.ph-map-tools-item.ph-insight-btn--active {
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}

.ph-layers-item {
  display: flex;
  cursor: pointer;
  align-items: center;
  gap: 0.55rem;
  border-radius: 0.6rem;
  padding: 0.45rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #27272a;
  transition: background 0.15s ease;
}

.ph-layers-item:hover {
  background: #f4f4f5;
}

.ph-layers-item:has(input:checked) {
  background: #eff6ff;
}

.ph-layers-checkbox {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  border-radius: 0.2rem;
  border-color: #7dd3fc;
  color: #0284c7;
}

.ph-map-icon-btn {
  position: relative;
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
}

.ph-map-icon-btn__label {
  display: none;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .ph-map-icon-btn {
    width: auto;
    min-width: 3rem;
    padding-inline: 0.9rem;
    gap: 0.45rem;
  }

  .ph-map-icon-btn__label {
    display: inline;
  }
}

.ph-map-icon-btn__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.ph-map-icon-btn--view-3d {
  background: #10b981;
  color: #fff;
  box-shadow: 0 4px 6px -1px rgb(16 185 129 / 0.25);
}

.ph-map-icon-btn--view-3d:hover {
  background: #059669;
}

.ph-map-icon-btn--satellite-on {
  background: #0ea5e9;
  color: #fff;
  box-shadow: 0 4px 6px -1px rgb(14 165 233 / 0.25);
}

.ph-map-icon-btn--satellite-on:hover {
  background: #0284c7;
}

#map-tools-toggle[aria-expanded="true"] {
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px #a7f3d0;
}

.ph-compass-svg {
  display: block;
}

.ph-compass-bezel {
  fill: url(#ph-compass-bezel);
  stroke: #475569;
  stroke-width: 0.6;
}

.ph-compass-face {
  fill: url(#ph-compass-face);
  stroke: #94a3b8;
  stroke-width: 0.85;
}

.ph-compass-ring-inner {
  fill: none;
  stroke: rgb(148 163 184 / 0.55);
  stroke-width: 0.75;
}

.ph-compass-ticks line {
  stroke: #64748b;
  stroke-width: 1.1;
  stroke-linecap: round;
  pointer-events: none;
}

.ph-compass-ticks line:first-child {
  stroke: #dc2626;
  stroke-width: 1.45;
}

.ph-compass-north {
  fill: url(#ph-compass-north-fill);
  stroke: #991b1b;
  stroke-width: 0.65;
  stroke-linejoin: round;
  pointer-events: none;
}

.ph-compass-n-stem {
  stroke: #b91c1c;
  stroke-width: 2.35;
  stroke-linecap: round;
  pointer-events: none;
}

.ph-compass-south {
  fill: #0f172a;
  stroke: #1e293b;
  stroke-width: 0.5;
  stroke-linejoin: round;
  pointer-events: none;
}

.ph-compass-s-stem {
  stroke: #0f172a;
  stroke-width: 2.35;
  stroke-linecap: round;
  pointer-events: none;
}

.ph-compass-pivot-outer {
  fill: #64748b;
  stroke: #334155;
  stroke-width: 0.75;
  pointer-events: none;
}

.ph-compass-pivot-inner {
  fill: #f8fafc;
  pointer-events: none;
}

.ph-compass-knob-wrap {
  pointer-events: none;
}

.ph-compass-knob {
  fill: #dc2626;
  stroke: #fff;
  stroke-width: 1.6;
}

.ph-compass-n-label {
  fill: #fff;
  font-size: 7px;
  font-weight: 800;
  font-family: ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
}

.ph-compass-knob-hit {
  fill: transparent;
  cursor: grab;
}

.ph-compass-knob-hit:active,
.ph-compass.is-dragging .ph-compass-knob-hit {
  cursor: grabbing;
}

.ph-map-loading .mapboxgl-marker:has(.ph-pin-wrap) {
  visibility: hidden !important;
  pointer-events: none !important;
}

::selection {
  background: rgb(16 185 129 / 0.25);
  color: #064e3b;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.ph-detail-price-row {
  min-height: 2.75rem;
}

.ph-streetview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #e4e4e7;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
  line-height: 0;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.ph-streetview-btn.hidden {
  display: none;
}

.ph-streetview-btn:hover {
  background: #fffbeb;
  border-color: #fcd34d;
  box-shadow: 0 2px 8px rgb(249 171 0 / 0.22);
  transform: translateY(-1px);
}

.ph-streetview-btn:active {
  transform: translateY(0);
}

.ph-streetview-icon {
  display: block;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.12));
}

.ph-detail-panel {
  max-height: 0;
  overflow: hidden;
}

.ph-detail-panel__inner {
  opacity: 0;
  transform: translateY(-6px);
  transition:
    opacity 0.85s ease,
    transform 0.85s ease;
}

.ph-detail-panel__inner--visible {
  opacity: 1;
  transform: translateY(0);
}

.ph-detail-more {
  overflow: hidden;
}

.ph-detail-action-row .ph-detail-more-toggle {
  white-space: nowrap;
}

.ph-detail-more-panel--links {
  background: rgb(240 253 250 / 0.95);
  box-shadow: inset 0 0 0 1px rgb(153 246 228 / 0.9);
  border-color: rgb(153 246 228 / 0.75);
}

.ph-detail-more-panel--more {
  background: rgb(236 253 245 / 0.95);
  box-shadow: inset 0 0 0 1px rgb(167 243 208 / 0.9);
  border-color: rgb(167 243 208 / 0.75);
}

.ph-detail-more--more {
  background: rgb(236 253 245 / 0.95);
  box-shadow: inset 0 0 0 1px rgb(167 243 208 / 0.9);
}

.ph-detail-more--more .ph-detail-more-toggle {
  color: #064e3b;
}

.ph-detail-more--more .ph-detail-more-toggle:hover {
  background: rgb(209 250 229 / 0.85);
}

.ph-detail-more--more .ph-detail-more-icon {
  color: #059669;
}

.ph-detail-more--more .ph-detail-more-panel,
.ph-detail-more-panel--more {
  border-color: rgb(167 243 208 / 0.75);
}

.ph-detail-more--links {
  background: rgb(240 253 250 / 0.95);
  box-shadow: inset 0 0 0 1px rgb(153 246 228 / 0.9);
}

.ph-detail-more--links .ph-detail-more-toggle {
  color: #134e4a;
}

.ph-detail-more--links .ph-detail-more-toggle:hover {
  background: rgb(204 251 241 / 0.85);
}

.ph-detail-more--links .ph-detail-more-icon {
  color: #0d9488;
}

.ph-detail-more--links .ph-detail-more-panel,
.ph-detail-more-panel--links {
  border-color: rgb(153 246 228 / 0.75);
}

.ph-detail-more-icon {
  display: inline-block;
  transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ph-detail-more-icon.ph-detail-more-icon--open {
  transform: rotate(45deg);
}

.ph-detail-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.ph-popup-brand-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(to right, #047857, #059669, #0d9488);
  color: #fff;
}

.ph-popup-brand-header__main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: flex-start;
  gap: 0.75rem;
}

.ph-popup-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.ph-popup-brand-logo--sm {
  width: 44px;
  height: 44px;
}

.ph-popup-brand-logo--lg {
  width: 52px;
  height: 52px;
}

.ph-popup-brand-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}

.ph-popup-brand-subtitle {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  line-height: 1.25;
  color: rgb(209 250 229 / 0.92);
}

.ph-popup-brand-close {
  color: rgb(209 250 229);
}

.ph-popup-brand-close:hover {
  background: rgb(255 255 255 / 0.15);
  color: #fff;
}

.ph-map-popup {
  overflow: hidden;
  min-width: 10rem;
}

.ph-map-popup__body {
  padding: 0.65rem 0.75rem 0.75rem;
}

.ph-map-popup .ph-popup-brand-header {
  padding: 0.45rem 0.65rem;
  gap: 0.5rem;
}

.ph-map-popup .ph-popup-brand-header__main {
  gap: 0.5rem;
}

.ph-map-popup .ph-popup-brand-logo {
  width: 28px;
  height: 28px;
}

.ph-map-popup .ph-popup-brand-title {
  font-size: 0.72rem;
}

.ph-map-popup .ph-popup-brand-subtitle {
  font-size: 0.625rem;
}

@media (prefers-reduced-motion: reduce) {
  .ph-compass {
    transition: none;
  }

  .ph-compass:hover,
  .ph-compass.is-dragging {
    transform: none;
  }

  .ph-detail-panel {
    transition: none !important;
  }

  .ph-detail-panel__inner,
  .ph-detail-panel__inner--visible {
    transition: none;
    transform: none;
    opacity: 1;
  }

  .ph-detail-more-icon {
    transition: none;
  }

  .ph-poi-pin--preview-pop,
  .ph-poi-pin--spawn {
    animation: none;
  }
}

.ph-insight-btn--active {
  background: rgb(240 249 255 / 0.98);
  box-shadow:
    0 0 0 2px rgb(14 165 233 / 0.35),
    0 4px 14px rgb(15 23 42 / 0.12);
}

.ph-insight-btn--loading {
  opacity: 0.85;
}

.ph-insight-btn--loading::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 2px solid transparent;
  border-top-color: rgb(14 165 233 / 0.75);
  animation: ph-insight-spin 0.8s linear infinite;
}

.ph-insight-btn--error {
  box-shadow: 0 0 0 2px rgb(239 68 68 / 0.4);
}

.ph-insight-btn--ready:not(.ph-insight-btn--active)::before {
  content: "";
  position: absolute;
  right: 2px;
  top: 2px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgb(16 185 129);
  box-shadow: 0 0 0 2px rgb(255 255 255);
}

.ph-police-helmet-icon {
  flex-shrink: 0;
}

.ph-police-helmet-icon use {
  color: inherit;
}

.ph-insight-modal-panel {
  animation: ph-insight-panel-in 0.2s ease-out;
}

@keyframes ph-insight-panel-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ph-insight-spin {
  to {
    transform: rotate(360deg);
  }
}

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  z-index: 5;
}

/* Minimal Mapbox branding — bottom-right logo + compact attribution with hover tooltip */
.mapboxgl-ctrl-bottom-right {
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

a.mapboxgl-ctrl-logo {
  width: 58px;
  height: 16px;
  margin: 0;
  opacity: 0.88;
  transform: scale(1);
  transform-origin: bottom right;
  filter: drop-shadow(0 1px 2px rgb(255 255 255 / 0.85));
}

.ph-mapbox-attrib.mapboxgl-ctrl-attrib {
  margin: 0;
  padding: 0;
  min-height: 0;
  background: rgb(255 255 255 / 0.9);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgb(15 23 42 / 0.12);
  backdrop-filter: blur(6px);
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 999px;
  background-color: transparent;
  background-size: 14px 14px;
  opacity: 0.75;
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button:hover,
.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button:focus-visible {
  opacity: 1;
  outline: none;
  box-shadow: 0 0 0 2px rgb(16 185 129 / 0.35);
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner {
  display: block !important;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: min(300px, calc(100vw - 32px));
  padding: 8px 10px;
  background: rgb(255 255 255 / 0.97);
  border-radius: 10px;
  box-shadow: 0 4px 18px rgb(15 23 42 / 0.14);
  font-size: 10px;
  line-height: 1.45;
  color: #475569;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 2;
  white-space: normal;
}

/* Collapse default expanded attribution — tooltip on hover/click instead */
.ph-mapbox-attrib:not(.mapboxgl-compact) .mapboxgl-ctrl-attrib-inner {
  display: none !important;
}

.ph-mapbox-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner a {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ph-mapbox-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner,
.ph-mapbox-attrib.mapboxgl-compact:focus-within .mapboxgl-ctrl-attrib-inner,
.ph-mapbox-attrib.mapboxgl-compact.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Search centre — area label + location pin above price pins, below popups */
.ph-search-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.ph-search-area-label {
  position: relative;
  margin-bottom: 6px;
  max-width: min(220px, 70vw);
  padding: 7px 12px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.97);
  box-shadow: 0 4px 16px rgb(15 23 42 / 0.18);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  color: #064e3b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.ph-center-flag {
  position: relative;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.35));
}

.ph-search-center-marker {
  z-index: 400 !important;
  pointer-events: none !important;
}

.ph-search-center-marker * {
  pointer-events: none !important;
}

.ph-search-center-marker.is-hidden {
  visibility: hidden !important;
  pointer-events: none !important;
}

.mapboxgl-marker:has(.ph-pin-wrap) {
  z-index: 100 !important;
}

.mapboxgl-marker:has(.ph-school-wrap),
.mapboxgl-marker:has(.ph-poi-wrap) {
  z-index: 120 !important;
}

.mapboxgl-marker:has(.ph-pin--active) {
  z-index: 800 !important;
}

.ph-pin-wrap {
  cursor: pointer;
  z-index: 1;
}

.ph-pin {
  position: relative;
  display: inline-flex;
  align-items: center;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  background: #10b981;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  outline: 2px solid #6ee7b7;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, outline-color 0.15s ease;
}

.ph-pin-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.ph-type-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  isolation: isolate;
}

.ph-type-icon-box--detail {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

.ph-type-icon {
  width: 0.8125rem;
  height: 0.8125rem;
  flex-shrink: 0;
  pointer-events: none;
}

.ph-type-icon-box--detail .ph-type-icon {
  width: 1.0625rem;
  height: 1.0625rem;
}

.ph-type-icon--flat {
  color: #0284c7;
}

.ph-type-icon--flat path {
  stroke: #0284c7;
}

.ph-type-icon--house {
  color: #b45309;
}

.ph-type-icon--house path {
  stroke: #b45309;
}

.ph-type-icon--terrace {
  width: 1rem;
  height: 0.6875rem;
  color: #ea580c;
}

.ph-type-icon--terrace path {
  fill: #ea580c;
  stroke: none;
}

.ph-type-icon-box--detail .ph-type-icon--terrace {
  width: 1.25rem;
  height: 0.8125rem;
}

.ph-pin--active {
  background: #ef4444;
  outline: 2px solid #fca5a5;
  transform: scale(1.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.ph-pin-arrow {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  background: #10b981;
  transform: rotate(45deg);
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.ph-pin-arrow--active {
  background: #ef4444;
}

.ph-school-wrap,
.ph-poi-wrap {
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
}

.ph-school-pin,
.ph-poi-pin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--poi-color, #0ea5e9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  outline: 2px solid var(--poi-ring, #7dd3fc);
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ph-school-icon,
.ph-poi-icon {
  width: 1.125rem;
  height: 1.125rem;
  color: #fff;
  stroke: #fff;
  pointer-events: none;
}

.ph-school-pin-arrow,
.ph-poi-pin-arrow {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  background: var(--poi-color, #0ea5e9);
  transform: rotate(45deg);
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.ph-school-pin--active,
.ph-poi-pin--active {
  transform: scale(1.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  filter: brightness(0.92);
}

.ph-poi-preview-wrap {
  pointer-events: none;
}

.ph-poi-pin--preview-pop {
  animation: ph-poi-preview-pop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.ph-poi-pin--preview-pop .ph-poi-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.ph-poi-pin--spawn {
  animation: ph-poi-spawn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ph-poi-preview-pop {
  0% {
    transform: scale(0.2);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
  80% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

@keyframes ph-poi-spawn {
  0% {
    transform: scale(0.15);
    opacity: 0;
  }
  65% {
    transform: scale(1.18);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.ph-school-pin--active .ph-school-pin-arrow,
.ph-school-pin--active .ph-poi-pin-arrow,
.ph-poi-pin--active .ph-poi-pin-arrow {
  filter: brightness(0.92);
}

.mapboxgl-popup.school-hover-popup,
.mapboxgl-popup.poi-hover-popup {
  z-index: 9000 !important;
}

.mapboxgl-popup.school-detail-popup,
.mapboxgl-popup.poi-detail-popup {
  z-index: 9100 !important;
}

.mapboxgl-popup.school-detail-popup .mapboxgl-popup-content,
.mapboxgl-popup.poi-detail-popup .mapboxgl-popup-content {
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.3);
}

.ph-school-detail .ph-popup-brand-header {
  padding: 0.55rem 0.75rem;
}

.ph-school-detail .ph-popup-brand-logo {
  width: 30px;
  height: 30px;
}

.ph-school-detail-feature-header {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.95rem;
  color: #fff;
}

.ph-school-detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.ph-school-detail-icon svg {
  width: 1.125rem;
  height: 1.125rem;
  stroke: #fff;
  color: #fff;
}

.ph-school-detail-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.ph-school-detail-meta {
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.88);
}

.ph-school-detail-body {
  padding: 0.65rem 0.95rem 0.25rem;
}

.ph-school-detail-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.35rem 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f4f4f5;
  font-size: 0.75rem;
}

.ph-school-detail-row:last-child {
  border-bottom: none;
}

.ph-school-detail-label {
  color: #71717a;
  font-weight: 600;
}

.ph-school-detail-value {
  color: #27272a;
  margin: 0;
  word-break: break-word;
}

.ph-school-detail-link {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
}

.ph-school-detail-link:hover {
  text-decoration: underline;
}

.ph-school-detail-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.55rem 0.95rem 0.75rem;
  border-top: 1px solid #f4f4f5;
}

.ph-school-detail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid #e4e4e7;
  background: #fff;
  color: #27272a;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ph-school-detail-btn:hover {
  background: #f4f4f5;
  text-decoration: none;
}

.ph-school-detail-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.ph-school-detail-btn--accent {
  border-color: #bae6fd;
  background: #f0f9ff;
  color: #0369a1;
}

.ph-school-detail-btn--accent:hover {
  background: #e0f2fe;
}

.ph-school-detail-source {
  margin: 0;
  padding: 0 0.95rem 0.75rem;
  font-size: 0.65rem;
  color: #a1a1aa;
}

.mapboxgl-popup.property-hover-popup {
  z-index: 9000 !important;
}

.mapboxgl-popup.property-hover-popup .mapboxgl-popup-content {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

.mapboxgl-popup.poi-hover-popup .mapboxgl-popup-content {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

.modal-open .map-interactive-off {
  pointer-events: none;
}

/* Map pick mode — fixed location pin while panning */
.ph-map-pick-flag-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -100%);
  pointer-events: none;
  z-index: 1;
}

.ph-map-pick-flag-anchor .ph-center-flag {
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.35));
}

/* Cookie consent splash */
.ph-cookie-splash__panel {
  animation: ph-splash-in 0.35s ease-out;
}

.ph-cookie-splash__body {
  -webkit-overflow-scrolling: touch;
}

.ph-cookie-splash__footer {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

@keyframes ph-splash-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ph-premium-tab {
  color: #64748b;
  background: transparent;
}

.ph-premium-tab--active {
  color: #065f46;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
}

body.ph-premium-open {
  overflow: hidden;
}

body.ph-install-help-open {
  overflow: hidden;
}
