/* AI Project Universe V4.9 — AI Architect mobile navigation clarity fix */
.ai-nav-backdrop { display: none !important; }

@media (max-width: 767px) {
  html.ai-architect-nav-open,
  body.ai-architect-nav-open {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1500 !important;
    min-height: 58px !important;
    height: 58px !important;
    padding: 0 10px !important;
    background: #0f0f0f !important;
    border-bottom: 1px solid rgba(175, 175, 175,.36) !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.28) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-header .ai-menu-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border: 1px solid rgba(175, 175, 175,.58) !important;
    border-radius: 12px !important;
    background: #1a1a1a !important;
    color: #f6f6f6 !important;
    box-shadow: none !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-header .ai-menu-trigger[aria-expanded="true"] {
    border-color: #cecece !important;
    background: #323232 !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-drawer {
    position: fixed !important;
    inset: 58px 8px auto 8px !important;
    z-index: 1450 !important;
    display: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    max-height: min(68dvh, 610px) !important;
    overflow: hidden !important;
    border: 1px solid rgba(175, 175, 175,.34) !important;
    border-top: 0 !important;
    border-radius: 0 0 18px 18px !important;
    background: #0f0f0f !important;
    box-shadow: 0 18px 42px rgba(0,0,0,.42) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: aiNavV49In .18s ease-out both !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-drawer.flex {
    display: flex !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-drawer.hidden {
    display: none !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-drawer-heading {
    display: flex !important;
    min-height: 54px !important;
    padding: 8px 9px 8px 13px !important;
    background: #161616 !important;
    border-bottom: 1px solid rgba(161, 161, 161,.18) !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-drawer-close {
    display: inline-flex !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    border-color: rgba(144, 144, 144,.66) !important;
    background: #1c1c1c !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 7px !important;
    min-height: 0 !important;
    max-height: calc(min(68dvh, 610px) - 54px) !important;
    padding: 9px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav > a > div {
    min-height: 48px !important;
    padding: 8px 9px !important;
    border-radius: 12px !important;
    background: #1a1a1a !important;
    box-shadow: none !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav > a > div.bg-primary {
    background: #606060 !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-architect-main,
  html[data-scroll-theme="ai-architect"] main {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  html[data-scroll-theme="ai-architect"] .ai-nav-backdrop {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  @keyframes aiNavV49In {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 410px) {
  html[data-scroll-theme="ai-architect"] .ai-architect-drawer nav {
    grid-template-columns: minmax(0,1fr) !important;
  }
}
