/* FieldGrade Online 1.01.19 — map-first mobile layout. */
@media(max-width:760px){
 html:has(body.fg-ready),body.fg-ready{height:100%!important;max-height:100%!important;overflow:hidden!important;overscroll-behavior:none}
 body.fg-ready{height:100dvh!important;max-height:100dvh!important}
 body.fg-ready #app,body.fg-ready.left-closed #app,body.fg-ready.right-closed #app,body.fg-ready.left-closed.right-closed #app{
  display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;
  height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important;
  padding-bottom:calc(58px + env(safe-area-inset-bottom,0px))!important;
 }
 body.fg-ready .topbar{flex:none!important;display:flex;flex-wrap:nowrap!important;min-height:52px!important;height:52px!important;padding:5px 9px!important;gap:6px!important;overflow:visible;z-index:900}
 body.fg-ready .brand{min-width:0!important;max-width:48%;flex:none}
 body.fg-ready .brand-icon{width:29px;height:29px;flex:none}
 body.fg-ready .brand strong{font-size:14px!important}
 body.fg-ready .brand small{display:none!important}
 body.fg-ready .top-actions{margin-left:auto;min-width:0;gap:4px}
 body.fg-ready .top-actions #sourcePill{display:none!important}
 body.fg-ready .top-actions #saveProject{padding:8px 10px!important;font-size:11px!important;white-space:nowrap}
 body.fg-ready .topsearch{display:none!important}
 body.fg-ready.fg-mobile-search-open .topsearch{display:flex!important;position:absolute;top:52px;left:0;right:0;order:unset;max-width:none;z-index:1000;padding:9px;background:#102632;box-shadow:0 8px 22px #0008}
 body.fg-ready .workflow-bar{display:none!important}
 body.fg-ready .map-wrapper{position:relative!important;display:block!important;grid-row:auto!important;order:unset!important;flex:1 1 auto!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;overflow:hidden!important}
 body.fg-ready #map{height:100%!important;min-height:0!important}
 body.fg-ready .left,body.fg-ready .right{
  position:fixed!important;top:auto!important;left:0!important;right:0!important;
  bottom:calc(58px + env(safe-area-inset-bottom,0px))!important;
  width:100%!important;min-width:0!important;max-width:none!important;
  height:min(61dvh,620px)!important;max-height:min(61dvh,620px)!important;
  display:block;overflow-y:auto!important;overscroll-behavior:contain!important;
  border:1px solid #466673!important;border-radius:16px 16px 0 0!important;
  box-shadow:0 -12px 34px #0009!important;z-index:1050!important;background:#112734!important;
  -webkit-overflow-scrolling:touch;
 }
 body.fg-ready .left[hidden],body.fg-ready .right[hidden]{display:none!important}
 body.fg-ready .left::before,body.fg-ready .right::before{
  content:"";position:sticky;display:block;top:0;margin:7px auto 2px;width:42px;height:4px;border-radius:10px;background:#6b8c95;z-index:11;
 }
 body.fg-ready .pane-tabs{top:0;z-index:12}
 body.fg-ready .function-nav{top:0}
 body.fg-ready .map-tools{top:8px!important;left:8px!important;right:8px!important;width:calc(100% - 16px);max-width:none!important;display:flex!important;flex-wrap:nowrap!important;gap:4px!important;overflow-x:auto!important;scrollbar-width:none;padding:5px!important;border-radius:9px!important}
 body.fg-ready .map-tools::-webkit-scrollbar{display:none}
 body.fg-ready .map-tools button{flex:none!important;min-height:39px!important;padding:8px 10px!important;font-size:11px!important;white-space:nowrap}
 body.fg-ready .map-view-tools{right:10px!important;bottom:60px!important}
 body.fg-ready .map-view-tools button{min-height:40px!important;min-width:40px!important}
 body.fg-ready .map-note{max-width:min(70%,300px)!important;bottom:16px!important;left:8px!important}
 body.fg-ready .map-legend{bottom:22px!important;width:125px!important;right:8px!important}
 body.fg-ready .draw-toast{top:58px!important;width:calc(100% - 16px)!important;max-height:170px;overflow-y:auto;flex-wrap:wrap}
 body.fg-ready .draw-toast button{min-height:38px}
 body.fg-ready #operationProgress{top:64px}
 body.fg-ready #mapWelcome{max-width:calc(100% - 32px)}
 body.fg-ready .profile-panel{left:8px!important;right:8px!important;width:auto!important;bottom:calc(64px + env(safe-area-inset-bottom,0px))!important;max-height:60dvh!important;z-index:1200!important}
 body.fg-ready .fg-mobile-nav{
  display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));
  position:fixed;bottom:0;left:0;right:0;z-index:1400;
  height:calc(58px + env(safe-area-inset-bottom,0px));
  padding:4px 4px calc(3px + env(safe-area-inset-bottom,0px));
  gap:2px;background:#0c2330;border-top:1px solid #46616b;
  box-shadow:0 -4px 14px #0007;
 }
 .fg-mobile-nav button{appearance:none;border:0;background:transparent;color:#bbd0d9;border-radius:8px;min-width:0;padding:5px 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font:600 9px/1.1 system-ui;touch-action:manipulation}
 .fg-mobile-nav button .fg-mobile-symbol{font-size:18px;line-height:1.1}
 .fg-mobile-nav button[aria-pressed=true]{background:#274c47;color:#d3f6dc}
 .fg-mobile-nav button:focus-visible{outline:2px solid #9be0cc}
}
@media(min-width:761px){.fg-mobile-nav{display:none!important}}
