/* Keep the shared mini-app header geometrically identical across tabs. */
@media (max-width: 879px) {
  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar {
    box-sizing: border-box !important;
    min-height: 68px !important;
    margin: 0 0 14px !important;
    padding: max(12px, env(safe-area-inset-top)) clamp(14px, 4vw, 22px) 12px !important;
    align-items: center !important;
  }

  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .brand-logo {
    width: min(124px, 34vw) !important;
  }

  html[lang="en"].miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .brand-logo {
    width: min(108px, 30vw) !important;
  }

  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .topbar-tools {
    min-height: 44px !important;
    gap: 10px !important;
    align-items: center !important;
  }

  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .language-switch {
    padding: 0 !important;
  }

  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .user-menu,
  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .user-pill {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    flex-basis: 44px !important;
  }

  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .user-avatar {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    flex-basis: 34px !important;
  }
}

@media (max-width: 380px) {
  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .topbar-tools {
    gap: 6px !important;
  }
}

@media (max-width: 340px) {
  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .brand-logo,
  html[lang="en"].miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .brand-logo {
    width: 74px !important;
  }

  html.miniapp-dashboard body.view-accounts-active:not(.admin-page) .topbar .topbar-tools {
    gap: 4px !important;
  }
}
