/* Nygui mobile polish · prevents an empty toast covering the Colour tab. */
.toast:not(.show) {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.toast.show {
  visibility: visible !important;
  opacity: 1 !important;
}

/* The mobile header stays usable; the drawer starts immediately below it. */
@media (max-width: 800px) {
  .sidebar {
    --nygui-menu-header-height: 60px;
    top: var(--nygui-menu-header-height) !important;
    height: calc(100dvh - var(--nygui-menu-header-height)) !important;
    max-height: calc(100dvh - var(--nygui-menu-header-height)) !important;
    min-height: 0 !important;
    padding-top: 12px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    z-index: 111 !important;
  }
  .nyugi-scrim {
    top: var(--nygui-menu-header-height, 60px) !important;
    z-index: 108 !important;
  }
  /* Floating controls should disappear behind the opened drawer. */
  .sidebar.open ~ .main-column ~ .nyugi-mobile-dock,
  .sidebar.open ~ .main-column ~ .nyugi-mobile-dock ~ .nyugi-scrim ~ .toast {
    pointer-events: none;
  }
  #nyugiSidebarHelp {
    min-height: 44px;
    padding: 11px 14px;
    text-align: left;
    border-radius: 12px;
    font-weight: 700;
  }
}
@media (max-width: 700px) {
  .sidebar { --nygui-menu-header-height: 58px; }
  .nyugi-scrim { top: 58px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none !important; }
}
