
/* Portrait/small-screen safety net for disappearing buttons */
@media (orientation: portrait), (max-width: 820px) {
  .buttons, .button-group, .controls, .control-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
    align-items: center !important;
  }
  .btn, .button, button, [role="button"], input[type="button"], input[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    max-width: 100% !important;
    white-space: nowrap;
  }
  /* Avoid clipping off-screen */
  .toolbar, .header, .footer, .nav, .controls, .buttons, .button-group {
    overflow: visible !important;
    z-index: 10;
  }
  /* If buttons were off-canvas due to transforms/absolute positioning, reset */
  .buttons, .button-group, .controls {
    position: relative !important;
    transform: none !important;
    inset: auto !important;
  }
}
