/* The transparent opening preserves the existing Florarium; only scroll/menu state gains a surface. */
@media (max-width: 768px) {
  body #hd, body #hd.hidden { position: fixed; transform: none; }
  body #hd.on {
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  body.nav-open #hd, body.nav-open #n-mobile-nav.open {
    background: rgba(255, 255, 255, .98);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
  body.nav-open::after { background: transparent; }
  body #n-mobile-nav.open { overflow-y: auto; overscroll-behavior: contain; }
  body #hd.on :is(.n-logo, .n-hamburger, .n-ham-arr),
  body.nav-open #hd :is(.n-logo, .n-hamburger, .n-ham-arr),
  body #n-mobile-nav.open .n-item { color: #0a0909 !important; opacity: 1 !important; }
  body #n-mobile-nav.open .n-termin,
  body #n-mobile-nav.open .n-termin-label { color: #fff !important; opacity: 1 !important; }
  body :is(#hd, #n-mobile-nav) :is(a, button):focus-visible {
    outline: 2px solid #6e17c7; outline-offset: 4px;
  }
}

/* Medium desktop: fit the actual 17px labels before returning to the 12-column nav. */
@media (min-width: 769px) and (max-width: 1280px) {
  body #hd .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(8px, 1vw, 16px);
  }
  body #hd .nav-inner > :is(.n-logo, .n-item, .n-termin) {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
