.persona-mobile-header {
  display: none;
}

.persona-mobile-nav-backdrop[hidden],
.persona-mobile-drawer[hidden] {
  display: none !important;
}

@media (max-width: 767.98px) {
  .persona-mobile-header {
    position: sticky;
    top: 0;
    z-index: 1040;
    min-height: 60px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 3px 14px rgba(15, 23, 42, 0.08);
  }

  .persona-desktop-navbar {
    display: none !important;
  }

  .persona-legacy-mobile-sidenav {
    display: none !important;
  }

  body.dark-theme .persona-mobile-header {
    background: #101528;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .persona-mobile-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #0f172a;
    font: 800 1rem/1.2 "Inter", sans-serif;
    text-decoration: none;
  }

  body.dark-theme .persona-mobile-brand {
    color: #f8fafc;
  }

  .persona-mobile-brand:hover,
  .persona-mobile-brand:focus-visible {
    color: #2563eb;
    text-decoration: none;
  }

  .persona-mobile-brand-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #1e5bff, #00a7e8);
  }

  .persona-mobile-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }

  .persona-mobile-theme-toggle,
  .persona-mobile-nav-toggle,
  .persona-mobile-nav-close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
    font-size: 1rem;
    cursor: pointer;
  }

  body.dark-theme .persona-mobile-theme-toggle,
  body.dark-theme .persona-mobile-nav-toggle,
  body.dark-theme .persona-mobile-nav-close {
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    background: #172033;
  }

  .persona-mobile-theme-toggle:focus-visible,
  .persona-mobile-nav-toggle:focus-visible,
  .persona-mobile-nav-close:focus-visible,
  .persona-mobile-nav-links a:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 2px;
  }

  .persona-mobile-nav-backdrop {
    position: fixed;
    z-index: 1050;
    inset: 0;
    background: rgba(2, 6, 23, 0.58);
    opacity: 0;
    transition: opacity 180ms ease;
  }

  .persona-mobile-nav-backdrop.is-visible {
    opacity: 1;
  }

  .persona-mobile-drawer {
    position: fixed;
    z-index: 1060;
    inset: 0 auto 0 0;
    width: min(320px, 88vw);
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 1rem;
    color: #0f172a;
    background: #fff;
    box-shadow: 16px 0 42px rgba(2, 6, 23, 0.24);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    overscroll-behavior: contain;
  }

  .persona-mobile-drawer.is-open {
    transform: translateX(0);
  }

  body.dark-theme .persona-mobile-drawer {
    color: #f8fafc;
    background: #0f172a;
  }

  .persona-mobile-drawer-header {
    min-height: 56px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
  }

  body.dark-theme .persona-mobile-drawer-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .persona-mobile-drawer-header h2 {
    margin: 0 0 0.2rem;
    color: inherit;
    font-size: 0.95rem;
    font-weight: 800;
  }

  .persona-mobile-drawer-header p {
    max-width: 220px;
    margin: 0;
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: 0.8rem;
  }

  body.dark-theme .persona-mobile-drawer-header p {
    color: #94a3b8;
  }

  .persona-mobile-nav-links {
    display: grid;
    gap: 0.25rem;
    padding-top: 0.75rem;
  }

  .persona-mobile-nav-separator {
    height: 1px;
    margin: 0.45rem 0.75rem;
    background: #e2e8f0;
  }

  body.dark-theme .persona-mobile-nav-separator {
    background: rgba(255, 255, 255, 0.1);
  }

  .persona-mobile-nav-links a {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
  }

  .persona-mobile-nav-links a i {
    width: 1.1rem;
    color: #2563eb;
    text-align: center;
  }

  .persona-mobile-nav-links a:hover,
  .persona-mobile-nav-links a:focus-visible {
    color: #1d4ed8;
    background: #eff6ff;
    text-decoration: none;
  }

  body.dark-theme .persona-mobile-nav-links a {
    color: #e2e8f0;
  }

  body.dark-theme .persona-mobile-nav-links a:hover,
  body.dark-theme .persona-mobile-nav-links a:focus-visible {
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.16);
  }

  .persona-mobile-nav-links .persona-mobile-logout {
    margin-top: 0.6rem;
    border-top: 1px solid #e2e8f0;
    border-radius: 0;
    color: #b91c1c;
  }

  body.dark-theme .persona-mobile-nav-links .persona-mobile-logout {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: #fca5a5;
  }

  body.persona-mobile-nav-open {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .persona-mobile-nav-backdrop,
  .persona-mobile-drawer {
    transition: none;
  }
}
