/* =========================================================
   Birthday Flow
   Shared recipient-side scrolling behavior for birthday themes.
   The apology theme is intentionally not opted into this layer.
   ========================================================= */

html{
  scroll-behavior:smooth;
  scroll-padding-top:0;
}

body.birthday-flow{
  min-height:100%;
  height:auto;
  padding-block:0;
  display:block;
  overflow-x:hidden;
  overflow-y:visible;
  overscroll-behavior-y:auto;
}

/* Turn the old nested, snapping "book" into one continuous document. */
body.birthday-flow :is(#book,#glamBook,.book){
  height:auto;
  min-height:100dvh;
  margin-inline:auto;
  overflow:visible;
  scroll-snap-type:none;
  overscroll-behavior:auto;
  border-radius:0;
  box-shadow:0 0 80px rgba(0,0,0,.22);
  scrollbar-width:auto;
}

body.birthday-flow :is(#book,#glamBook,.book)::-webkit-scrollbar{
  width:auto;
}

body.birthday-flow :is(.page,.section,.chapter){
  min-height:100dvh;
  margin-top:-1px;
  scroll-snap-align:none;
  scroll-snap-stop:normal;
}

body.birthday-flow :is(.page,.section,.chapter) > *{
  min-width:0;
  max-width:100%;
}

/* The page itself now communicates that more content follows. */
body.birthday-flow .scroll-chevron{
  display:none;
}

@media (max-width:540px){
  body.birthday-flow :is(#book,#glamBook,.book){
    width:100%;
    max-width:none;
    box-shadow:none;
  }
  body.birthday-flow :is(button,[role="button"]){min-width:44px;min-height:44px}
  body.birthday-flow :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea){font-size:16px}
  body.birthday-flow input[type="range"]{min-height:44px}
}

@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}
