/* One phone-only reading scale. Keep copy, desktop, controls and previews intact. */
@media (max-width: 767px) {
  :root {
    --mobile-font-body: 14px;
    --mobile-font-page: 24px;
    --mobile-font-flow: 22px;
    --mobile-font-section: 18px;
    --mobile-font-card: 16px;
  }

  :where(.app-shell, .auth-page, .task-dialog, .public-v2) {
    font-size: var(--mobile-font-body);
    line-height: 1.55;
  }

  /* Low specificity changes the default headings without enlarging small labels. */
  :where(.app-shell, .auth-page, .task-dialog) h2 { font-size: 20px; }
  :where(.app-shell, .auth-page, .task-dialog) h3 { font-size: var(--mobile-font-card); }

  .page-heading h1,
  .welcome h1,
  .agenda-toolbar h1,
  .auth-card h1,
  .public-v2 .business-header h1 {
    font-size: var(--mobile-font-page);
    line-height: 1.25;
  }

  .flow-heading h2,
  .success-screen h2 {
    font-size: var(--mobile-font-flow);
    line-height: 1.25;
  }

  .section-title h2,
  .automation-card h2,
  .history-heading h2,
  .settings-grid > .card h2,
  .day-group-title h2,
  .public-v2 .booking-step-heading h2,
  .public-v2 .availability-header h2 {
    font-size: var(--mobile-font-section);
    line-height: 1.3;
  }

  .setup-guide h2 { font-size: 20px; }
  .setup-step h3,
  .module-card h3,
  .demo-mode .demo-path-copy h2,
  .task-body .booking-summary h3,
  .task-body .appointment-message-card h3 {
    font-size: var(--mobile-font-card);
  }
  .history-item h3,
  .appointment-message-card strong { font-size: var(--mobile-font-body); }

  .home-page.landing-v2 .hero-return-title {
    font-size: var(--mobile-font-page);
    line-height: 1.15;
  }
  .showcase-card:not([data-module='retorno']) .showcase-module-name { font-size: var(--mobile-font-flow); }

  /* Keep editable dates at the same readable size as the other form controls. */
  .finance-date input { font-size: 16px; }
}
