/* Navigation desktop chrome is 110% of the previous .9 density (.9 * 1.1 = .99).
   Scale UI groups, not the map canvas: map coordinates and viewport stay native.
   Keep the touch layout and its existing breakpoints unchanged. */
@media (min-width: 1101px) {
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper {
    --dt-desktop-density: .99;
  }

  /* The icon rail, account and fullscreen controls keep their shared native size. */
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-navigation-route :is(
    .dt-map-search, .overlay.left, .overlay.right,
    .dt-voyage-strip, .dt-environment-handle
  ) {
    zoom: var(--dt-desktop-density);
  }

  /* Both map pages use the same layer-card scale independently of side panels. */
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper:is(.dt-navigation-route, .dt-dashboard-route) .layer-switcher-wrapper {
    zoom: var(--dt-desktop-density);
  }

  /* Drawer heights use bounding rectangles; timeline heights use offsetHeight.
     Convert each measurement to the scaled panel layout coordinates once. */
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-navigation-route .map {
    --dt-side-information-limit: calc((100dvh - var(--vs-height, 62px) * var(--dt-desktop-density) - 88px * var(--dt-desktop-density)) / var(--dt-desktop-density));
  }
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-navigation-route .map .overlay.right.dt-environment-drawer {
    height: calc(var(--dt-side-information-height, 0px) / var(--dt-desktop-density)) !important;
    max-height: var(--dt-side-information-limit) !important;
  }
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-navigation-route .map[data-side-information-stage=weather] .overlay.right.dt-environment-drawer {
    height: auto !important;
  }
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-navigation-route .dt-environment-handle {
    right: calc(var(--dt-environment-handle-right, 400px) / var(--dt-desktop-density));
    top: calc(var(--dt-environment-handle-top, 86px) / var(--dt-desktop-density));
  }
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-navigation-route .map[data-side-information-collapsed=true] .dt-environment-handle {
    right: 0;
  }
}

/* Dashboard side panels keep their 90% density; shared chrome stays consistent. */
@media (min-width: 1101px) {
  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-dashboard-route {
    --dt-dashboard-density: .9;
  }

  body:not(.dt-mobile-navigation):not(.dt-mobile-shell) #app .app-wrapper.dt-dashboard-route :is(
    .dt-map-search, .overlay.left, .overlay.right, .overlay.bottom
  ) {
    zoom: var(--dt-dashboard-density);
  }
}
