* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  touch-action: pan-x pan-y;
}

body {
  font-family: var(--font-sans);
  background: #ECE6D8;
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  /* Поведение нативного приложения: без боковой болтанки и pull-to-refresh,
     скролл двумя пальцами ок, щипковый зум запрещён — он и уводил вёрстку */
  overscroll-behavior-y: none;
  touch-action: pan-x pan-y;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 8px;
}

.app {
  width: 100%;
  max-width: var(--app-max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  border-left: 1px solid var(--border-soft);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}

.content {
  flex: 1;
  padding: 0 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  min-width: 0;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
