/* Match the original body-child selectors after the native authenticated wrapper. */
@media (max-width:799px) {
  html body #beta-root > [id^="screen"]:has(> .aegis-top-header),
  html body #beta-root > [id^="screen"]:has(> div > .aegis-top-header) {
    margin-top:0!important;padding-top:0!important;
    padding-left:16px!important;padding-right:16px!important;
  }
}
@media (min-width:800px) {
  html body.desktop-account-active #beta-root > :is([id^="screen"],[id^="wizard"]) {
    width:calc(100% - var(--desktop-sidebar) - 64px);max-width:1120px!important;
    margin-left:calc(var(--desktop-sidebar) + 32px)!important;margin-right:32px;
    padding:32px 0 48px!important;display:flow-root;
  }
  html body.desktop-account-active #beta-root > .hidden {display:none!important;}
  html body.desktop-account-active #beta-root > #screenDevices:not(.hidden) {display:grid!important;}
  html body.desktop-account-active #beta-root > #screenInviteFamily {padding-bottom:32px!important;}
  html body.desktop-account-active.support-widget-open #beta-root > #screenAiChat {
    display:flex!important;padding:0!important;
  }
  /* Native nested sheets have an unhidden inner panel inside a hidden parent. */
  html body.support-widget-open:not(:has(:is([role="dialog"],[id$="Sheet"],[id$="Modal"]):not(.hidden):not(.hidden *))) #beta-root #screenAiChat {
    visibility:visible;pointer-events:auto;
  }
  html body.desktop-account-active #beta-root > :is(#screenExistingUser,#screenDevices,#screenSubscription,#screenFamily) > .aegis-top-header {display:none!important;}
  html body.desktop-account-active #beta-root > :is(#screenAddDevice,#screenViewDeviceKey,#screenOnboardingDeviceType,#screenOnboardingApp,#screenCreatingKey,#screenDeviceAddedKey,#screenOnboardingDeviceAdded,[id^="wizard"]) {max-width:760px!important;}
}
@media (min-width:800px) and (max-width:1039px) {
  html body.desktop-account-active #beta-root > :is([id^="screen"],[id^="wizard"]) {
    width:calc(100% - var(--desktop-sidebar) - 40px);
    margin-left:calc(var(--desktop-sidebar) + 20px)!important;margin-right:20px;
  }
}
#screenAiChat > :is(#aiChatTopBarAuth,#aiChatTopBarGuest).hidden {display:none!important;}
#rulesText .aegis-rules-card p {white-space:pre-line;overflow-wrap:anywhere;}

/* Release identity follows the documents card in the settings content flow. */
#settingsDocumentsGroup > .aegis-release-version {
  position:static; margin-top:16px; padding-bottom:4px;
  color:#a8b5ac; font-size:11px; line-height:16px; font-weight:400; font-family:inherit;
  text-align:center; font-variant-numeric:tabular-nums; pointer-events:none;
}
