/* Shared phone controls. Tablet and desktop retain their existing layouts.
   Selector specificity covers the existing page-level control overrides. */
@media (max-width: 768px) {
  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive) .archive-stage.archive-stage > .archive-toolbar :is(.wrestler-tools.wrestler-tools, .venues-toolbar.venues-toolbar),
  html body .vault-archive .archive-toolbar .vault-archive__tools {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: var(--space-chrome-2) !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive) .archive-stage.archive-stage > .archive-toolbar :is(.wrestler-tools.wrestler-tools, .venues-toolbar.venues-toolbar) :is(.search-wrap, .venues-toolbar-search),
  html body .vault-archive .archive-toolbar .vault-archive__tools .search-wrap {
    flex: 1 0 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive, .vault-archive) .archive-toolbar.archive-toolbar .filter-sheet-trigger.filter-sheet-trigger {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 17px max-content 22px !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    gap: var(--space-chrome-1-5) !important;
    width: max-content !important;
    min-width: 44px !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0 !important;
    padding: 0 var(--space-chrome-2) 0 var(--space-chrome-3) !important;
    aspect-ratio: auto !important;
    border: 1px solid rgba(246, 241, 231, .22) !important;
    border-radius: 8px !important;
    background: var(--chrome-header-surface) !important;
    color: var(--color-paper-soft) !important;
    font: 700 var(--font-size-chrome-md)/1 var(--display) !important;
    letter-spacing: normal !important;
    text-transform: uppercase !important;
    cursor: pointer;
    touch-action: manipulation;
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive, .vault-archive) .archive-toolbar.archive-toolbar .filter-sheet-trigger.filter-sheet-trigger > .filter-sheet-trigger__label {
    display: block !important;
    font: inherit !important;
    letter-spacing: inherit !important;
    white-space: nowrap !important;
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive, .vault-archive) .archive-toolbar.archive-toolbar .filter-sheet-trigger.filter-sheet-trigger > .material-symbols-outlined {
    display: grid !important;
    place-items: center;
    width: 17px !important;
    height: 17px !important;
    flex: none !important;
    font-size: 17px !important;
    line-height: 1 !important;
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive, .vault-archive) .archive-toolbar.archive-toolbar .filter-sheet-trigger.filter-sheet-trigger > .filter-sheet-trigger__badge {
    position: static !important;
    inset: auto !important;
    display: grid !important;
    place-items: center;
    visibility: visible;
    box-sizing: border-box;
    width: 22px !important;
    min-width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 999px;
    background: var(--accent-red, var(--color-red-500));
    color: var(--color-white);
    font: 700 var(--font-size-chrome-sm)/1 var(--body);
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive, .vault-archive) .archive-toolbar.archive-toolbar .filter-sheet-trigger.filter-sheet-trigger > .filter-sheet-trigger__badge[hidden] {
    visibility: hidden !important;
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive, .vault-archive) .archive-toolbar.archive-toolbar .filter-sheet-trigger.filter-sheet-trigger:hover {
    background: var(--chrome-selected-surface) !important;
    border-color: var(--color-red-wine) !important;
  }

  html body :is([data-wrestlers-page], [data-venues-page], .voices-archive, .vault-archive) .archive-toolbar.archive-toolbar .filter-sheet-trigger.filter-sheet-trigger:focus-visible {
    outline: 2px solid var(--color-paper-soft) !important;
    outline-offset: 3px !important;
    box-shadow: none !important;
  }

  /* View buttons share the action row without stretching the Filter button. */
  html body :is([data-wrestlers-page], [data-venues-page]) .archive-stage.archive-stage > .archive-toolbar .venues-view-toggle__btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 72px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 var(--space-chrome-3) !important;
  }
}
