@media screen {
  :root {
    --qps-safe-top:max(env(safe-area-inset-top,0px),var(--qps-safe-fallback-top,0px));
    --qps-safe-right:max(env(safe-area-inset-right,0px),var(--qps-safe-fallback-right,0px));
    --qps-safe-bottom:max(env(safe-area-inset-bottom,0px),var(--qps-safe-fallback-bottom,0px));
    --qps-safe-left:max(env(safe-area-inset-left,0px),var(--qps-safe-fallback-left,0px));
  }
  /* Cover nested scrolling areas too. Low specificity preserves the explicit
     touch-action:none used by signature pads, maps and model canvases. */
  :where(html, body, body *) { touch-action:pan-x pan-y pinch-zoom; }
  html, body { overscroll-behavior-y:none; }
  /* App chrome and message bubbles must not start native text selection or
     the iOS link/image callout during a hold. Keep this in CSS so scrolling,
     clicks, signature strokes and the chat's own hold gestures still work. */
  :where(body, body *) {
    -webkit-user-select:none;
    user-select:none;
    -webkit-touch-callout:none;
  }
  /* Editable and read-only fields retain selection, caret movement and paste.
     Only document pages and explicitly useful copyable values opt back in;
     labels, navigation and the document viewer's toolbar remain app controls.
     New copyable content can use data-qps-selectable or qps-selectable. */
  :is(input:not([type=button], [type=submit], [type=reset], [type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=image], [type=hidden]), textarea,
      [contenteditable=""], [contenteditable=true], [contenteditable=plaintext-only],
      .sheet, .qps-selectable, [data-qps-selectable], .qep-handoff pre, .qed-bank-summary strong),
  :is([contenteditable=""], [contenteditable=true], [contenteditable=plaintext-only],
      .sheet, .qps-selectable, [data-qps-selectable], .qep-handoff pre) * {
    -webkit-user-select:text;
    user-select:text;
    -webkit-touch-callout:default;
  }
  /* Noneditable islands inside rich editors must not regain native selection. */
  body [contenteditable=false], body [contenteditable=false] * {
    -webkit-user-select:none;
    user-select:none;
    -webkit-touch-callout:none;
  }
}
@media screen and (hover:none), screen and (pointer:coarse) {
  /* iOS zooms on focus when an editable control's text is smaller than 16px.
     Override component/inline font sizes while retaining the inherited scale. */
  body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]):not([type=button]):not([type=submit]),
  body select, body textarea, body [contenteditable=true] { font-size:max(16px, 1em)!important; }
}

/* The signed-in identity follows its linked employee profile in both shells. */
.qps-account-photo-button{padding:0;border:0;background:none;color:inherit;border-radius:50%;cursor:pointer;flex:none}
.qps-account-avatar{position:relative;display:grid;place-items:center;overflow:hidden;width:42px;height:42px;flex:none;border-radius:50%;background:#ddd9fa;color:#514387;font-family:inherit;font-weight:600;font-size:15px;line-height:1}
.qps-account-brand .qps-account-avatar{display:grid;margin-top:0}
.qps-account-avatar>span{display:block;margin:0!important;font-size:14px!important}
.qps-account-avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.qps-account-photo-button:focus-visible{outline:2px solid currentColor;outline-offset:3px}
.brand .qps-account-position{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px;font-size:10px;line-height:1.3;color:var(--muted)}
.qps-account-brand>div{min-width:0;flex:1}
:root[data-workspace-style="modern"] .qm-profile .qps-account-avatar{width:37px;height:37px}
@media(min-width:761px) and (max-width:1250px){:root[data-workspace-style="modern"] .qm-header .qm-profile>span:last-child{display:grid;max-width:100px}:root[data-workspace-style="modern"] .qm-header .qm-profile small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:root[data-workspace-style="modern"] .qm-header .qm-top-nav button{padding-inline:8px}:root[data-workspace-style="modern"] .qm-header .qm-brand strong{font-size:12px}:root[data-workspace-style="modern"] .qm-header .qm-header-actions{gap:5px}}
@media(max-width:760px){.sidebar .qps-account-brand{gap:9px}.sidebar .qps-account-avatar{width:38px;height:38px}.sidebar .brand .qps-account-name{margin-top:2px;line-height:1.3}.sidebar .brand .qps-account-position{margin-top:1px;font-size:10px}.sidebar .qps-account-brand>div{min-width:0}.sidebar .brand .qps-account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

/* Email has its own heading, search and folder context. */
@media screen{
  .layout[data-workspace-view="mail"]>.main>.qx-context{display:none}
  .layout[data-workspace-view="mail"]>.main>.topbar>div:first-child{display:none}
  .layout[data-workspace-view="mail"]>.main>.topbar{justify-content:flex-end;margin-bottom:12px}
}
@media screen and (max-width:760px){
  .layout[data-workspace-view="mail"]>.main>.topbar{display:none}
  .layout[data-workspace-view="mail"]>.main{padding-top:14px}
}

/* Email stays in the app header, including Classic and the compact mobile bar. */
.qps-header-mail{position:relative;display:inline-flex;align-items:center;gap:7px}
.qps-header-mail svg{width:18px;height:18px;flex:none}
.qps-header-mail [data-qps-nav-count]{min-width:19px;padding:1px 5px;border-radius:10px;background:#b52e46;color:#fff;font-size:10px;line-height:16px;font-variant-numeric:tabular-nums}
.qps-header-mail [data-qps-nav-count][hidden]{display:none}
.qps-header-mail[aria-current="page"]{box-shadow:inset 0 0 0 1px currentColor}
:root[data-workspace-style="modern"] .topbar .qps-desktop-mail{display:none}
@media(max-width:760px){
  .topbar .qps-desktop-mail{display:none}
  .qx-context .qx-search-launch{display:none}
  .sidebar .qps-account-brand>.qps-mobile-actions{flex:none}
  /* The drawer is narrower than the page: keep its header focused on the
     profile photo and actions instead of squeezing the identity into ellipses. */
  :root[data-qps-nav="open"] .sidebar .qps-account-brand>div:not(.qps-mobile-actions){display:none}
  .qps-mobile-actions .qps-header-mail [data-qps-nav-count]{position:absolute;right:0;top:0;max-width:34px;overflow:hidden;text-overflow:ellipsis;padding-inline:4px}
}
@media(max-width:380px){
  .sidebar .qps-account-brand{gap:6px}
  .sidebar .qps-mobile-actions{gap:1px}
  .sidebar .qps-mobile-actions .button,.sidebar .qps-mobile-menu{width:40px;min-width:40px}
}
