/* v9.3: Use one visual language for the Site Walk/Brief shell and main Fieldbook. */
#swOverlay .sw-header{display:flex;align-items:center;gap:12px;padding:10px clamp(12px,3vw,24px)!important;min-height:64px;background:color-mix(in srgb,var(--fb-nav,var(--sw-panel)) 91%,transparent)!important;border-bottom:1px solid var(--fb-edge,var(--sw-line));}
#swOverlay .fb93-sw-brand{display:flex;align-items:center;gap:9px;flex:0 0 auto;white-space:nowrap;color:var(--fb-ink,var(--sw-text));font-weight:700;font-size:16px;}
#swOverlay .fb93-sw-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--accent-soft,var(--sw-panel));color:var(--fb-accent,var(--sw-accent));font-size:20px;}
#swOverlay .fb93-sw-context{min-width:0;flex:1;}
#swOverlay .fb93-sw-context h2{font-size:clamp(14px,2vw,18px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;}
#swOverlay .fb93-sw-context small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#swOverlay .fb93-sw-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto;}
#swOverlay .fb93-sw-actions button{min-height:36px;padding:7px 10px;border-radius:10px;}
@media(max-width:950px){
 #swOverlay .fb75-sw-nav{display:flex!important;position:fixed!important;bottom:0;left:0;right:0;gap:0;z-index:30;justify-content:space-around;background:var(--fb-nav)!important;border-top:1px solid var(--fb-edge)!important;padding:7px 8px max(8px,env(safe-area-inset-bottom))!important;}
 #swOverlay .fb75-sw-nav button{width:20%!important;flex:1;min-width:0;min-height:49px!important;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;font-size:11px!important;color:var(--fb-dim)!important;border:0!important;background:transparent!important;border-radius:10px!important;}
 #swOverlay .fb75-sw-nav button span{font-size:20px;}
 #swOverlay .sw-workspace{height:calc(100dvh - 65px - env(safe-area-inset-bottom))!important;margin-bottom:auto;}
 #swOverlay .sw-body{padding-bottom:calc(90px + env(safe-area-inset-bottom))!important;}
 #swOverlay .sw-header{gap:7px!important;padding:8px 11px!important;}
 #swOverlay .fb93-sw-brand{font-size:13px;gap:5px;}
 #swOverlay .fb93-sw-mark{width:28px;height:28px;font-size:17px;}
 #swOverlay .fb93-sw-context h2{font-size:13px!important;}
 #swOverlay .fb93-sw-context small{font-size:10px;}
 #swOverlay .fb93-sw-actions button{padding:7px 8px!important;font-size:12px!important;}
 body.fb834-typing #swOverlay .fb75-sw-nav{display:none!important;}
 body.fb834-typing #swOverlay .sw-workspace{height:100dvh!important;}
}
@media(max-width:370px){#swOverlay .fb93-sw-brand strong{display:none}}

/* v9.4: the walk/brief overlay is a detail view, not a second Fieldbook shell.
   The old workspace-v90.css first-child flex rule made the added brand fill
   the header, squeezing the project title to a few characters per line. */
#swOverlay .sw-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-height:56px!important;box-sizing:border-box!important;overflow:hidden!important;background:var(--fb-nav,var(--sw-panel))!important;}
#swOverlay .sw-header>.fb93-sw-context:first-child{flex:1 1 auto!important;min-width:0!important;width:auto!important;max-width:100%!important;overflow:hidden!important;}
#swOverlay .fb93-sw-context>div{min-width:0!important;max-width:100%!important;}
#swOverlay .fb93-sw-context h2{display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;margin:0!important;font-size:clamp(15px,2.4vw,19px)!important;line-height:1.25!important;}
#swOverlay .fb93-sw-context small{display:block!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;line-height:1.4!important;margin-top:2px!important;}
#swOverlay .fb93-sw-actions{flex:0 0 auto!important;margin-left:auto!important;white-space:nowrap!important;min-width:0!important;}
#swOverlay .fb93-sw-brand{display:none!important;}
/* Keep the original main-app header from visually showing through the overlay. */
body:has(#swOverlay) .v6-head{visibility:hidden!important;}
@media(max-width:700px){#swOverlay .sw-header{padding:9px 12px!important;min-height:59px!important;}#swOverlay .fb93-sw-context h2{font-size:15px!important;}#swOverlay .fb93-sw-context small{font-size:11px!important;}#swOverlay .fb93-sw-actions button{min-height:38px!important;}}

/* v9.5: one real header element, moved between the app and Brief/Site Walk. */
body:has(#swOverlay) .v6-head{visibility:visible!important;}
#swOverlay{display:flex!important;flex-direction:column!important;align-items:stretch!important;}
#swOverlay > .v6-head{position:relative!important;flex:0 0 auto!important;width:100%!important;box-sizing:border-box!important;z-index:20!important;margin:0!important;}
#swOverlay > .sw-workspace{flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;margin:0!important;}
#swOverlay .sw-header{min-height:42px!important;padding:7px 14px!important;background:color-mix(in srgb,var(--fb-nav,var(--sw-panel)) 90%,transparent)!important;}
#swOverlay .fb93-sw-context h2{font-size:14px!important;}
#swOverlay .fb93-sw-context small{font-size:11px!important;}
#swOverlay .fb93-sw-actions .fb-sw-header-close{min-height:34px!important;}
@media(max-width:950px){
 #swOverlay > .sw-workspace{height:auto!important;min-height:0!important;margin-bottom:calc(62px + env(safe-area-inset-bottom))!important;}
 #swOverlay .fb75-sw-nav{flex:0 0 auto!important;}
 body.fb834-typing #swOverlay > .sw-workspace{height:auto!important;margin-bottom:0!important;}
}
