/* Fit the four activities to the available screen, not a fixed image height.
   On very short/narrow screens, retain normal scrolling and readable controls. */
body[data-page=home] #site-footer{position:static}
@media (min-width:360px) and (min-height:540px){
  body[data-page=home]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:100dvh;min-height:0;padding-bottom:0}
  body[data-page=home]>main.flyer-home{min-height:0;padding:8px 0;overflow:visible}
  body[data-page=home] .flyer-content{height:100%;min-height:0;max-height:760px;margin:auto}
  body[data-page=home] .flyer-activity-grid{height:100%;min-height:0;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr) auto minmax(0,1fr);gap:4px 12px;padding:0}
  body[data-page=home] .flyer-activity-grid .flyer-activity{min-height:0;min-width:0;margin:0;padding:2px 4px;gap:0}
  body[data-page=home] .flyer-activity-grid .activity-more-link{display:block;height:100%;min-height:0;width:100%;padding:0}
  body[data-page=home] .flyer-activity-grid .activity-more-link>img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
  body[data-page=home] .flyer-activity-grid .activity-more-link>video{width:100%;height:100%;object-fit:contain}
  body[data-page=home] p.home-activity-sentence{padding:2px 0;margin:0;font-size:clamp(18px,2.5vw,32px);line-height:1.25}
}
@media (max-width:650px) and (min-width:360px) and (min-height:540px){
  body[data-page=home] .flyer-activity-grid{column-gap:6px}
}
@media print{
  body[data-page=home]{display:block;height:auto;min-height:0}
  body[data-page=home] .flyer-content,body[data-page=home] .flyer-activity-grid{height:auto}
  body[data-page=home] .flyer-activity-grid .activity-more-link>img{height:200px}
}
