/* Size the complete tablet welcome page against the usable browser viewport. */
@media (min-width: 600px) and (pointer: coarse) {
  #app .login-layout {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.5;
  }
  #app .login-layout .login-page { flex: 1 0 auto; padding: 12px 24px 8px; align-items: center; }
  #app .login-layout .login-shell { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr); gap: 24px; width: 100%; max-width: 1280px; }
  #app .login-layout .login-story { display: grid; grid-template-rows: auto auto auto auto; gap: 10px; padding: 0; width: 100%; }
  #app .login-layout .brand-header { grid-row: auto; min-height: 36px; height: 36px; }
  #app .login-layout .brand-mark { width: 36px; height: 36px; }
  #app .login-layout .brand-name-cn { font-size: 19px; }
  #app .login-layout .brand-signature { font-size: 12px; gap: 2px; margin-left: 4px; padding-left: 10px; }
  #app .login-layout .brand-mission { font-size: 11px; }
  #app .login-layout .story-copy { grid-row: auto; margin: 0; }
  #app .login-layout .story-title { font-size: clamp(25px, 2.5vw, 32px); line-height: 1.25; }
  #app .login-layout .story-description { display: block; margin-top: 5px; font-size: 13px; line-height: 1.4; }
  #app .login-layout .world-composition {
    grid-row: auto; display: grid; grid-template-columns: minmax(200px, 1.15fr) minmax(0, 1fr);
    grid-template-rows: 32px minmax(0, 1fr); height: clamp(220px, calc(100vh - 320px), 370px);
    height: clamp(220px, calc(100dvh - 320px), 370px); gap: 6px 12px; margin: 0; align-items: center;
  }
  #app .login-layout .learning-demo { position: relative; inset: auto; grid-area: 1 / 1 / 3 / 2; width: 100%; padding: 10px 12px; transform: none; border-radius: 18px; }
  #app .login-layout .demo-card-heading { margin-bottom: 6px; }
  #app .login-layout .demo-heading-icon { width: 22px; height: 22px; }
  #app .login-layout .demo-word-image { width: clamp(64px, 6vw, 88px); height: 62px; }
  #app .login-layout .demo-word-top { gap: 8px; }
  #app .login-layout .demo-word { font-size: 24px; }
  #app .login-layout .demo-phonetic, #app .login-layout .demo-definition { font-size: 10px; margin-top: 3px; }
  #app .login-layout .demo-word-info { padding-top: 6px; }
  #app .login-layout .demo-example { font-size: 12px; }
  #app .login-layout .demo-translation { margin-top: 3px; }
  #app .login-layout .demo-input-wrap { height: 30px; margin-top: 6px; }
  #app .login-layout .demo-input { height: 28px; font-size: 13px; }
  #app .login-layout .demo-status { margin-top: 3px; font-size: 9px; }
  #app .login-layout .hero-bubble { grid-area: 1 / 2; position: static; padding: 6px 8px; font-size: 11px; white-space: nowrap; }
  #app .login-layout .hero-bubble text { font-size: 12px; }
  #app .login-layout .learning-hero-art { grid-area: 2 / 2; position: relative; inset: auto; width: 100%; height: 100%; aspect-ratio: auto; overflow: hidden; }
  #app .login-layout .hero-motion { position: absolute; top: 0; left: -84%; width: 200%; height: 100%; }
  #app .login-layout .discovery-strip { grid-row: auto; display: grid; margin: 0; gap: 10px; }
  #app .login-layout .practice-preview, #app .login-layout .theme-preview { min-height: 64px; height: 64px; border-radius: 12px; }
  #app .login-layout .preview-copy { padding: 8px 10px; width: 100%; }
  #app .login-layout .preview-title { font-size: 16px; }
  #app .login-layout .preview-description { font-size: 11px; }
  #app .login-layout .form-panel { grid-row: auto; align-self: center; width: 100%; min-height: 0; padding: 22px 24px; border-radius: 24px; }
  #app .login-layout .form-heading { margin-bottom: 14px; }
  #app .login-layout .form-title { font-size: 27px; line-height: 1.3; }
  #app .login-layout .login-modes { margin-bottom: 14px; gap: 6px; }
  #app .login-layout .login-modes button { min-height: 42px; padding: 9px 2px; font-size: 14px; }
  #app .login-layout .form-group { margin-bottom: 12px; }
  #app .login-layout .password-group { margin-bottom: 14px; }
  #app .login-layout .field-label, #app .login-layout .field-hint { margin-bottom: 6px; }
  #app .login-layout .input-row { height: 46px; }
  #app .login-layout .input { height: 44px; line-height: 44px; }
  #app .login-layout .btn-primary { height: 48px; }
  #app .login-layout .agreement-check { margin-top: 12px; font-size: 11px; line-height: 1.6; }
  #app .login-layout .minor-tip { margin-top: 5px; font-size: 10px; }
  #app .login-layout .form-footer { margin-top: 12px; }
  #app .login-layout .qr-frame, #app .login-layout .qr-placeholder { width: 120px; height: 120px; }
  #app .login-layout .wechat-qr-image { width: 110px; height: 110px; }
  #app .login-layout .wechat-qr-button { height: 40px; line-height: 40px; }
  #app .login-layout .site-footer { padding: 6px 12px 8px; gap: 2px 12px; font-size: 10px; line-height: 1.4; }
}
@media (min-width: 600px) and (pointer: coarse) and (orientation: portrait) {
  #app .login-layout .login-page { padding: 12px 24px 8px; }
  #app .login-layout .login-shell { grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 680px; }
  #app .login-layout .login-story { gap: 8px; }
  #app .login-layout .story-title { font-size: 25px; }
  #app .login-layout .story-title-accent { display: inline; }
  #app .login-layout .world-composition { height: 212px; }
  #app .login-layout .practice-preview, #app .login-layout .theme-preview { height: 58px; min-height: 58px; }
  #app .login-layout .form-panel { padding: 16px 24px; }
  #app .login-layout .form-title { font-size: 25px; }
  #app .login-layout .form-heading, #app .login-layout .login-modes { margin-bottom: 10px; }
}
/* When the software keyboard opens, retain natural scrolling to every field. */
@media (min-width: 600px) and (pointer: coarse) and (max-height: 560px) {
  #app .login-layout .login-page { padding: 8px 20px; }
  #app .login-layout .login-shell { gap: 20px; }
  #app .login-layout .login-story { gap: 8px; }
  #app .login-layout .story-title { font-size: 25px; }
  #app .login-layout .world-composition { height: 212px; }
  #app .login-layout .practice-preview, #app .login-layout .theme-preview { min-height: 58px; height: 58px; }
  #app .login-layout .form-panel { padding: 16px 20px; }
  #app .login-layout .form-heading, #app .login-layout .login-modes { margin-bottom: 10px; }
  #app .login-layout .form-title { font-size: 25px; }
}
