/* Atlas 17.2 — GTA VI Community Research map usability. No data or rendering changes. */
body.j119-research .workspace{height:calc(100dvh - 125px)!important;min-height:570px!important}
body.j119-research .maparea{min-width:0;min-height:0;background:#38234b!important}
/* Yanis V18 colors are already finished artwork. Do not wash them out. */
body.j119-research .maparea #map{filter:none}
body.j119-research .maparea.j172-bright-map #map{filter:brightness(1.12) contrast(1.02)}
body.j119-research .maparea .pill{background:#2c1a40ed;border:1px solid #d5a4bd;color:#ffe6f0;font-size:12px}
body.j119-research .maparea .controls{right:12px;top:18px;z-index:7}
body.j119-research .maparea .controls button{width:48px;height:47px;min-height:47px;border:1px solid #e7bf95;background:#3d244c;color:#ffe4ac;font-size:23px}
body.j119-research .j172-tools{position:absolute;left:12px;bottom:89px;z-index:16;display:flex;flex-wrap:wrap;gap:7px;padding:6px;background:#22152ff3;border:1px solid #d7a8b9;border-radius:12px;box-shadow:0 9px 22px #050210ac}
body.j119-research .j172-tools button{min-height:44px;border:1px solid #efc395;background:#472b56;color:#ffe9bb;font:850 12px/1.3 system-ui;padding:9px 12px;border-radius:9px}
body.j119-research .j172-tools button[aria-pressed="true"]{background:linear-gradient(100deg,#ffdeac,#f1a66d);color:#291531}
body.j119-research .j172-tools button:focus-visible{outline:3px solid #ffe7ad;outline-offset:3px}
body.j119-research .maparea.j172-full-map{position:fixed!important;inset:0!important;height:100dvh!important;width:100vw!important;min-height:0!important;z-index:1800!important;border:2px solid #edbf94}
body.j119-research.j172-map-expanded{overflow:hidden!important}
body.j119-research .maparea.j172-full-map .mobileFilter{display:block!important;z-index:20!important}
body.j119-research.j172-map-expanded #rail.open{position:fixed!important;z-index:2100!important;top:0!important;bottom:0!important}
@media(max-width:870px){body.j119-research .workspace{height:calc(100dvh - 130px)!important;min-height:600px!important}}
@media(max-width:760px){
 body.j119-research .workspace{height:78dvh!important;min-height:580px!important;position:relative}
 body.j119-research .maparea{height:100%!important;min-height:580px}
 body.j119-research .maparea.j172-full-map{height:100dvh!important;min-height:0!important}
 body.j119-research .j172-tools{left:8px;top:125px;bottom:auto;max-width:calc(100% - 92px)}
 body.j119-research .j172-tools button{font-size:11px;padding:7px}
 body.j119-research .maparea .maptop{top:60px!important;left:10px}
 body.j119-research .maparea .pill{font-size:10px}
}
@media(max-width:390px){body.j119-research .j172-tools{max-width:calc(100% - 84px)}}
@media(prefers-reduced-motion:reduce){body.j119-research .j172-tools *{transition:none!important}}

/* Yanis V18 research: map Back stays reachable on narrow phones, including
   fullscreen, without changing source tiles, colors, or marker positions. */
body.j119-research .j172-tools #j172-back{
 background:#2b183e;color:#ffdfac;border-color:#f5c37c;
}
@media(max-width:760px){
 body.j119-research .j172-tools{max-width:calc(100% - 20px);right:8px}
 body.j119-research .j172-tools #j172-back{min-width:72px}
 body.j119-research .maparea.j172-full-map .j172-tools{
  top:max(12px,env(safe-area-inset-top));left:8px;right:8px;
 }
}

/* Atlas 22.4: browser-tested collision fix. The research action group
   previously sat at top:125px on phones and intercepted the native #home
   map-reset control. Dock it at the bottom, outside the zoom/reset stack. */
@media(max-width:760px){
 body.j119-research .maparea .j172-tools,
 body.j119-research .maparea.j172-full-map .j172-tools{
  top:auto!important;
  bottom:max(12px,env(safe-area-inset-bottom,0px))!important;
  left:8px!important;right:8px!important;
  width:max-content;max-width:calc(100% - 16px);
 }
}

/* Research map view selector: compact, outside the native zoom controls. */
body.j119-research .maparea .maptop{max-width:calc(100% - 76px);pointer-events:none}
body.j119-research .maparea .j4749-view-label{display:inline-flex;align-items:center;gap:6px;pointer-events:auto;max-width:100%;box-sizing:border-box}
body.j119-research .j4749-view-label select{min-width:0;max-width:100%;font:inherit;color:#ffe6b7;background:#291b3f;border:1px solid #bc92bc;border-radius:6px;padding:7px}
body.j119-research .maparea #home{font-size:15px}
body.j119-research .maparea #mapStatus{pointer-events:none}
@media(max-width:760px){body.j119-research .maparea .maptop{top:12px!important;left:8px;max-width:calc(100% - 78px);gap:5px}body.j119-research .maparea .j4749-view-label{flex-wrap:wrap}}

/* Map-first research entry, using the canonical menu host pattern from Cayo.
   Leave legacy nav visible when the canonical menu is unavailable. */
body.j119-research .top:has(#j132-nav-toggle)>nav{display:none!important}
body.j119-research .top #j216-inline-mount{margin-left:auto;display:flex;align-items:center;flex:0 0 auto}
body.j119-research .top #j216-inline-mount .j132-nav{position:static!important;inset:auto!important;margin:0!important}
body.j119-research .top .brand span{display:block!important;white-space:normal}
body.j119-research .j4749-research-details{margin:12px 8px;color:#ffe0a5;border:1px solid #9869a6;border-radius:12px;background:#2a193d}
body.j119-research .j4749-research-details>summary{padding:12px;cursor:pointer;min-height:44px;font-weight:800}
body.j119-research .j4749-research-details .jura-source-actions{border-top:1px solid #825094}
@media(max-width:760px){
 body.j119-research .top{padding:8px 12px;gap:8px;min-height:58px}
 body.j119-research .top .brand{flex:1;min-width:0}
 body.j119-research .top .brand b{font-size:13px}
 body.j119-research .top .brand small{font-size:8px;letter-spacing:.03em}
 body.j119-research .top #j216-inline-mount #j132-nav-toggle{min-height:44px;padding:8px 12px;font-size:12px}
 body.j119-research .maparea .maptop{top:62px!important}
 body.j119-research .maparea .mobileFilter{top:10px;left:8px;min-height:44px}
 body.j119-research .maparea .j172-tools,
 body.j119-research .maparea.j172-full-map .j172-tools{bottom:max(100px,calc(env(safe-area-inset-bottom,0px) + 100px))!important}
 body.j119-research .maparea .evidence{bottom:40px;max-width:calc(100% - 14px);pointer-events:none}
 body.j119-research .maparea .mapcredit{bottom:5px;max-width:calc(100% - 12px);line-height:1.4}
}

/* Evidence belongs in the normal page flow, not above map controls. Day imagery
   is in-game artwork; the research pins, not every basemap, are provisional. */
body.j119-research #researchConfidence{background:#2b193b;color:#ffe0a5;border-bottom:1px solid #c19b75;padding:6px 12px;font:750 11px/1.4 system-ui;text-align:center}
