/* Phones get their own composition: the headline and the form open the page, and the
   pets follow the app preview. Load after every other stylesheet. */

@media (max-width: 600px) {
  html { -webkit-text-size-adjust: 100%; }

  .journal-study.onboarding-style .header { min-height: 60px; }
  .journal-study.onboarding-style .header nav { gap: 18px; font-size: 13px; }
  .journal-study.onboarding-style .availability { font-size: 12px; }

  /* The pets leave the hero and follow the app preview, side by side on one baseline and
     cropped a little by the screen edges. The butterfly rests above the cat and its trail
     runs off the right edge, as on desktop. */
  .journal-study.onboarding-style main { display: flex; flex-direction: column; }
  .journal-study.onboarding-style .hero-scene { display: contents; }
  .journal-study.onboarding-style .hero-art { order: 1; height: clamp(240px, 66vw, 360px); margin-top: -12px; }
  .journal-study.onboarding-style .app-preview ~ section { order: 2; }
  .journal-study.onboarding-style .mascot--dog { width: 60%; left: -6%; top: auto; bottom: 0; }
  .journal-study.onboarding-style .mascot--cat { width: 55%; right: -6%; top: auto; bottom: 0; }
  .journal-study.onboarding-style .butterfly-scene { left: auto; right: 16%; top: -10px; }
  .journal-study.onboarding-style .butterfly-flight { left: 0; }
  /* The pets reach the screen edges themselves, so the edge clouds stay out. */
  .journal-study.onboarding-style .scene-edge { display: none; }

  /* The title scales so its larger second line stays on one row. */
  .journal-study.onboarding-style .composition { padding: 52px 20px 0; }
  .journal-study.onboarding-style h1 { font-size: min(42px, (100vw - 48px) / 10.3); }

  /* One row, with controls sized for a thumb. */
  .journal-study.onboarding-style .waitlist { max-width: 420px; margin-top: 26px; padding-bottom: 0; }
  .journal-study.onboarding-style #bot-check { margin-top: 108px; }
  .journal-study.onboarding-style .form-controls { gap: 8px; }
  .journal-study.onboarding-style .form-controls input { height: 54px; padding-inline: 16px; font-size: 16px; }
  .journal-study.onboarding-style .join-control { width: auto; }
  .journal-study.onboarding-style .join-control button { height: 54px; padding-inline: 18px; font-size: 15px; white-space: nowrap; }
  .journal-study.onboarding-style .form-note { max-width: calc(100% - 150px); text-align: left; }
  .journal-study.onboarding-style .invitation { top: calc(100% + 4px); }
  .journal-study.onboarding-style .invitation svg { width: 84px; height: 62px; }


  .journal-study.onboarding-style .brand-footer .footer-meta { font-size: 12px; }
}

@media (max-width: 374px) {
  .journal-study.onboarding-style .availability { display: none; }
}

/* The field and button share a row only where the whole placeholder fits beside the button.
   Below that the field takes the full width, so it never reads "メールアドレスを". The widths
   are measured per language: English, French and Italian fit from 390px, Spanish from 400px,
   and Greek, German, Japanese and Portuguese, with longer placeholders or buttons, from 430px. */
@media (max-width: 389.98px) {
  .journal-study.onboarding-style .form-controls { flex-direction: column; gap: 10px; }
  .journal-study.onboarding-style .join-control { width: 100%; }
  .journal-study.onboarding-style .form-note { max-width: calc(100% - 100px); }
}
@media (max-width: 399.98px) {
  .journal-study.onboarding-style:is(:lang(es), :lang(el), :lang(de), :lang(ja), :lang(pt)) .form-controls { flex-direction: column; gap: 10px; }
  .journal-study.onboarding-style:is(:lang(es), :lang(el), :lang(de), :lang(ja), :lang(pt)) .join-control { width: 100%; }
  .journal-study.onboarding-style:is(:lang(es), :lang(el), :lang(de), :lang(ja), :lang(pt)) .form-note { max-width: calc(100% - 100px); }
}
@media (max-width: 429.98px) {
  .journal-study.onboarding-style:is(:lang(el), :lang(de), :lang(ja), :lang(pt)) .form-controls { flex-direction: column; gap: 10px; }
  .journal-study.onboarding-style:is(:lang(el), :lang(de), :lang(ja), :lang(pt)) .join-control { width: 100%; }
  .journal-study.onboarding-style:is(:lang(el), :lang(de), :lang(ja), :lang(pt)) .form-note { max-width: calc(100% - 100px); }
}
