/* Mobile presentation only. Payment behaviour and desktop styles stay unchanged. */
@media (max-width: 920px) {
  body { overflow-wrap: anywhere; }

  /* Let grid/flex content shrink instead of widening or clipping the page. */
  .hero-grid-v6 { grid-template-columns: minmax(0, 1fr); }
  .hero-grid-v6 > *, .checkout-grid > *, .field-grid > *,
  .ticket-type-grid > *, .participant-row > *, .detail-grid > *,
  .stats-grid > *, .admin-alerts > *, .footer-grid > *,
  .brand > div, .footer-brand > div { min-width: 0; }

  /* Readable controls avoid focus zoom on iPhone without disabling pinch zoom. */
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  select, textarea {
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    font-size: max(16px, 1rem);
    line-height: 1.4;
  }
  .btn { min-height: 44px; max-width: 100%; text-align: center; }
  .btn svg, .footer-brand img, .form-section-title > span { flex-shrink: 0; }

  .site-header .header-inner { gap: 12px; }
  .site-header .brand { flex: 1 1 auto; }
  .site-header .brand img { flex-shrink: 0; }
  .site-header .brand strong { display: block; }
  .site-header .nav-actions { flex: 0 0 auto; }

  .trust-card-v6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-card-v6 .trust-item { min-width: 0; gap: 10px; padding: 16px; }
  .trust-card-v6 .trust-item:nth-child(2)::after { display: none; }
  .trust-card-v6 .trust-item:nth-child(-n+2) { border-bottom: 1px solid var(--ui-line); }
  .trust-copy strong, .trust-copy small { white-space: normal; }
  .trust-copy small { line-height: 1.35; }

  .field-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .check { min-height: 44px; align-items: flex-start; padding-block: 8px; }
  .check input { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; }
  .check > span { min-width: 0; }
  .check-all { padding: 14px 16px; }
  .summary-line > strong { flex-shrink: 0; text-align: right; }
  .payment-meta { flex-wrap: wrap; }
  .table-scroll { max-width: 100%; -webkit-overflow-scrolling: touch; }
  .table-title { flex-wrap: wrap; gap: 8px; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
  .footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 680px) {
  .container, .narrow, .tiny, .hero-shell-v6 { width: calc(100% - 24px); }
  .site-header .header-inner { padding-inline: 12px; gap: 10px; }
  .site-header .brand { gap: 10px; }
  .site-header .brand img { width: 42px; height: 42px; }
  .site-header .brand strong { line-height: 1.25; }
  .site-header .nav-actions .btn-small { padding-inline: 13px; }

  .hero.hero-v6 h1 { font-size: clamp(36px, 10.5vw, 56px); line-height: 1.03; }
  .hero-grid-v6 { padding-block: 0; }
  .hero-copy-v6 { padding-block: 28px 12px; }
  .hero-actions-v6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-actions-v6 .btn { gap: 8px; }
  .trust-card-v6 .trust-item { padding: 14px 12px; }
  .trust-icon { width: 28px; height: 28px; }
  .trust-copy strong { font-size: 16px; }

  /* Natural flow keeps the photo cards apart even with wrapped/larger text. */
  .hero-visual-v6 {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    min-height: 0;
    padding: 20px;
    gap: 16px;
  }
  .visual-info-card, .visual-date-card {
    position: relative;
    inset: auto;
    width: 100%;
  }
  .visual-logo-badge {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-shrink: 0;
  }

  .section { padding-block: 40px; }
  .page-hero { padding-block: 36px; }
  .page-hero.compact h1, .status-card h1, .ticket-check h1, .admin-head h1 {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1.12;
  }
  .page-hero p { font-size: 16px; }
  .form-card, .status-card, .ticket-check, .detail-card, .scanner-card, .legal-card {
    padding: 22px 20px;
  }
  .checkout-grid, .field-grid.two { grid-template-columns: minmax(0, 1fr); }
  .form-section-title { align-items: flex-start; gap: 10px; }
  .form-section-title h2 { font-size: 20px; line-height: 1.25; }
  label { font-size: 14px; }
  .privacy-first-step { padding: 16px; }
  .participant-row { grid-template-columns: 36px minmax(0, 1fr); }
  .participant-row label, .participant-row label:last-child { grid-column: 1 / -1; }
  .participant-kind { line-height: 1.4; }
  .status-actions { flex-direction: column; }
  .status-actions > .btn { width: 100%; }
  .footer-brand { align-items: flex-start; }
}

/* Keep the form visible when a phone is held horizontally. */
@media (max-width: 920px) and (max-height: 500px) {
  .site-header { position: static; }
}
