/* Functional repairs only; existing component appearance and native details are retained. */
/* The sticky header is z-index:140; the original skip link was underneath it at 99. */
.skip { position: fixed; z-index: 10002; }

/* A short landscape viewport cannot accommodate the fixed Mia stack at its full height. */
@media (max-height: 480px) {
  .arrow-mia-menu {
    max-height: calc(100dvh - 172px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 6px;
  }
  .arrow-mia-menu > .arrow-mia-action { flex-shrink: 0; }
  .arrow-mia-menu > .arrow-mia-action:focus-visible { outline-offset: -4px; }
  .arrow-mia-menu > #mia-signal-fallback:not([hidden]) {
    position: static;
    inset: auto;
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    flex-shrink: 0;
    padding: 12px;
    margin: 0;
    box-shadow: none;
  }
  .arrow-mia-menu > #mia-signal-fallback a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Also displays the first frame when JS is disabled; the script swaps src when available. */
@media (prefers-reduced-motion: reduce) {
  [data-mia-launcher] img[src$="/mia-active.gif"] { content: url('./mia-still.gif'); }
}
