/* H-BOT dashboard resilience layer — 2026-11-10.
   Loaded after the existing theme bridge so it only supplies accessibility and
   small-screen safeguards; it deliberately does not change trading logic. */

:root {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--hb-a, #00f5ff) !important;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :focus-visible {
    outline-color: #ffffff !important;
  }

  button,
  input,
  select,
  textarea {
    border-color: currentColor !important;
  }
}

@media (max-width: 639px) {
  html,
  body,
  #root {
    max-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
  }

  .dc-tabs__list {
    overscroll-behavior-x: contain;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    scroll-snap-type: x proximity;
  }

  .dc-tabs__item {
    min-height: 44px !important;
    scroll-snap-align: start;
  }

  .dc-dialog,
  .dc-modal,
  [role="dialog"] {
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }

  [class*="table"],
  [class*="Table"] {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    overflow-x: auto;
  }

  [class*="bottom"],
  [class*="dock"] {
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
  }
}
