/* Shared map layout: footer after the entire workspace, not across controls. */
@media(max-width:820px){
 body.j128-map-chrome .shell{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;align-items:stretch!important}
 body.j128-map-chrome .shell>.sidebar:not(.mobile-collapsed){order:2!important;position:relative!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;flex:0 0 auto!important}
 body.j128-map-chrome .shell>.map-wrap{order:1!important;flex:0 0 auto!important;width:100%;min-width:0}
 body.j128-map-chrome>.j133-universal-footer{position:relative!important;inset:auto!important;clear:both!important;height:auto!important;min-height:0!important;margin:26px 0 0!important;z-index:1}
}
body.j128-map-chrome>.studio-site-note,body.j128-map-chrome .jura-brand-map{display:none!important}
body.j128-map-chrome .credits-line{flex-wrap:wrap!important;min-height:28px!important}
body.j128-map-chrome .j4723-legend-jump{display:block;width:100%;margin:8px 0;padding:10px;border:1px solid #ba8baf;border-radius:9px;background:#422650;color:#ffe1a8;font-weight:800;text-align:center;min-height:42px;text-decoration:none}
body.j128-map-chrome #j393-online-activity-slot{min-width:0;scroll-margin-top:12px}
body.j128-map-chrome #j393-online-activity-slot .j88-panel{margin:8px 0;padding:10px}
body.j128-map-chrome #j393-online-activity-slot .j88-results{max-height:460px}
body.j128-map-chrome #j393-online-activity-slot .j88-available-feed{background:#6b4c10;color:#ffea83}
body.j128-map-chrome #j393-online-activity-slot .j4723-current-locations{color:#ffe0a0;font-weight:750;overflow-wrap:anywhere}
@media(max-width:700px){
 body.j128-map-chrome:not([data-start-world="6"]) .map-actions{bottom:40px!important;max-width:calc(100% - 16px)}
 body.j128-map-chrome:not([data-start-world="6"]) #tileHealth{bottom:98px!important;max-width:48%!important;pointer-events:none}
 body.j128-map-chrome .j133-universal-footer .j131-social-grid button{min-height:44px}
}

/* 47.3.2: compact V/Online mobile entry. Keep fallback navigation if the searchable menu cannot initialize. No VI layout changes. */
.j4732-back-map{display:none}
@media(max-width:820px){
 body.j128-map-chrome:not([data-start-world="6"]):has(#j132-nav-toggle) .topbar{min-height:0!important;display:flex!important;flex-wrap:nowrap!important;gap:8px!important;padding:8px 10px!important;align-items:center!important}
 body.j128-map-chrome:not([data-start-world="6"]):has(#j132-nav-toggle) .topbar>.brand{flex:1 1 auto!important;min-width:0!important;gap:7px!important}
 body.j128-map-chrome:not([data-start-world="6"]):has(#j132-nav-toggle) .topbar>.brand b{font-size:15px!important;white-space:normal;line-height:1.15}
 body.j128-map-chrome:not([data-start-world="6"]):has(#j132-nav-toggle) .topbar>.brand small{font-size:9px!important;white-space:normal;line-height:1.2}
 body.j128-map-chrome:not([data-start-world="6"]):has(#j132-nav-toggle) .topbar>.brand .emblem{flex:0 0 34px}
 body.j128-map-chrome:not([data-start-world="6"]):has(#j132-nav-toggle) :is(.topbar>nav,#j369-site-tools>a,.j83-worldnav,#atlas90-catalog-shortcuts,.studio-quickbar,#j98-flow){display:none!important}
 body.j128-map-chrome:not([data-start-world="6"]):has(#j132-nav-toggle) #j369-site-tools{margin:0!important;flex:0 0 auto}
 body.j128-map-chrome .j4732-back-map{display:block;width:100%;min-height:44px;margin:8px 0;border:1px solid #d7af79;border-radius:8px;background:#39264b;color:#ffe4ad;font-weight:750}
 body.j128-map-chrome #atlasFilterDrawer{scroll-margin-top:8px}
 body.j128-map-chrome:not([data-start-world="6"]) .map-actions{bottom:44px!important}
}

/* Leonida: keep the three visible map actions in one row. The legacy two-column override causes a second row to overlap the research controls. */
@media(max-width:700px){
 body[data-start-world="6"] .map-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-width:none!important;}
 body[data-start-world="6"] .map-actions button{min-width:0!important;min-height:42px!important;white-space:normal!important;}
 body[data-start-world="6"] .map-actions button[hidden]{display:none!important;}
}

/* Cayo-style map-first mobile workspace: diagnostics below the map, never across Find/Filters/Today. */
#j4750-map-health-dock[hidden]{display:none!important}
@media(max-width:700px){
 body.j128-map-chrome .shell>#j4750-map-health-dock:not([hidden]){order:1!important;display:block;flex:0 0 auto;min-width:0;padding:5px 10px;background:#21152e;border-top:1px solid #79558b}
 body.j128-map-chrome #j4750-map-health-dock #tileHealth{position:static!important;inset:auto!important;transform:none!important;max-width:100%!important;width:auto!important;margin:0!important;padding:3px 0!important;border:0!important;border-radius:0!important;background:transparent!important;text-align:center;white-space:normal;overflow-wrap:anywhere;pointer-events:none}
}
