:root {
  --header-height: var(--at-cabecalho-altura);
  --layout-viewport-height: 100dvh;
  --screen-height: calc(var(--viewport-height, var(--layout-viewport-height)) - var(--header-height));
}
@media (hover: none) and (pointer: coarse) {
  @supports (height: 100svh) {
    :root { --layout-viewport-height: 100svh; }
  }
}
html { scroll-padding-top: var(--header-height); scroll-snap-type: y proximity; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
.scene { min-height: var(--screen-height); scroll-snap-align: start; scroll-margin: 0; }
html.free-scroll { scroll-snap-type: none; }
html.free-scroll .scene { scroll-snap-stop: normal; }
@media (prefers-reduced-motion: no-preference) {
  html.snap-ready:not(.free-scroll) { scroll-snap-type: y mandatory; }
  html.snap-ready:not(.free-scroll) .scene { scroll-snap-stop: always; }
}
html:has([data-scroll-livre]:focus-within),
html:has(dialog[data-scroll-livre][open]),
html.snap-ready:has([data-scroll-livre]:focus-within),
html.snap-ready:has(dialog[data-scroll-livre][open]) { scroll-snap-type: none; }
html.static-intro { scroll-snap-type: none; }
html.static-intro .scene { scroll-snap-stop: normal; }
@media (prefers-reduced-motion: reduce) {
  html, html.snap-ready:not(.free-scroll), html.free-scroll { scroll-snap-type: none; }
}
