.mobile-menu-toggle,
.mobile-menu-drawer {
  display: none;
}

body.mobile-menu-open {
  overflow: hidden;
}

@media (max-width: 960px) {
  .mobile-menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--white, #ffffff);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  }

  .mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
  }

  .mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .mobile-menu-drawer[hidden] {
    display: none !important;
  }

  .mobile-menu-drawer {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 280;
  }

  .mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 13, 24, 0.6);
    backdrop-filter: blur(4px);
  }

  .mobile-menu-sheet {
    --mobile-menu-accent: var(--cyan, var(--indigo, var(--amber, var(--green, #0ea5e9))));
    position: absolute;
    top: 84px;
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 100px);
    overflow: auto;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: 2px solid var(--mobile-menu-accent);
    background: rgba(15, 22, 35, 0.98);
    box-shadow: 0 24px 60px rgba(7, 13, 24, 0.32);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mobile-menu-drawer.is-open .mobile-menu-sheet {
    transform: translateY(0);
    opacity: 1;
  }

  .mobile-menu-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .mobile-menu-head strong {
    display: block;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
  }

  .mobile-menu-head span {
    display: block;
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
    line-height: 1.55;
  }

  .mobile-menu-close {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 1.15rem;
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-menu-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .mobile-menu-group {
    padding-top: 0.2rem;
  }

  .mobile-menu-group-title {
    display: block;
    margin-bottom: 0.55rem;
    color: rgba(255, 255, 255, 0.34);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
  }

  .mobile-menu-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 0.95rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  }

  .mobile-menu-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
  }

  .mobile-menu-link.is-active {
    background: color-mix(in srgb, var(--mobile-menu-accent) 14%, rgba(255, 255, 255, 0.03));
    border-color: color-mix(in srgb, var(--mobile-menu-accent) 28%, rgba(255, 255, 255, 0.08));
  }

  .mobile-menu-link strong {
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 800;
  }

  .mobile-menu-link span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
    line-height: 1.5;
  }

  .mobile-menu-legal {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
  }

  .mobile-menu-legal .mobile-menu-link {
    min-height: 100%;
  }

  .nav-actions .btn-ghost-nav {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .mobile-menu-sheet {
    top: 78px;
    left: 8px;
    right: 8px;
    max-height: calc(100vh - 88px);
    padding: 0.9rem;
  }

  .mobile-menu-legal {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 961px) {
  .mobile-menu-toggle,
  .mobile-menu-drawer {
    display: none !important;
  }
}
