/*
 * ThailandMate customer-mobile readability system.
 * Primary audience: travellers who prefer larger, calmer type, including 50+ users.
 * Keep the information hierarchy consistent without turning every label into a headline.
 */

@media (max-width: 760px) {
  :root {
    --tm-mobile-body: 16px;
    --tm-mobile-help: 14px;
    --tm-mobile-h1: clamp(28px, 8vw, 32px);
    --tm-mobile-h2: clamp(22px, 6.4vw, 26px);
    --tm-mobile-h3: 20px;
  }

  html {
    width: 100%;
    overflow-x: hidden;
    font-size: var(--tm-mobile-body);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    color: #101613;
    font-size: var(--tm-mobile-body);
    font-weight: 500;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
  }

  main, header, nav, section, article, .page, .shell, .container, .content, .panel, .card {
    box-sizing: border-box;
    max-width: 100%;
  }

  h1, .hero-copy h1, .stay-hero-copy h1 {
    font-size: var(--tm-mobile-h1) !important;
    font-weight: 900;
    line-height: 1.16;
    letter-spacing: -0.035em;
  }

  h2 {
    font-size: var(--tm-mobile-h2) !important;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.025em;
  }

  h3 {
    font-size: var(--tm-mobile-h3) !important;
    font-weight: 850;
    line-height: 1.3;
  }

  p, li, label, dd, dt {
    font-size: var(--tm-mobile-body);
    line-height: 1.55;
  }

  small, .muted, .caption, .helper, .description, .form-notice, .time-help,
  .confirm-help, .policy-note, .ai-notice, .demo-notice {
    font-size: var(--tm-mobile-help) !important;
    line-height: 1.5;
  }

  input, select, textarea {
    min-height: 48px !important;
    color: #101613;
    border-color: #718980;
    font-size: 16px !important;
    font-weight: 650;
  }

  button, a.button, a.primary, input[type="submit"] {
    min-height: 48px;
    font-size: 16px;
    font-weight: 800;
  }

  a { font-weight: 700; }
  :focus-visible { outline: 3px solid #f0a400; outline-offset: 2px; }

  /* Small brand and decorative text can stay compact; it is not task copy. */
  .brand small, .experience-kicker, .dialog-kicker, .intro-card > small,
  .booking-flow-head > small, .store-gallery-head small, .stay-section-head small,
  .stay-hero-copy > small, .photo-count, .shop-preview-count {
    font-size: 12px !important;
    line-height: 1.35;
  }

  /* Six destinations must remain on one row. Icons carry the primary meaning. */
  .gaja-global-nav > a, .gaja-global-nav button {
    min-height: 0;
    font-size: 11px !important;
    line-height: 1.12;
  }
  .gaja-global-nav .gaja-nav-icon { font-size: 12px !important; }

  /* Slider dots and arrows are controls, not text buttons. */
  .photo-dots button, .service-slider-dots button {
    min-width: 8px !important;
    min-height: 8px !important;
    font-size: 0 !important;
  }
  .photo-arrow, .service-slider-arrow, .shop-preview-arrow, .gallery-arrow,
  .gallery-dialog-arrow, .store-gallery-nav button { font-size: 28px !important; }

  /* Directory: large names, compact cards, and one readable line of location. */
  .directory-search .hero-controls .search input {
    min-height: 48px;
    font-size: 16px !important;
  }
  .directory-search .hero-controls .search button { min-height: 48px; }
  .list-head #resultCount { font-size: 16px !important; }
  #shopList .photo-directory-card .shop-card-summary h2,
  #categoryPremium .category-premium-listing .shop-card-summary h2 {
    font-size: 19px !important;
    line-height: 1.28;
  }
  #shopList .photo-directory-card .shop-card-location,
  #categoryPremium .category-premium-listing .shop-card-location { font-size: 14px !important; }
  #shopList .photo-directory-card .shop-card-summary,
  #categoryPremium .category-premium-listing .shop-card-summary { padding: 10px 12px 11px; }
  #shopList.shop-list { gap: 10px; }

  /* Generic business details: avoid oversized titles and tiny actions. */
  .hero-copy p, .hero-body p, .card p, .price, .actions a, .actions button {
    font-size: 16px;
    line-height: 1.55;
  }
  .badge, .chip, .premium-food-badge, .premium-barber-badge {
    font-size: 13px !important;
    line-height: 1.25;
  }

  /* KTV consultation: keep the promise, remove repeated prose and wasted height. */
  .experience-intro { margin: 12px 0; padding: 18px 16px 16px; }
  .experience-intro h2 { margin: 6px 0 8px; }
  .experience-lead { font-size: 16px !important; line-height: 1.6; }
  .experience-benefits { gap: 7px; margin: 12px 0; }
  .experience-benefits article { align-items: center; min-height: 0; padding: 10px 12px; }
  .experience-benefits b { font-size: 15px !important; line-height: 1.35; }
  .experience-benefits p { display: none; }
  .protected-booking { margin: 0 0 12px; padding: 13px; }
  .protected-booking-head b { font-size: 16px !important; }
  .protected-booking-head p { margin-top: 3px; font-size: 14px !important; }
  .protected-booking-flow { margin-top: 10px; }
  .protected-booking-flow li { gap: 4px; padding: 8px 4px; }
  .protected-booking-flow li b { font-size: 13px !important; line-height: 1.3; }
  .experience-disclaimer { margin-top: 8px; font-size: 13px !important; }
  .trust-strip b, .shop-summary b { font-size: 14px !important; }
  .trust-strip small, .shop-summary small {
    font-size: 12px !important;
    line-height: 1.3;
  }
  .address-card p { font-size: 14px !important; }
  .address-card b, .address-card em { font-size: 15px !important; }
  .form-step { padding: 16px 14px; }
  .section-head { margin-bottom: 12px; }
  .section-head h2 { font-size: 21px !important; }
  .section-head p, .section-head small, .request-grid b, .hotel-result-copy small,
  .hotel-confirmed, .privacy-note small {
    font-size: 14px !important;
    line-height: 1.45;
  }
  .mode-card { min-height: 104px; padding: 13px; }
  .mode-card b { font-size: 16px !important; }
  .mode-card small { font-size: 14px !important; }

  /* Barber and men-only massage: a concise three-step explanation. */
  .intro-card, .booking-flow { margin-top: 10px; padding: 16px 14px; }
  .intro-card h2, .booking-flow-head h2, .store-gallery-head h2 { font-size: 22px !important; }
  .intro-card p, .booking-flow-head p, .store-gallery-head p {
    font-size: 15px !important;
    line-height: 1.55;
  }
  .intro-card div { margin-top: 10px; }
  .intro-card span { font-size: 13px !important; }
  .booking-flow ol { gap: 7px; margin-top: 10px; }
  .booking-flow li { padding: 10px; }
  .booking-flow li b { font-size: 15px !important; }
  .booking-flow li small { margin-top: 2px; font-size: 14px !important; }
  .information-booking-status p,
  .information-booking-status .information-booking-hint { font-size: 14px !important; }
  .course-card b { font-size: 15px !important; }
  .course-card small { font-size: 13px !important; }
  .sticky-book small { font-size: 12px !important; }

  /* Stay pages: preserve all booking rules while tightening the stacked flow. */
  .stay-gallery, .stay-flow, .stay-inquiry, .stay-location {
    margin: 0 12px 12px;
    padding: 16px 14px;
  }
  .stay-section-head { margin-bottom: 12px; }
  .stay-section-head p, .stay-flow small, .stay-commission-note span {
    font-size: 14px !important;
    line-height: 1.5;
  }
  .stay-flow ol { gap: 7px; }
  .stay-flow li { min-height: 0; padding: 12px; }
  .stay-flow strong { margin: 2px 0 3px; font-size: 16px; }

  /* Massage browse still needs compact photo choices, but not 10px task text. */
  body.massage-onepage .demo-notice, body.massage-onepage .photo-person small,
  body.massage-onepage .photo-sort select,
  body.massage-onepage [data-photo-mode="quick"] { font-size: 14px !important; }
  body.massage-onepage .photo-person strong,
  body.massage-onepage .photo-person > [data-photo-person],
  body.massage-onepage .massage-sort-buttons button,
  body.massage-onepage .onepage-booking-dock strong { font-size: 15px !important; }
  body.massage-onepage .photo-person > [data-photo-person] { min-height: 44px; }

  /* Existing dense schedule cards keep their compact data layout. */
  .schedule-card .note, .schedule-card .date-pill { display: none; }
  .schedule-card dt { font-size: 13px; }
  .schedule-card dd { font-size: 16px; font-weight: 800; }
  .schedule-card .inquiry, .provider-quick-list button {
    min-height: 46px;
    font-size: 15px;
  }
  table { font-size: 15px; }
  th, td { font-weight: 600; }
}

@media (max-width: 360px) {
  :root {
    --tm-mobile-body: 16px;
    --tm-mobile-help: 14px;
    --tm-mobile-h1: 28px;
    --tm-mobile-h2: 22px;
  }
  .gaja-global-nav > a, .gaja-global-nav button { font-size: 10px !important; }
}
