/* Atlas 18.5 / Cayo final polish. This is a Cayo-only enhancement layer. */
body.j180-cayo.j185-cayo-polished .j185-pan{
 font-size:21px!important;display:grid!important;place-items:center!important;
}
body.j180-cayo.j185-cayo-polished .j185-pan[aria-pressed=true]{
 background:#f5cd94!important;color:#281632!important;
 border-color:#fff0ba!important
}
body.j180-cayo.j185-cayo-polished .j185-source-status{
 display:inline-block;font:900 10px/1.3 system-ui;letter-spacing:.03em;
 color:#ffe1a3;border:1px solid #b68f89;border-radius:5px;
 padding:3px 6px;margin-right:8px;background:#2d1c3b
}
body.j180-cayo.j185-cayo-polished .j180-map-area .j180-pin-info{
 position:fixed!important;
 inset:auto max(14px,env(safe-area-inset-right,14px)) max(16px,env(safe-area-inset-bottom,16px)) auto!important;
 width:min(380px,calc(100vw - 30px))!important;
 max-height:48dvh!important;overflow:auto!important;
 z-index:99998!important;
 background:#261534f5!important;
 box-shadow:0 15px 38px #07030fe0!important;
}
body.j180-cayo.j185-cayo-polished .j180-map-area .j180-pin-info:focus{
 outline:2px solid #ffe4b1!important;outline-offset:2px!important
}
body.j180-cayo.j185-cayo-polished .j185-legend-toggle{display:none}
body.j180-cayo.j185-cayo-polished .j180-map-area .j167-viewport{
 min-height:0!important;height:auto!important;
 aspect-ratio:1284/1262!important
}
/* Map pixels and map markers share the same image-space transform. Do not
   stretch a near-square island raster into a long rectangular viewport. */
body.j180-cayo.j185-cayo-polished .j180-map-area .j167-world{
 background-size:100% 100%!important
}
@media(max-width:590px){
 body.j180-cayo.j185-cayo-polished .j180-legend{
  max-height:none!important;overflow:visible!important;
  padding:9px 11px!important
 }
 body.j180-cayo.j185-cayo-polished .j180-legend h3{
  margin-bottom:2px!important;font-size:16px!important
 }
 body.j180-cayo.j185-cayo-polished .j185-legend-toggle{
  display:block!important;min-height:38px!important;
  width:100%;padding:8px 10px!important;margin:5px 0 1px;
  background:#442950!important;border:1px solid #d9a97d!important;
  border-radius:8px!important;color:#ffe9c9!important;
  font:800 12px system-ui!important;text-align:left!important;
  cursor:pointer
 }
 body.j180-cayo.j185-cayo-polished .j180-legend:not(.j185-open) .j180-legend-rows{
  display:none!important
 }
 body.j180-cayo.j185-cayo-polished .j180-legend:not(.j185-open) .j180-legend-foot{
  display:none!important
 }
 body.j180-cayo.j185-cayo-polished .j180-legend.j185-open .j180-legend-rows{
  display:grid!important
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area .j180-map-controls{
  display:flex!important;align-items:center;justify-content:flex-end;
  top:52px!important;right:7px!important;gap:5px!important;
  max-width:calc(100% - 14px)!important;width:auto!important;
  z-index:24!important
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area .j180-tool{
  min-width:35px!important;min-height:35px!important;
  padding:5px!important;font-size:17px!important
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area .j180-pin-info{
  width:calc(100vw - 24px)!important;
  right:12px!important;bottom:max(12px,env(safe-area-inset-bottom,12px))!important;
  max-height:42dvh!important
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area .j167-viewport{
  min-height:0!important;height:auto!important;aspect-ratio:1284/1262!important
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area{
  min-height:0!important
 }
}
@media(prefers-reduced-motion:reduce){
 body.j180-cayo.j185-cayo-polished .j167-world{transition:none!important}
}

/* Crowded Cayo reference icons: the selected marker remains at the sourced
   position; players can choose an individual target from the overlapping
   group instead of being sent to a different object. */
body.j180-cayo.j185-cayo-polished .j185-cluster-choices{
 display:grid;grid-template-columns:1fr;gap:6px;
 margin-top:10px;max-height:min(32dvh,290px);overflow:auto;
}
body.j180-cayo.j185-cayo-polished .j185-cluster-choice{
 min-height:40px!important;width:100%;padding:9px 11px!important;
 text-align:left!important;color:#ffe5bf!important;
 background:#493059!important;border:1px solid #9f7ca8!important;
 border-radius:8px!important;font:750 12px/1.4 system-ui!important;
 cursor:pointer;
}
body.j180-cayo.j185-cayo-polished .j185-cluster-choice:focus-visible,
body.j180-cayo.j185-cayo-polished .j185-cluster-choice:hover{
 border-color:#ffe5ad!important;outline:2px solid #ffe5ad!important;
 outline-offset:1px!important;background:#694177!important;
}

/* Remove old floating sitewide duplicates from ONLY the completed Cayo
   workspace. The real responsive header navigation stays intact and contains
   Home, All Maps, Heist HQ, Credits, Garage and Dispatch. Fixed overlays
   previously obscured the island map search and the mission action menu. */
body.j180-cayo.j185-cayo-polished #j89-shell,
body.j180-cayo.j185-cayo-polished #j98-flow{
 display:none!important
}

/* The actively maintained All Pages drawer (Atlas 13.2) belongs in normal
   page flow ON CAYO, after its footer. Do not hide it: players retain the
   searchable global page directory, but its floating trigger can no longer
   obscure the Cayo workspace search, legend or zoom controls on desktop. */
body.j180-cayo.j185-cayo-polished .j132-nav{
 position:relative!important;top:auto!important;right:auto!important;
 bottom:auto!important;left:auto!important;
 width:max-content!important;max-width:calc(100% - 24px)!important;
 margin:14px 12px 25px auto!important;
 z-index:2147483000!important
}
body.j180-cayo.j185-cayo-polished .j132-nav #j132-nav-drawer{
 position:fixed!important;top:auto!important;
 bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
 right:12px!important;left:12px!important;
 width:auto!important;max-width:min(560px,calc(100vw - 24px))!important;
 margin:0 0 0 auto!important;max-height:min(80dvh,670px)!important
}

/* Mobile fit: reserve toolbar space above the map, never over offshore pins.
   Preserve the calibrated raster aspect ratio and common marker transform. */
@media(max-width:590px){
 body.j180-cayo.j185-cayo-polished main.wrap{padding-inline:4px!important}
 body.j180-cayo.j185-cayo-polished .j180-map-frame{
  grid-template-columns:minmax(0,1fr)!important;
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area .j180-map-controls{
  position:relative!important;inset:auto!important;max-width:none!important;
  width:100%!important;box-sizing:border-box;flex-wrap:wrap;
  justify-content:center!important;gap:4px!important;
  padding:5px;background:#1b152c;border-bottom:1px solid #b987a3;
  z-index:auto!important;
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area .j180-tool{
  min-width:44px!important;min-height:44px!important;
 }
 body.j180-cayo.j185-cayo-polished .j180-map-area .j167-focus{height:auto!important}
 body.j180-cayo.j185-cayo-polished .j180-map-area .j167-toolbar{
  padding-right:10px!important;
 }
 body.j180-cayo.j185-cayo-polished .j180-map-frame.j180-expanded{
  grid-template-columns:minmax(0,1fr)!important;
  height:100dvh;
 }
}
