/* Account pages share navigation; desktop opens the same screens in a dialog. */
.account-dialog { position:fixed; inset:0; padding:0; margin:auto; width:min(520px,calc(100vw - 48px)); height:min(860px,calc(100dvh - 64px)); max-height:calc(100dvh - 64px); max-width:none; border:0; border-radius:16px; overflow:hidden; color:var(--text); background:var(--surface); box-shadow:0 24px 100px #0007; }
.account-dialog::backdrop { background:rgba(5,10,17,.6); }
.account-dialog iframe { display:block; width:100%; height:100%; border:0; background:var(--bg); }
.account-dialog-close { position:absolute; z-index:3; right:12px; top:10px; width:38px; height:38px; display:grid; place-items:center; border:0; border-radius:50%; background:transparent; color:var(--text2); font:300 28px/1 var(--font); cursor:pointer; }
.account-dialog-close:hover { background:var(--surface3); }
.account-dialog-open { overflow:hidden; }
.account-page .app-topbar { display:none; }
.account-page .app-main { width:min(620px,calc(100% - 80px)); margin:24px auto; min-height:calc(100dvh - 48px); border-radius:18px; overflow:clip; background:var(--bg); box-shadow:var(--sh3); }
.account-page .page-content { width:100%; max-width:none; padding:0 0 24px; margin:0; }
.account-toolbar { display:flex; align-items:center; gap:20px; padding:10px 18px; min-height:60px; position:sticky; top:0; z-index:10; background:var(--surface); }
.account-toolbar h1 { margin:0; font-size:1.08rem; font-weight:650; line-height:1.4; }
.account-toolbar-back { width:34px; height:36px; display:grid; place-items:center; background:transparent; color:var(--text); border:0; border-radius:50%; cursor:pointer; flex:0 0 auto; }
.account-toolbar-back:hover { background:var(--surface3); }
.account-toolbar-back svg { width:23px; height:23px; }
.account-embedded, .account-embedded body { margin:0; min-height:100%; background:var(--bg); }
.account-embedded body { zoom:1 !important; }
.account-embedded .app-shell { display:block; min-height:100dvh; padding:0; }
.account-embedded .app-sidebar, .account-embedded .mobile-admin-nav, .account-embedded .mobile-nav-drawer, .account-embedded .desktop-titlebar { display:none !important; }
.account-embedded .account-page .app-main { width:100%; max-width:none; min-height:100dvh; height:auto; margin:0 !important; padding:0; border-radius:0; box-shadow:none; transform:none; }
.account-embedded .account-toolbar { padding-right:58px; }
.account-page [hidden] { display:none !important; }
.account-page button:focus-visible, .account-page a:focus-visible, .account-dialog-close:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media(max-width:900px) {
  .account-page { --mobile-nav-h:0px; background:var(--bg); }
  .account-page .app-sidebar, .account-page .mobile-admin-nav, .account-page .mobile-nav-drawer { display:none !important; }
  .account-page .app-shell { display:block; min-height:100dvh; padding:0; }
  .account-page .app-main { width:100%; max-width:none; min-height:100dvh; margin:0 !important; padding:0; border-radius:0; box-shadow:none; }
  .account-page .page-content { padding-bottom:max(24px,env(safe-area-inset-bottom)); }
  .account-toolbar { padding-top:calc(10px + env(safe-area-inset-top)); padding-left:max(14px,env(safe-area-inset-left)); padding-right:max(14px,env(safe-area-inset-right)); }
  .account-embedded .account-toolbar { padding-top:10px; padding-right:58px; }
}
@media(prefers-reduced-motion:reduce) { .account-page *, .account-dialog { scroll-behavior:auto !important; } }
/* Keep account navigation in one scroll container, including scaled host pages. */
.account-page .app-shell { display:block; width:100%; max-width:none; min-height:0; height:100dvh; transform:none; overflow:hidden; }
.account-page .app-main { flex:none; height:calc(100dvh - 48px); min-height:0; max-width:620px; contain:none; }
.account-page .page-content { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }
.account-toolbar { flex:0 0 auto; position:relative; }
.desktop-app .account-page .app-shell { height:calc(100dvh - var(--desktop-titlebar-h)); }
.desktop-app .account-page .app-main { height:calc(100dvh - var(--desktop-titlebar-h) - 48px); min-height:0; }
.account-embedded body { margin:0 !important; height:100dvh !important; }
.account-embedded .account-page .app-shell, .account-embedded .account-page .app-main { width:100%; height:100dvh; min-height:0; max-width:none; transform:none; }
@media(max-width:900px) {
  .account-page .app-main { height:100dvh; min-height:0; max-width:none; }
  .account-dialog { width:100vw; height:100dvh; max-height:100dvh; border-radius:0; }
}
