:root {
  --app-vh: 1vh;
}

html,
body {
  min-height: 100dvh;
}

body {
  min-height: calc(var(--app-vh, 1vh) * 100);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.tv-mode a:focus-visible,
body.tv-mode button:focus-visible,
body.tv-mode input:focus-visible,
body.tv-mode select:focus-visible,
body.tv-mode textarea:focus-visible,
body.tv-mode [tabindex]:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.95);
}

* {
  -webkit-tap-highlight-color: rgba(148, 163, 184, 0.2);
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

input,
select,
textarea {
  font-size: 16px;
}

button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}

textarea {
  resize: vertical;
}

.safe-bottom-pad {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

.safe-top-pad {
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

@media (max-width: 900px) {
  .mx-auto.max-w-7xl,
  .mx-auto.max-w-6xl,
  .mx-auto.max-w-5xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  header .flex.items-center.justify-between {
    flex-wrap: wrap;
    row-gap: 0.75rem;
  }

  .overflow-x-auto,
  .overflow-auto {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
}
