/* ActuallySpeak Kids — tablet + laptop layer.
   Loaded LAST. Phones (under 700px wide) are untouched: every rule below sits
   inside a min-width media query. The app stays one clear column (it is a
   one-thing-at-a-time app for small children) but the frame grows with the
   screen, the type scales up, and tile grids use the extra room.
   --ask-w is the frame width; --ask-fs multiplies the type. */
:root { --ask-w: 520px; --ask-fs: 1; }

@media (min-width: 700px) {
  :root { --ask-w: 700px; --ask-fs: 1.14; }
}
@media (min-width: 1000px) {
  :root { --ask-w: 820px; --ask-fs: 1.26; }
}
@media (min-width: 1400px) {
  :root { --ask-w: 900px; --ask-fs: 1.36; }
}
/* a short laptop screen (e.g. 1280x720): don't let the type outgrow the height */
@media (min-width: 1000px) and (max-height: 760px) {
  :root { --ask-fs: 1.14; }
}

@media (min-width: 700px) {
  /* type: everything sized in em follows body */
  body { font-size: calc(17px * var(--ask-textscale) * var(--ask-fs)); }

  /* the frame */
  #ask-root { max-width: var(--ask-w); }
  .ask-nav { max-width: var(--ask-w); }
  html[class*="theme-"] #ask-root::before { max-width: var(--ask-w); }
  .askonb__bar, .askonb__in, .askonb__top, .askonb--v2 .ob2 { max-width: var(--ask-w); }
  .a2r-cover__body, .a2r-rem__body, .a2r-page, .a2r-acts, .a2r-q__body { max-width: calc(var(--ask-w) - 40px); }
  .ra-sum { max-width: calc(var(--ask-w) - 40px); }

  /* the A2 reading screen and the reader's bottom bar are positioned against
     the frame too */
  .a2w-bg, .askrd-rd__bar { max-width: var(--ask-w); }

  /* centred pop-ups read better as cards than as bottom sheets on a big screen */
  .ask-sheet, .askrd-ov, .asktalk-ov, .askfun-ov, .sk-ov { align-items: center; }
  .ask-sheet__in, .ob5-sheet { border-radius: 26px; max-height: 86vh; }

  /* tab bar: bigger targets */
  .ask-nav button { min-height: 66px; }
  .ask-nav button span { font-size: 28px; }

  /* little hand-sized controls get a bit bigger */
  .ask-iconbtn { width: 46px; height: 46px; font-size: 20px; }

  /* pictures in stories never need to stretch beyond their real 1000px */
  img { max-width: 100%; }
}
