/* Mobile density and stability pass. Keeps the command-deck identity while reducing congestion. */
@media (max-width: 760px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  html.aimar-mobile-safe-mode .aimar-neural-canvas,
  html.aimar-mobile-safe-mode .aimar-emblem,
  html.aimar-mobile-safe-mode .aimar-orbit,
  html.aimar-mobile-safe-mode .aimar-orb-glass,
  html.aimar-mobile-safe-mode .aimar-orb-aura,
  html.aimar-mobile-safe-mode .aimar-brand-mark {
    display: none !important;
  }

  html.aimar-mobile-safe-mode .aurora-orb {
    transform: none !important;
    transition: none !important;
    filter: drop-shadow(0 0 20px rgba(117,203,222,.20)) !important;
  }

  html.aimar-mobile-safe-mode .aurora-orb::before {
    animation: none !important;
    opacity: .84 !important;
  }

  html.aimar-mobile-safe-mode .aurora-orb::after {
    animation-duration: 28s !important;
    opacity: .42 !important;
  }

  body {
    background-attachment: scroll !important;
  }

  header {
    min-height: 86px !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    gap: 0.75rem !important;
  }

  header .font-mono,
  header nav,
  .aimar-quick-nav {
    max-width: 100%;
  }

  .aimar-quick-nav {
    display: none !important;
  }

  main {
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  main section {
    padding: 0.75rem !important;
    min-height: calc(100svh - 150px) !important;
  }

  main section > div:first-child {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    border-radius: 1.35rem !important;
  }

  main section h1 {
    font-size: clamp(2.8rem, 17vw, 4.4rem) !important;
  }

  main section p {
    max-width: 100% !important;
  }

  footer {
    min-height: 84px !important;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
  }

  footer button {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
  }

  table {
    min-width: 720px !important;
    font-size: 0.78rem !important;
  }

  .overflow-x-auto,
  [class*="overflow-x-auto"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .grid {
    gap: 0.75rem !important;
  }

  .rounded-\[2rem\],
  .rounded-\[2\.5rem\] {
    border-radius: 1.25rem !important;
  }

  .text-5xl,
  .text-6xl,
  .text-7xl,
  .text-8xl {
    line-height: 0.98 !important;
  }

  .aimar-floating-link,
  .aimar-tools-link,
  .aimar-about-link,
  .aimar-contact-link {
    display: none !important;
  }

  [class*="space-y"] > div,
  article,
  .card {
    max-width: 100% !important;
  }

  button {
    touch-action: manipulation;
  }
}
