/* TORILOC 1.9.241 · Mobile typography pass
 * Un solo livello finale, caricato dopo gli altri fogli TORILOC.
 * Obiettivo: leggibilità reale su smartphone senza alterare la logica dei layout.
 */
@media (max-width: 760px) {
  :root {
    --tlc-mobile-body: 16px;
    --tlc-mobile-copy: 15px;
    --tlc-mobile-meta: 14px;
    --tlc-mobile-label: 13px;
    --tlc-mobile-card-title: 18px;
  }

  /* Base leggibile in tutte le aree TORILOC */
  .tlc-wrap,
  .tlc-mobile-app-home,
  .tlc-mobile-app-shop,
  .tlc-merchant-mobile-app,
  .tlc-operator-page,
  body.tlc-cerco-standalone-page {
    font-size: var(--tlc-mobile-body) !important;
    line-height: 1.5 !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  .tlc-wrap p,
  .tlc-wrap li,
  .tlc-wrap textarea,
  .tlc-wrap input,
  .tlc-wrap select,
  .tlc-mobile-app-home p,
  .tlc-mobile-app-shop p,
  .tlc-merchant-mobile-app p,
  .tlc-operator-page p {
    font-size: var(--tlc-mobile-copy) !important;
    line-height: 1.55 !important;
  }

  .tlc-wrap label,
  .tlc-merchant-mobile-app label,
  .tlc-operator-page label {
    font-size: var(--tlc-mobile-meta) !important;
    line-height: 1.4 !important;
  }

  .tlc-wrap input,
  .tlc-wrap select,
  .tlc-wrap textarea,
  .tlc-merchant-mobile-app input,
  .tlc-merchant-mobile-app select,
  .tlc-merchant-mobile-app textarea,
  .tlc-operator-page input,
  .tlc-operator-page select,
  .tlc-operator-page textarea {
    font-size: 16px !important; /* evita anche lo zoom automatico iOS */
  }

  .tlc-btn,
  .tlc-wrap button,
  .tlc-merchant-mobile-app button,
  .tlc-operator-page button {
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  /* HOME · card principali */
  .tlc-mobile-app-home .tlc-app-welcome p {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }
  .tlc-mobile-app-home .tlc-app-primary-actions > a {
    min-height: 148px !important;
    padding: 18px !important;
  }
  .tlc-mobile-app-home .tlc-app-primary-actions strong {
    font-size: 18px !important;
    line-height: 1.22 !important;
  }
  .tlc-mobile-app-home .tlc-app-primary-actions small {
    margin-top: 7px !important;
    color: rgba(255,255,255,.74) !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
  .tlc-mobile-app-home .tlc-app-citizen-shortcuts-grid strong {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
  .tlc-app-nearby-empty {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  /* Missione singola in Home + elenco Missioni */
  .tlc-near-mission-head small {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  .tlc-near-mission-head h2 {
    font-size: 23px !important;
    line-height: 1.18 !important;
  }
  .tlc-near-mission-head p {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
  .tlc-near-mission-locate {
    min-height: 52px !important;
    font-size: 16px !important;
  }
  .tlc-near-mission-status {
    margin-top: 12px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .tlc-near-mission-card {
    grid-template-columns: 44px minmax(0,1fr) !important;
    gap: 12px !important;
    padding: 15px !important;
  }
  .tlc-near-mission-card i {
    width: 44px !important;
    height: 44px !important;
    font-size: 22px !important;
  }
  .tlc-near-mission-card strong {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }
  .tlc-near-mission-card small {
    margin-top: 5px !important;
    color: #bdc9d8 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
  .tlc-near-mission-card b {
    grid-column: 2 !important;
    text-align: left !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
  }
  .tlc-near-mission-filters button {
    min-height: 40px !important;
    font-size: 13px !important;
  }
  .tlc-near-mission-empty {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .tlc-near-mission-privacy {
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  /* AREA CITTADINO · launcher e pagine interne */
  .tlc-app-user-launcher .tlc-app-user-section-head p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .tlc-app-user-launcher-grid > a,
  .tlc-app-user-launcher-grid > button {
    min-height: 100px !important;
    padding: 14px !important;
    column-gap: 12px !important;
  }
  .tlc-app-user-launcher-grid strong {
    font-size: 15px !important;
    line-height: 1.25 !important;
  }
  .tlc-app-user-launcher-grid small {
    margin-top: 5px !important;
    color: #bdc8da !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
  .tlc-app-user-launcher-grid > b,
  .tlc-app-user-launcher-grid a > b,
  .tlc-app-user-launcher-grid button > b {
    min-width: 23px !important;
    height: 23px !important;
    font-size: 11px !important;
  }
  .tlc-citizen-section-nav a {
    min-height: 42px !important;
    font-size: 14px !important;
  }
  .tlc-citizen-section-hero p {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }
  .tlc-app-user-explore-card small {
    font-size: 11px !important;
  }
  .tlc-app-user-explore-card strong {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }
  .tlc-app-user-explore-card em {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  /* Voci di Quartiere + editor */
  .tlc-voices-mobile-back {
    min-height: 48px !important;
    font-size: 14px !important;
  }
  .tlc-app-voices-hero p,
  .tlc-citizen-editor-intro p {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }
  .tlc-app-voices-search input,
  .tlc-citizen-post-form input,
  .tlc-citizen-post-form select,
  .tlc-citizen-post-form textarea,
  .tlc-app-voice-comment-form textarea {
    font-size: 16px !important;
  }
  .tlc-citizen-post-form label,
  .tlc-app-voice-comment-form label {
    font-size: 14px !important;
  }
  .tlc-app-voice-card.is-featured .tlc-app-voice-body > p,
  .tlc-app-voice-comment-list article p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .tlc-app-voice-comment-list header strong {
    font-size: 14px !important;
  }

  /* AREA NEGOZIANTE */
  .tlc-merchant-app-welcome small {
    font-size: 13px !important;
  }
  .tlc-merchant-app-welcome p {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }
  .tlc-merchant-app-actions {
    gap: 12px !important;
  }
  .tlc-merchant-app-actions button {
    min-height: 94px !important;
    padding: 15px !important;
  }
  .tlc-merchant-app-actions strong {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
  .tlc-merchant-app-actions small {
    color: #b9c5d6 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
  .tlc-merchant-app-section-head small {
    font-size: 11px !important;
  }
  .tlc-merchant-app-section-head h2 {
    font-size: 21px !important;
  }
  .tlc-merchant-app-section-head > button,
  .tlc-merchant-app-section-head > span {
    font-size: 13px !important;
  }
  .tlc-merchant-app-task-list button {
    padding: 14px !important;
  }
  .tlc-merchant-app-task-list strong {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }
  .tlc-merchant-app-task-list small {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }
  .tlc-merchant-app-menu nav a,
  .tlc-merchant-app-menu nav button {
    min-height: 60px !important;
    font-size: 15px !important;
  }
  .tlc-merchant-section-nav,
  .tlc-merchant-section-nav a {
    font-size: 13px !important;
    line-height: 1.4 !important;
  }
  .tlc-merchant-section-hero p,
  .tlc-merchant-section-card p,
  .tlc-merchant-section-list p,
  .tlc-merchant-section-card > small {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }

  /* AREA OPERATORE */
  .tlc-operator-page .tlc-operator-hero p,
  .tlc-operator-page .tlc-operator-meta,
  .tlc-operator-page .tlc-operator-change-list,
  .tlc-operator-page .tlc-operator-content-list,
  .tlc-operator-page .tlc-operator-mission-source,
  .tlc-operator-page .tlc-operator-mission-card p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .tlc-operator-page .tlc-operator-card-head,
  .tlc-operator-page .tlc-badge,
  .tlc-operator-page .tlc-operator-data-row strong {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
  .tlc-operator-page .tlc-operator-data-row span,
  .tlc-operator-page .tlc-operator-reject-form label,
  .tlc-operator-page .tlc-operator-mission-actions label {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  /* TORILOC CERCO */
  .tlc-cerco-form label {
    font-size: 14px !important;
  }
  .tlc-cerco-form label > small,
  .tlc-cerco-location-row span,
  .tlc-cerco-privacy,
  .tlc-cerco-list-head span {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }
  .tlc-cerco-form label > small[data-tlc-cerco-quarter-help] {
    font-size: 12px !important;
  }
  .tlc-cerco-request-top > span {
    font-size: 12px !important;
  }
  .tlc-cerco-request-top > em,
  .tlc-cerco-meta span {
    font-size: 12px !important;
  }

  /* FORM, ALERT, STATI VUOTI, FAQ */
  .tlc-form-alert,
  .tlc-empty,
  .tlc-user-empty,
  .tlc-merchant-empty,
  .tlc-review-edit-closed,
  .tlc-preview-locked {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .tlc-faq-item summary,
  .tlc-guide-faq-item summary,
  details[class*="faq"] summary {
    font-size: 16px !important;
    line-height: 1.4 !important;
  }
  .tlc-faq-item p,
  .tlc-guide-faq-item p,
  details[class*="faq"] p {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }

  /* MODALI / POPUP / BOTTOM SHEET */
  .tlc-activity-modal,
  .tlc-user-activity-modal,
  .tlc-coupon-modal,
  .tlc-checkin-modal,
  .tlc-quick-offer-modal {
    font-size: 16px !important;
  }
  .tlc-activity-modal p,
  .tlc-user-activity-modal p,
  .tlc-coupon-modal p,
  .tlc-checkin-modal p,
  .tlc-quick-offer-modal p {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }
  .tlc-activity-modal label,
  .tlc-user-activity-modal label,
  .tlc-coupon-modal label,
  .tlc-checkin-modal label,
  .tlc-quick-offer-modal label {
    font-size: 14px !important;
  }
  .tlc-activity-modal input,
  .tlc-activity-modal select,
  .tlc-activity-modal textarea,
  .tlc-user-activity-modal input,
  .tlc-user-activity-modal select,
  .tlc-user-activity-modal textarea,
  .tlc-coupon-modal input,
  .tlc-coupon-modal select,
  .tlc-coupon-modal textarea,
  .tlc-checkin-modal input,
  .tlc-checkin-modal select,
  .tlc-quick-offer-modal input,
  .tlc-quick-offer-modal select,
  .tlc-quick-offer-modal textarea {
    font-size: 16px !important;
  }
  .tlc-activity-modal .tlc-modal-close-visible strong {
    font-size: 14px !important;
  }

  /* NAVIGAZIONE INFERIORE: leggibile senza rubare troppo spazio */
  .tlc-app-bottom-nav > a,
  .tlc-app-bottom-nav > button,
  .tlc-merchant-app-nav a,
  .tlc-merchant-app-nav button {
    font-size: 12px !important;
    line-height: 1.15 !important;
    gap: 5px !important;
  }
  .tlc-app-bottom-nav .tlc-app-nav-checkin span {
    font-size: 11px !important;
  }

  /* Menu mobile laterale / overflow */
  .tlc-app-home-menu nav a,
  .tlc-app-menu nav a,
  .tlc-app-menu nav button,
  .tlc-merchant-app-menu nav a,
  .tlc-merchant-app-menu nav button {
    font-size: 15px !important;
    line-height: 1.3 !important;
  }

  /* PWA / messaggi di sistema */
  .tlc-pwa-install-copy span,
  .tlc-pwa-ios-help,
  .tlc-pwa-toast,
  .tlc-navigation-progress-card small {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }
  .tlc-pwa-install-action {
    font-size: 15px !important;
  }
}

/* Telefoni molto stretti: mantieni leggibilità senza far collassare la griglia */
@media (max-width: 380px) {
  .tlc-mobile-app-home .tlc-app-primary-actions strong { font-size: 17px !important; }
  .tlc-mobile-app-home .tlc-app-primary-actions small { font-size: 13px !important; }
  .tlc-app-user-launcher-grid strong,
  .tlc-merchant-app-actions strong { font-size: 14px !important; }
  .tlc-app-user-launcher-grid small,
  .tlc-merchant-app-actions small { font-size: 12px !important; }
  .tlc-app-bottom-nav > a,
  .tlc-app-bottom-nav > button,
  .tlc-merchant-app-nav a,
  .tlc-merchant-app-nav button { font-size: 11px !important; }
}

/* TORILOC 1.9.242 · Seconda passata leggibilita mobile
 * Elimina le ultime micro-tipografie legacy (8–12 px) nelle aree realmente consultate.
 * Mantiene compatti solo badge/eyebrow non essenziali.
 */
@media (max-width: 760px), (max-width:1024px) and (pointer:coarse) {
  /* Contesto temporale / "questa sera nel quartiere" */
  .tlc-app-time-context-copy small,
  .tlc-app-today-head small {
    font-size: 12px !important;
    line-height: 1.35 !important;
    letter-spacing: .055em !important;
  }
  .tlc-app-time-context-copy strong {
    font-size: 17px !important;
    line-height: 1.22 !important;
  }
  .tlc-app-time-context-copy em {
    font-size: 14px !important;
    line-height: 1.42 !important;
  }

  /* Filtri rapidi: devono essere leggibili a colpo d'occhio */
  .tlc-app-home-quick-filters a,
  .tlc-app-explore-filters button {
    min-height: 44px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  /* Esplora il quartiere / Non so cosa fare */
  .tlc-app-inspire-launcher button {
    min-height: 174px !important;
    padding: 18px 16px !important;
  }
  .tlc-app-inspire-launcher span {
    font-size: 28px !important;
    margin-bottom: 12px !important;
  }
  .tlc-app-inspire-launcher strong {
    font-size: 17px !important;
    line-height: 1.25 !important;
  }
  .tlc-app-inspire-launcher small {
    margin-top: 7px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    opacity: .88 !important;
  }

  /* Contenuti del popup ispirazione */
  .tlc-inspire-head small,
  .tlc-inspire-step {
    font-size: 12px !important;
  }
  .tlc-inspire-head p {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }
  .tlc-inspire-card strong {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }
  .tlc-inspire-card small,
  .tlc-inspire-card em {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
  .tlc-inspire-route-open,
  .tlc-inspire-actions button,
  .tlc-inspire-empty {
    font-size: 15px !important;
    line-height: 1.4 !important;
  }

  /* Missione Home: testo di servizio e dettagli non devono sembrare note legali */
  .tlc-near-mission-head small {
    font-size: 13px !important;
  }
  .tlc-near-mission-head h2 {
    font-size: 25px !important;
    line-height: 1.18 !important;
  }
  .tlc-near-mission-head p,
  .tlc-near-mission-status {
    font-size: 16px !important;
    line-height: 1.55 !important;
  }
  .tlc-near-mission-card strong {
    font-size: 17px !important;
  }
  .tlc-near-mission-card small,
  .tlc-near-mission-card b,
  .tlc-near-mission-filters button {
    font-size: 15px !important;
  }
  .tlc-near-mission-privacy {
    font-size: 14px !important;
  }

  /* Oggi nel quartiere */
  .tlc-app-today-head>span {
    font-size: 12px !important;
  }
  .tlc-app-today-item small,
  .tlc-app-today-item:first-child small {
    font-size: 13px !important;
    line-height: 1.35 !important;
  }

  /* Card e scorciatoie cittadino */
  .tlc-mobile-app-home .tlc-app-citizen-shortcuts-grid strong {
    font-size: 16px !important;
  }
  .tlc-mobile-app-home .tlc-app-citizen-shortcuts-grid small {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
  .tlc-app-user-explore-card small {
    font-size: 13px !important;
  }
  .tlc-app-user-explore-card strong {
    font-size: 17px !important;
  }
  .tlc-app-user-explore-card em {
    font-size: 14px !important;
  }

  /* Negoziante: elimina gli ultimi microtesti operativi */
  .tlc-merchant-app-welcome small,
  .tlc-merchant-app-section-head small {
    font-size: 14px !important;
  }
  .tlc-merchant-app-actions strong,
  .tlc-merchant-app-task-list strong {
    font-size: 16px !important;
  }
  .tlc-merchant-app-actions small,
  .tlc-merchant-app-task-list small {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }
  .tlc-merchant-accessibility-view .tlc-access-dedicated-copy>p,
  .tlc-merchant-accessibility-view .tlc-access-dedicated-reassurance,
  .tlc-merchant-accessibility-view .tlc-access-dedicated-card li b,
  .tlc-merchant-accessibility-view .tlc-access-dedicated-card li small,
  .tlc-merchant-accessibility-view .tlc-access-dedicated-note strong,
  .tlc-merchant-accessibility-view .tlc-access-dedicated-note p {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  /* Operatore / CERCO / notifiche: minimo reale di lettura */
  .tlc-operator-page .tlc-operator-card-head,
  .tlc-operator-page .tlc-badge,
  .tlc-operator-page .tlc-operator-data-row strong,
  .tlc-cerco-form label > small,
  .tlc-cerco-location-row span,
  .tlc-cerco-privacy,
  .tlc-cerco-list-head span,
  .tlc-cerco-request-top > span,
  .tlc-cerco-request-top > em,
  .tlc-cerco-meta span {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  /* Dock inferiore: il nome delle sezioni e parte della navigazione, non una didascalia */
  .tlc-app-bottom-nav > a,
  .tlc-app-bottom-nav > button,
  .tlc-merchant-app-nav a,
  .tlc-merchant-app-nav button {
    font-size: 14px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
  }
  .tlc-app-bottom-nav .tlc-app-nav-checkin span {
    font-size: 13px !important;
  }

  /* Messaggi PWA / sistema */
  .tlc-pwa-install-copy span,
  .tlc-pwa-ios-help,
  .tlc-pwa-toast,
  .tlc-navigation-progress-card small {
    font-size: 14px !important;
  }
}

/* Anche sui telefoni stretti non riduciamo piu i testi funzionali. */
@media (max-width: 380px) {
  .tlc-app-user-launcher-grid strong,
  .tlc-merchant-app-actions strong { font-size: 16px !important; }
  .tlc-app-user-launcher-grid small,
  .tlc-merchant-app-actions small { font-size: 14px !important; }
  .tlc-app-bottom-nav > a,
  .tlc-app-bottom-nav > button,
  .tlc-merchant-app-nav a,
  .tlc-merchant-app-nav button { font-size: 13px !important; }
}
