/* Loaded last so legacy auth breakpoints cannot override the mobile flow. */
@media (max-width: 760px) {
  .cr-auth { min-height: 100dvh; display: flex; flex-direction: column; overflow-x: hidden; background: #fff; }
  .cr-auth__story { min-height: auto; padding: max(18px,env(safe-area-inset-top)) 20px 28px; flex: 0 0 auto; gap: 30px; border-radius: 0 0 28px 28px; }
  .cr-auth__story::before { width: 300px; height: 300px; right: -120px; top: -130px; }
  .cr-auth__story::after { display: none; }
  .cr-auth__copy { margin-top: 12px; }
  .cr-auth__eyebrow { font-size: 12px; }
  .cr-auth__headline { margin: 9px 0 0; font-size: clamp(28px,8.6vw,40px); line-height: 1.08; letter-spacing: -.045em; }
  .cr-auth__copy p, .cr-auth__signals { display: none; }
  .cr-auth__panel { display: block; min-width: 0; padding: 28px 20px max(28px,env(safe-area-inset-bottom)); }
  .cr-auth__form { width: 100%; max-width: 480px; margin: 0 auto; }
  .cr-auth__topline { margin-bottom: 24px; }
  .cr-auth__locale button { min-width: 42px; min-height: 36px; }
  .cr-auth__form h1 { font-size: 28px; }
  .cr-auth__form > p { margin-bottom: 24px; font-size: 15px; }
  .cr-auth__field { margin-top: 16px; }
  .cr-auth__field input { width: 100%; height: 50px; font-size: 16px; }
  .cr-auth__submit { height: 50px; margin-top: 22px; font-size: 16px; }
  .cr-auth__actions { justify-content: space-between; gap: 20px; }
  .cr-auth__actions button { min-height: 44px; font-size: 15px; }
}
@media (max-width: 380px) {
  .cr-auth__story { padding-left: 16px; padding-right: 16px; border-radius: 0 0 22px 22px; }
  .cr-auth__panel { padding-left: 16px; padding-right: 16px; }
  .cr-auth__headline { font-size: 27px; }
}
@media (max-width: 760px) and (orientation: landscape) {
  .cr-auth__story { padding-bottom: 18px; gap: 16px; }
  .cr-auth__copy { display: none; }
  .cr-auth__panel { padding-top: 20px; }
}
/* Modern phones can exceed 760 CSS px in landscape. Height is the more useful
   signal here; keep the complete form above the fold before the keyboard opens. */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 950px) {
  .cr-auth { min-height: 100dvh; grid-template-columns: minmax(220px,34%) minmax(0,1fr); overflow-x: hidden; }
  .cr-auth__story { min-height: 100dvh; padding: max(16px,env(safe-area-inset-top)) 22px max(16px,env(safe-area-inset-bottom)); justify-content: flex-start; }
  .cr-auth__story::before { width: 260px; height: 260px; right: -130px; top: -140px; }
  .cr-auth__story::after, .cr-auth__copy, .cr-auth__signals { display: none; }
  .cr-auth__panel { display: block; min-width: 0; padding: max(12px,env(safe-area-inset-top)) 28px max(12px,env(safe-area-inset-bottom)); }
  .cr-auth__form { width: min(460px,100%); margin: 0 auto; }
  .cr-auth__topline { margin-bottom: 4px; }
  .cr-auth__locale button { min-width: 40px; min-height: 32px; }
  .cr-auth__form h1 { font-size: 23px; }
  .cr-auth__form > p { display: none; }
  .cr-auth__field { gap: 4px; margin-top: 8px; }
  .cr-auth__field input { height: 42px; font-size: 16px; }
  .cr-auth__submit { height: 42px; margin-top: 12px; font-size: 15px; }
  .cr-auth__actions { margin-top: 10px; }
  .cr-auth__actions button { min-height: 32px; }
}
