/* Mobile viewport fixes.
   Important: iOS Safari automatically zooms a focused form field when its
   computed font size is below 16px. Because Yegu changes screens without a
   full page reload, that zoom can remain after login and make the signed-in
   dashboard look wider than the phone. Keep every mobile form control at
   16px or larger so Safari never enters that zoom state. */
@media (max-width: 640px) {
  html {
    width: 100%;
    max-width: 100%;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body,
  #root {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  input,
  select,
  textarea,
  .auth-form input,
  .auth-form select,
  .auth-form textarea {
    font-size: 16px !important;
  }

  .landing-page {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
  }

  .landing-header,
  .landing-main[style*="max-width: 900px"] {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
  }

  .landing-main[style*="max-width: 900px"] {
    display: block !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .landing-main[style*="max-width: 900px"] > section,
  .landing-main[style*="max-width: 900px"] .dashboard-card,
  .landing-main[style*="max-width: 900px"] .dashboard-event {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .landing-main[style*="max-width: 900px"] .landing-title,
  .landing-main[style*="max-width: 900px"] .landing-description,
  .landing-main[style*="max-width: 900px"] .event-info {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  .landing-main[style*="max-width: 900px"] .landing-title {
    font-size: clamp(36px, 11vw, 44px) !important;
    letter-spacing: -1.8px !important;
    line-height: 1.02 !important;
  }

  .landing-main[style*="max-width: 900px"] .landing-description {
    font-size: 17px !important;
    line-height: 1.5 !important;
  }

  .landing-main[style*="max-width: 900px"] .dashboard-card {
    padding: 18px !important;
    border-radius: 26px !important;
  }

  .landing-main[style*="max-width: 900px"] .dashboard-event {
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 12px !important;
  }
}


/* Mobile form audit: avoid compressed two-column controls on narrow phones */
@media (max-width: 480px) {
  .auth-form > div[style*="grid-template-columns"],
  .auth-form > label + div[style*="grid-template-columns"],
  .auth-form div[style*="grid-template-columns: 1fr 1fr"],
  .auth-form div[style*="grid-template-columns: minmax(0, 1fr) minmax(0, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  .auth-form button,
  .auth-form input,
  .auth-form select,
  .auth-form textarea {
    max-width: 100%;
    box-sizing: border-box;
  }

  .auth-card {
    width: calc(100% - 24px);
    max-width: calc(100% - 24px);
    box-sizing: border-box;
  }
}
