/* Tap targets on phones and tablets (28 Nov 2026): every control gets a hit area of at least 44 x 44 CSS px.
   Where the control has room around it, an invisible ::after grows the hit area and the design does not change;
   where controls are stacked closer than 44 px (link lists), the rows get the room instead.
   Measured with tools/qa/tap-targets.js; the list is in tools/qa/TAP-TARGETS-2026-11-28.md. */
@media (max-width: 760px), (pointer: coarse) {
  /* --- invisible hit-area growth: centred, at least 44 x 44 --- */
  header.bar .hright > a, header.bar .hme .av, .td-mode button, .ak-chips button, .akc-chips button, .ak-chatsbtn, .ak-say, .ak-modepill, .ak-ups a, .ak-ups button, .ak-comm,
  .jr-arr, .jr-acts .btn.link, .al-inv .btn.link, details.bill-all > summary, .mo-sky h2[role=button], .land-top .topright .btn, .land-top .topright .daytoggle, header.bar .daytoggle,
  .am-zoom button, .rx-preview .btn.link, .uv-q, .ob2-go, .ob2-out { position: relative }
  header.bar .hright > a::after, header.bar .hme .av::after, .td-mode button::after, .ak-chips button::after, .akc-chips button::after, .ak-chatsbtn::after, .ak-say::after, .ak-modepill::after, .ak-ups a::after, .ak-ups button::after, .ak-comm::after,
  .jr-arr::after, .jr-acts .btn.link::after, .al-inv .btn.link::after, details.bill-all > summary::after, .mo-sky h2[role=button]::after, .land-top .topright .btn::after, .land-top .topright .daytoggle::after, header.bar .daytoggle::after,
  .am-zoom button::after, .rx-preview .btn.link::after, .uv-q::after, .ob2-go::after, .ob2-out::after { content: ""; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; min-width: 44px; min-height: 44px; transform: translate(-50%, -50%) }
  /* header date arrows (26 x 28): grow outwards only, so the date label between them keeps its own area */
  .mh-date .ar { position: relative }
  .mh-date .ar::after { content: ""; position: absolute; top: -8px; bottom: -8px; inset-inline-start: 0; inset-inline-end: 0 }
  .mh-date .ar:first-child::after { inset-inline-start: -18px } .mh-date .ar:last-child::after { inset-inline-end: -18px }
  /* 320 to 374 px wide: 13 px between the plan badge and the arrow, so the arrows take 6 px outside and 12 px from the
     edge of the date label (the label keeps about 80 px), and the badge grows towards the screen edge */
  @media (max-width: 374px) {
    .mh-date .ar { z-index: 1 }
    .mh-date .ar:first-child::after { inset-inline-start: -6px; inset-inline-end: -12px } .mh-date .ar:last-child::after { inset-inline-end: -6px; inset-inline-start: -12px }
    header.bar .hright > a::after { left: auto; inset-inline-end: 0; transform: translateY(-50%) }
  }
  .mh-date label::after { content: ""; position: absolute; top: -8px; bottom: -8px; left: 0; right: 0 }
  /* Astra: "New conversation" and "What Astra remembers" sit under the microphone and send buttons: the first row moves 10 px down so its area clears them, and each link gets a 44 px high area (they are side by side, so the areas only meet at a corner) */
  body .ak-meta { padding-top: 12px !important }
  @media (max-width: 374px) { body .mu-ask { padding-top: 20px } }   /* there "New conversation" wraps onto two lines */
  .ak-meta button, .mu-ask button { position: relative }
  .ak-meta button::after, .mu-ask button::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%) }
  /* the two links under Astra's box sit on two rows on narrow phones: rows 44 px apart */
  body .ak-ups { row-gap: 22px }
  /* thumbs up / down (36 x 36, 4 px apart): each grows away from the other */
  .ak-fbb { position: relative } .ak-fbb::after { content: ""; position: absolute; top: -6px; bottom: -6px; inset-inline-start: -1px; inset-inline-end: -1px }
  .ak-fbb.up::after { inset-inline-start: -10px } .ak-fbb.dn::after { inset-inline-end: -10px }
  /* Account: "Delete my account and data" sits right under the download button; it grows downwards only */
  .yd-del { position: relative; min-width: 44px } .yd-del::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 44px }
  .yd-row { margin-bottom: 24px }
  body .mu-linkbtn { min-height: 44px; display: inline-flex; align-items: center }
  /* AstroMap legend chips (34 to 36 px high, rows 6 px apart) */
  .am-legend { row-gap: 12px } .am-chip { position: relative } .am-chip::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%) }
  /* --- controls that clip their content, selects and inputs: the box itself becomes 44 px --- */
  nav.nv-seg a, .ak-newbtn, .uv-nav a, #langSel, .jr-filters select, .akc-form input, .tr-lang select, .am-acc select { min-height: 44px }
  body .rx-link, body .rx-back { min-height: 44px; display: inline-flex; align-items: center }
  .uv-nav a { display: inline-flex; align-items: center }
  /* form fields never under 16 px, whatever a page's own rule says (iPhone zooms in below that) */
  input:not(#_):not([type=checkbox]):not([type=radio]):not([type=range]), select:not(#_), textarea:not(#_) { font-size: max(16px, 1em) }
  /* checkbox rows: the whole label is the target */
  label.check { min-height: 44px; align-items: center }
  /* --- link lists: rows 44 px apart --- */
  .uv-links { row-gap: 0 } .uv-links .uv-link { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center }
  /* app footer: each link a 44 px box; room at the end so the round back-to-top button never covers the last link */
  p.legal a { display: inline-block; min-width: 44px; min-height: 44px; line-height: 44px; padding: 0 5px }
  body.has-mnav p.legal, body.hm-pad p.legal { padding-bottom: 78px }
}
