/* Shared site switcher */
.apps__panel {
  position: absolute;
  z-index: 70;
  top: -2px;
  right: 0;
  left: auto;
  bottom: auto;
  width: min(360px, calc(100vw - 32px));
  min-height: min(326px, calc(100vh - 100px));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #14140f;
  box-shadow: var(--pop-shadow);
}
.apps__panel[hidden] { display: none; }
.apps__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid #dedede; font-size: 15px; }
.apps__close { display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #14140f; color: #fff; cursor: pointer; }
.apps__close svg { width: 18px; height: 18px; }
.apps__close:focus-visible { outline: 2px solid #14140f; outline-offset: 3px; }
.apps__links { display: flex; flex-direction: column; padding-top: 12px; }
.apps__link { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 32px; padding: 3px 0; font-size: 15px; line-height: 1.3; color: #14140f; text-decoration: none; }
.apps__link:hover { opacity: .6; }
.apps__link:focus-visible { outline: 2px solid #14140f; outline-offset: 2px; border-radius: 3px; }
.apps__link svg { flex: none; width: 16px; height: 16px; }
@media (max-width: 760px) {
  .apps { position: static; }
  .apps__panel { position: absolute; top: 8px; right: 8px; left: auto; bottom: auto; width: min(360px, calc(100vw - 16px)); max-height: calc(100dvh - 32px); min-height: min(326px, calc(100dvh - 32px)); padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .apps__panel.is-open { animation: site-menu-enter .2s ease-out both; }
  @keyframes site-menu-enter {
    from { opacity: 0; transform: translateX(32px); }
    to { opacity: 1; transform: translateX(0); }
  }
}
/* Keep the site switcher clear while softly blurring everything behind it. */
.apps:has(#apps-btn[aria-expanded="true"])::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 69;
  background: rgba(0, 0, 0, .30);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
@media (max-width: 760px) {
  body.apps-open:not(.drawer-open) .scrim { opacity: 0; pointer-events: none; }
}
