/* One frontend filing-drawer recipe for MAYA, Admin, Brief and the preview.
   The outer material and X/Y padding still come from saved Drawer settings. */
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.pg-tabrow,#adm-tabrow,.original-drawer-tabs){
  display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;
  gap:14px;flex:none;margin:calc(-1 * min(8px,var(--maya-drawer-padding-y,16px))) 0 8px calc(-1 * min(8px,var(--maya-drawer-padding-x,12px)));padding:0;position:relative;z-index:2;
}
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.adm-tab,.pg-tab){
  display:flex!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;width:32px;height:32px;inline-size:32px!important;block-size:32px!important;
  min-inline-size:0!important;min-block-size:0!important;max-inline-size:none;aspect-ratio:1!important;
  border-radius:50%!important;padding:0!important;flex:none;position:relative;overflow:visible;cursor:pointer;
  border:.5px solid rgba(255,255,255,.22)!important;background:rgba(255,255,255,.04)!important;
  box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  opacity:.5;transition:opacity .22s,border-color .22s,transform .22s;
}
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.adm-tab,.pg-tab):hover{opacity:.9;transform:translateY(-1px)}
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.adm-tab,.pg-tab).on[aria-selected="true"]{
  opacity:1;border-color:rgba(255,255,255,.62)!important;box-shadow:0 0 0 1px rgba(255,255,255,.10)!important;
}
/* Anchor the marker to the actual circle edge, including larger touch targets. */
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.adm-tab,.pg-tab).on::after{
  content:'';position:absolute;left:50%;top:100%;bottom:auto;margin:0;transform:translateX(-50%);
  width:0;height:0;border:5px solid transparent;border-top-color:rgba(255,255,255,.34);
}
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.adm-tab,.pg-tab) svg{
  display:block;inline-size:17px!important;block-size:17px!important;min-inline-size:0!important;min-block-size:0!important;
  margin:auto;border-radius:0;flex:none;
}
/* Preserve the frontend's branded Pinterest fill and photographic tab faces. */
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.adm-tab,.pg-tab) svg:is(:not([fill]),[fill="none"]){fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round}
html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(#adm-tabtitle,.pg-tabtitle){
  flex:1;order:0;min-width:0;max-inline-size:100%;padding-left:4px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  /* H2 family, size, weight, color and alignment remain shared typography. */
  text-transform:uppercase;letter-spacing:.04em;text-align:left;
}
@media(any-pointer:coarse){
  html body :is(#notes-drawer,#drawer,#clients-drawer,.maya-drawer) :is(.adm-tab,.pg-tab){
    min-inline-size:var(--maya-touch-target,44px)!important;min-block-size:var(--maya-touch-target,44px)!important;
  }
}
/* Match the frontend's 378px pane: a 360px drawer and 18px right margin. */
body.backend-original #clients-drawer{top:10px;right:18px;bottom:10px;width:360px;max-width:calc(100vw - 36px)}
/* Frontend/Admin put their workspace outside the drawer pane. Brief overlays
   it: exclude that covered strip from painting so white patterns cannot tint
   the saved translucent Drawer. The same starfield remains underneath. */
body.backend-original.drawer-open #screens{clip-path:inset(0 378px 0 0)}
body.backend-original.drawer-open #top-actions .hamburger{transform:translateX(-360px)}
body.backend-original .top-btn.hamburger{position:relative;font-size:10px;font-weight:300}
body.backend-original .top-btn.hamburger::after{
  content:'';position:absolute;left:50%;top:50%;width:44px;height:44px;transform:translate(-50%,-50%);
}
body.backend-original .hamburger-icon{display:inline-flex;flex-direction:column;justify-content:normal;gap:3px;width:14px;height:auto}
body.backend-original .hamburger-icon span{display:block;height:1px;width:100%;background:currentColor;border-radius:1px}
@media(max-width:640px){
  body.backend-original #clients-drawer,html body #drawer{
    top:64px;right:12px;left:12px;bottom:calc(12px + env(safe-area-inset-bottom,0px));width:auto;max-width:none;
  }
  body.backend-original.drawer-open #top-actions .hamburger{transform:none}
  body.backend-original.drawer-open #screens{clip-path:inset(0 100% 0 0)}
}
@media(min-width:641px) and (max-width:1279px){
  body.backend-original #clients-drawer,html body #drawer{bottom:calc(10px + env(safe-area-inset-bottom,0px))}
}
