/* iPhone Duo layouts, for the iOS app only.
   The Duo has two screens: folded 466x678 pt (a short, wide phone) and open 626x890 pt (a
   small tablet). Every rule here sits behind html.os-ios (set by os.js in the app on iPhone and
   iPad) and a size window that no other Apple device falls in: every other iPhone is at most
   440 pt wide, and iPads are at least 744 pt wide and run the app full screen. So regular
   iPhones, iPads, Android and the website keep exactly the layout they had. */

/* ---- Duo open (626x890): use the width ---- */
@media (min-width: 560px) and (max-width: 700px) and (min-height: 800px) and (max-height: 960px) and (orientation: portrait) {
  /* home: the four modes as a 2 x 2 grid, so all of them show on the first screen */
  html.os-ios .dyn-choose { display: grid; grid-template-columns: 1fr 1fr; max-width: 600px; gap: 12px; }
  html.os-ios .dyn-choose .dyn-choice, html.os-ios .dyn-choose .fd-hof-entry { height: 100%; }
  html.os-ios .fd-hof-entry { align-items: flex-start; text-align: left; }
  html.os-ios .fd-settings { max-width: 600px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  html.os-ios .fd-settings > * { margin: 0 !important; }
  html.os-ios .fd-settings > .dyn-btn { grid-column: 1 / -1; }
  html.os-ios .dyn-sub { max-width: 540px; }

  /* Quick Fight: two fighters a row instead of one stretched row */
  html.os-ios .qf-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

  /* new career: the form was a 340 pt column in the middle of the screen */
  html.os-ios .cr-preview, html.os-ios .cr-row2, html.os-ios .cr-block,
  html.os-ios .dyn-setup .dyn-field, html.os-ios .dyn-setup .dyn-btn { max-width: 540px; }
  html.os-ios .cr-styles { grid-template-columns: 1fr 1fr 1fr; }

  /* sign-in and fine print on Fight Online */
  html.os-ios .ol-signin, html.os-ios .ol-fine { max-width: 420px; }
}

/* ---- Duo folded (466x678): a short screen, so the headers give up some height ---- */
@media (min-width: 450px) and (max-width: 520px) and (max-height: 720px) and (orientation: portrait) {
  html.os-ios .dyn-setup { padding-top: 10px; }
  html.os-ios .fd-mark { margin-bottom: 10px; }
  html.os-ios .dyn-h1 { font-size: 44px; margin: 4px 0 8px; }
  html.os-ios .dyn-sub { font-size: 14px; line-height: 1.5; margin-bottom: 16px; }
  html.os-ios .dyn-choose { gap: 10px; }
  html.os-ios .dyn-choice { padding-top: 14px; padding-bottom: 14px; }
  html.os-ios .dyn-choice-emoji { font-size: 26px; }
}
