/* Materials shares the live Theme Studio background and responsive application chrome. */
#fmOverlay:not([hidden]) {
  isolation:isolate;
  background:transparent!important;
  color:var(--fb-ink)!important;
  font-family:inherit;
}
#fmOverlay:not([hidden])::before{
  content:"";position:fixed;inset:0;z-index:-1;
  background:var(--fb-bg);pointer-events:none;
}
#fmOverlay > #fb64-atmosphere{position:fixed;inset:0;z-index:0;pointer-events:none}
#fmOverlay > :not(#fb64-atmosphere){position:relative;z-index:1}
#fmOverlay .fm-app-head.v6-head,
#fmOverlay .fm-footer.v6-nav{background:var(--fb-nav)!important;color:var(--fb-ink)!important;border-color:var(--fb-edge)!important;backdrop-filter:blur(12px)}
#fmOverlay .fm-content{width:100%!important;max-width:1500px!important;min-height:0;min-width:0;margin-inline:auto;overflow:auto;overflow-x:hidden;padding:22px clamp(16px,3vw,48px) 40px;box-sizing:border-box}
#fmOverlay .fm-tabs{display:flex!important;flex-wrap:wrap;gap:8px;max-width:none;margin:0 0 20px}
#fmOverlay .fm-tabs button{flex:0 0 auto;min-width:110px;padding:10px 17px;font-size:14px;border-radius:10px}
#fmOverlay .fm-tabs button[aria-current="page"]{background:var(--accent-soft,var(--fb-raised))!important;border-color:var(--fb-accent)!important;color:var(--fb-ink)!important;font-weight:650}
#fmOverlay .fm-card,#fmOverlay .fm-line,#fmOverlay .fm-modal,#fmOverlay .fm-workup-group{background:var(--fb-panel)!important;border-color:var(--fb-edge)!important;color:var(--fb-ink)!important}
#fmOverlay :is(input,select,textarea){background:var(--fb-raised)!important;color:var(--fb-ink)!important;border-color:var(--fb-edge)!important}
#fmOverlay :is(button,summary){color:var(--fb-ink)}
#fmOverlay .fm-footer{justify-content:center;gap:12px}
#fmOverlay .fm-footer button{flex:0 1 165px;min-height:44px;gap:8px;border-radius:10px!important}
#fmOverlay .fm-footer button[aria-current="page"]{background:var(--accent-soft,var(--fb-raised))!important;color:var(--fb-accent)!important}
#fmOverlay #fmBody{min-width:0}
#fmOverlay #fmBody > h2{font-size:clamp(1.2rem,1.6vw,1.65rem);margin:8px 0 16px}
#fmOverlay .fm-equipment-choices{grid-template-columns:repeat(auto-fill,minmax(240px,1fr));max-height:50vh}
#fmOverlay .fm-form{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
#fmOverlay .fm-form-edit{grid-template-columns:repeat(3,minmax(0,1fr))}
#fmOverlay .fm-form-edit .fm-actions{grid-column:1/-1}
@media (min-width:1100px){
 #fmOverlay .fm-app-head.v6-head{padding:13px clamp(24px,3vw,48px)!important}
 #fmOverlay .fm-content{padding-top:26px}
 #fmOverlay .fm-equipment-choices{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (min-width:700px) and (max-width:1099px){
 #fmOverlay .fm-content{padding:20px 24px 32px}
 #fmOverlay .fm-form-edit{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:699px){
 #fmOverlay .fm-content{padding:12px 12px calc(22px + env(safe-area-inset-bottom))}
 #fmOverlay .fm-tabs{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-bottom:12px}
 #fmOverlay .fm-tabs button{min-width:0;padding:10px 4px;font-size:12px}
 #fmOverlay .fm-footer{gap:3px}
 #fmOverlay .fm-footer button{flex:1;min-width:0;flex-direction:column;gap:2px;font-size:10px!important;padding:5px 2px!important}
 #fmOverlay .fm-equipment-choices{grid-template-columns:1fr;max-height:260px}
 #fmOverlay .fm-form-edit{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(prefers-reduced-motion:reduce){#fmOverlay *{scroll-behavior:auto!important}}
