/* Ordinary LK screens only. Dedicated /lk/flow/ uses a separate header. */
.lk-notify-button{position:relative;width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;background:#ececf1;color:#444;border:0;border-radius:10px;cursor:pointer;text-decoration:none}
.lk-notify-button svg{width:21px;height:21px;display:block}
.lk-notify-button:visited,.lk-notify-button:hover,.lk-notify-button:active,.lk-notify-button:focus{background:#ececf1;color:#444;text-decoration:none}
.lk-notify-button:focus-visible{outline:2px solid #007aff;outline-offset:3px}
.lk-notify-count{position:absolute;top:-4px;right:-4px;min-width:15px;height:15px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 3px;border-radius:6px;color:#fff;background:#007aff;font-size:9px;font-weight:700;line-height:1}
.lk-notify-count[hidden]{display:none!important}
/* V650: the bell uses the same moving skeleton as the other header buttons. */
body[data-lk-state="booting"] .lk-notify-button{
  background-color:#ededf1!important;
  background-image:linear-gradient(90deg,#ededf1 24%,#f7f7f9 38%,#ededf1 52%)!important;
  background-size:220% 100%!important;
  background-repeat:no-repeat!important;
  animation:ms-header-skeleton 1.25s ease-in-out infinite!important;
  color:transparent!important;
  pointer-events:none;
}
@media(prefers-reduced-motion:reduce){body[data-lk-state="booting"] .lk-notify-button{animation-duration:2s!important}}
body[data-lk-state="booting"] .lk-notify-button svg{visibility:hidden}
/* Mobile: keep header ALWAYS fixed at the top. Elevation follows scroll position,
   while desktop keeps its V641 direction-based hide/show logic untouched. */
@media(max-width:570px){
 body>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link)),
 .page-container>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link)){position:sticky!important;top:0!important;z-index:10020;background:#fff;transform:none!important;opacity:1!important;pointer-events:auto!important}
 body>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before,
 .page-container>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before{content:"";position:absolute;top:0;bottom:0;left:50%;width:100vw;transform:translateX(-50%);background:#fff;box-shadow:none;pointer-events:none}
 body>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before,
 .page-container>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before{box-shadow:0 5px 16px rgba(30,40,55,.14)}
 body>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link))>.lk-header,
 .page-container>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link))>.lk-header{position:relative;z-index:2}
}

/* V649: Only the central LK mode-switch icon becomes 22x22px (was 20x20). */
.lk-header-shell .lk-role-button > svg{width:22px;height:22px}

/* V651: at the top the ordinary LK header blends into its page; once scrolled
   it has an opaque white surface and retains the existing elevation shadow.
   Only ordinary LK headers (.lk-nav-wrap), never the isolated Resume / Flow mode. */
body>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link)),
.page-container>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link)),
body>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before,
.page-container>.lk-header-shell:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before{
  background:var(--lk-page,var(--page,#f7f7fa));
}
body>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link)),
.page-container>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link)),
body>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before,
.page-container>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before{
  background:#fff;
}

/* V663: On phones keep the same page-colored header when scrolled.
   Only the shadow changes; do not force an opaque white background. */
@media(max-width:570px){
 body>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link)),
 .page-container>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link)),
 body>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before,
 .page-container>.lk-header-shell.lk-nav-scrolled:is(:has(.lk-nav-wrap),:has(.lk-login-link))::before{
  background:var(--lk-page,var(--page,#f7f7fa));
 }
}
