/* One geometry model for Safari and installed iOS apps. No palette overrides. */
:root {
  --pt-safe-top: env(safe-area-inset-top, 0px);
  --pt-safe-right: env(safe-area-inset-right, 0px);
  --pt-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pt-safe-left: env(safe-area-inset-left, 0px);
  --pt-viewport-height: 100vh;
}
@supports(height:100dvh) { :root { --pt-viewport-height:100dvh; } }
@media(max-width:768px), (max-height:500px) and (max-width:1024px) {
  :root { --sidebar-current-width:0px; --pt-header-height:calc(56px + var(--pt-safe-top)); --pt-nav-space:calc(76px + var(--pt-safe-bottom)); --pt-sheet-height:calc(var(--pt-viewport-height) - var(--pt-header-height) - var(--pt-nav-space) - 20px); }
  html,html.pwa-mode,body,body.pwa-mode { height:var(--pt-viewport-height)!important;min-height:0!important;max-height:var(--pt-viewport-height)!important;padding:0!important;margin:0!important;overflow:hidden; }
  body .header {
    top:0!important;left:0!important;right:0!important;
    width:100%!important;
    height:var(--pt-header-height)!important;min-height:var(--pt-header-height)!important;
    padding:var(--pt-safe-top) max(12px,var(--pt-safe-right)) 0 max(12px,var(--pt-safe-left))!important;
    box-sizing:border-box!important;transition:none!important;
    background:#0f172a!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  }
  body .header-left,body .header-right {height:56px!important;min-width:0;}
  body .main-container {
    top:var(--pt-header-height)!important;bottom:auto!important;
    height:calc(var(--pt-viewport-height) - var(--pt-header-height))!important;
    min-height:0!important;max-height:none!important;width:100%!important;
    padding:0!important;margin:0!important;
  }
  body .main-container .map-container,body .main-container #map {height:100%!important;min-height:0!important;top:0!important;bottom:0!important;}
  body .sidebar {position:fixed!important;right:0!important;width:min(300px,85vw)!important;transform:translateX(100%)!important;top:var(--pt-header-height)!important;bottom:var(--pt-nav-space)!important;height:auto!important;max-height:none!important;overflow-y:auto!important;}
  body .sidebar.show {transform:translateX(0)!important;}
  body .mobile-nav {
    display:flex!important;
    position:fixed!important;bottom:calc(var(--pt-safe-bottom) + 8px)!important;
    left:max(10px,var(--pt-safe-left))!important;right:max(10px,var(--pt-safe-right))!important;
    width:auto!important;height:60px!important;min-height:60px!important;max-height:60px!important;
    padding:0 8px!important;box-sizing:border-box!important;transform:none!important;margin:0!important;
    align-items:center!important;justify-content:space-around!important;z-index:1001!important;
    background:rgba(17,24,39,.9)!important;backdrop-filter:blur(20px)!important;
    border:1px solid var(--border-color)!important;border-radius:30px!important;
  }
  body .mobile-nav .nav-btn {height:52px!important;min-height:44px!important;background:none!important;border:0!important;display:flex!important;flex:1 1 0!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;color:var(--text-medium)!important;padding:4px!important;}
  body .mobile-nav .nav-btn.primary {width:48px!important;height:48px!important;min-height:48px!important;flex:0 0 48px!important;}
  body .mobile-nav .nav-btn.primary div {width:44px!important;height:44px!important;border-radius:14px!important;display:flex!important;align-items:center!important;justify-content:center!important;background:linear-gradient(135deg,var(--brand-color-1),var(--brand-color-2))!important;color:white!important;}
  body .mobile-nav .nav-btn span {font-size:10px!important;font-weight:500!important;}
  #navProfileText {max-width:64px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  #mobilePlaceSurface {position:absolute;inset:0;z-index:700;pointer-events:none;}
  #mobilePlaceSurface .custom-modern-saved-popup {
    position:absolute!important;top:10px!important;bottom:auto!important;
    left:max(10px,var(--pt-safe-left))!important;right:max(10px,var(--pt-safe-right))!important;
    width:auto!important;min-width:0!important;max-width:none!important;
    margin:0!important;transform:none!important;transition:none!important;pointer-events:auto;
  }
  #mobilePlaceSurface .leaflet-popup-tip-container {display:none!important;}
  #mobilePlaceSurface .leaflet-popup-content-wrapper {
    width:100%!important;height:auto!important;min-height:0!important;max-height:var(--pt-sheet-height)!important;
    box-sizing:border-box!important;overflow:hidden!important;
  }
  #mobilePlaceSurface .leaflet-popup-content {
    width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;min-height:0!important;max-height:var(--pt-sheet-height)!important;
    margin:0!important;overflow-x:hidden!important;overflow-y:auto!important;
    container-type:normal!important;box-sizing:border-box!important;
    -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  }
  #mobilePlaceSurface .saved-popup-card,
  #mobilePlaceSurface .saved-popup-card.no-gpx {
    width:100%!important;max-width:100%!important;min-width:0!important;
    height:auto!important;min-height:0!important;max-height:none!important;padding:12px!important;
  }
  #mobilePlaceSurface .saved-popup-top-bar {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:8px!important;}
  #mobilePlaceSurface .saved-popup-header-left {display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important;height:auto!important;overflow:visible!important;}
  #mobilePlaceSurface .saved-popup-header-right {display:flex!important;flex-wrap:wrap!important;justify-content:flex-end!important;height:auto!important;max-width:140px;}
  #mobilePlaceSurface .saved-popup-title {display:block!important;font-size:18px!important;line-height:1.3!important;height:auto!important;white-space:normal!important;overflow-wrap:anywhere;}
  #mobilePlaceSurface .saved-popup-close-btn {width:44px!important;height:44px!important;}
  #mobilePlaceSurface .saved-popup-weather-pill {height:30px!important;max-width:100%;padding:0 8px!important;}
  #mobilePlaceSurface .popup-weather-desc {display:none;}
  #mobilePlaceSurface .saved-popup-grid {height:auto!important;min-height:0!important;max-height:none!important;grid-auto-rows:auto!important;align-items:start!important;gap:10px!important;}
  #mobilePlaceSurface .saved-popup-grid.has-gpx {grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-areas:"media minimap" "info info"!important;}
  #mobilePlaceSurface .saved-popup-grid.no-gpx {grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"media" "info"!important;}
  #mobilePlaceSurface .saved-popup-info-col {min-width:0!important;width:100%!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;gap:10px!important;}
  #mobilePlaceSurface .saved-popup-media-col,#mobilePlaceSurface .saved-popup-minimap-col {height:140px!important;min-height:0!important;max-height:140px!important;min-width:0!important;overflow:hidden;}
  #mobilePlaceSurface .saved-popup-media-col > div,#mobilePlaceSurface .carousel,#mobilePlaceSurface .carousel-main,#mobilePlaceSurface .saved-popup-minimap-canvas {height:140px!important;min-height:0!important;max-height:140px!important;width:100%!important;}
  #mobilePlaceSurface .saved-popup-media-col img {max-width:100%;}
  #mobilePlaceSurface .saved-popup-stat-label {font-size:10px!important;}
  #mobilePlaceSurface .saved-popup-stat-val {font-size:15px!important;}
  #mobilePlaceSurface .saved-popup-desc {font-size:14px!important;line-height:1.5!important;max-height:84px!important;}
  #mobilePlaceSurface .saved-popup-actions {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;}
  #mobilePlaceSurface .saved-popup-actions a,#mobilePlaceSurface .saved-popup-actions button,#mobilePlaceSurface .saved-popup-memory-btn {min-width:0!important;min-height:44px!important;height:auto!important;padding:8px 4px!important;font-size:12px!important;white-space:normal!important;}
  #mobilePlaceSurface .saved-popup-actions-wrap {margin:0!important;}
  .leaflet-control-container .leaflet-bottom {bottom:var(--pt-nav-space)!important;}
  .leaflet-control-container .leaflet-top {top:8px!important;}
  dialog[open] {max-height:calc(var(--pt-viewport-height) - var(--pt-safe-top) - var(--pt-safe-bottom) - 16px)!important;}
  body .interactive-elevation-overlay,body .places-list-overlay,body .places-overview-overlay {
    top:var(--pt-safe-top)!important;bottom:var(--pt-safe-bottom)!important;
    height:calc(var(--pt-viewport-height) - var(--pt-safe-top) - var(--pt-safe-bottom))!important;
    max-height:calc(var(--pt-viewport-height) - var(--pt-safe-top) - var(--pt-safe-bottom))!important;
  }
}
