/* touch-ready.css: every page answers a finger on the touchscreen Mac (Fleet Standard touch_ready,
   ~/.claude/rules/touchscreen-mac.md, Jason 2026-11-27). Vendor next to touch-ready.js and link it
   AFTER the site's own stylesheet. Pointer and mouse layouts are unchanged: every rule below sits
   behind a coarse-pointer or no-hover media query, or behind the .touch-ready class that
   touch-ready.js adds the moment a finger is seen.

   Conventions the page can opt into:
     .hover-reveal / [data-hover-reveal]   shown on hover with a pointer, always shown with a finger
     .touch-skip                           opts one element out of the 44-point floor              */

/* The size floor binds where a pointer AND a finger coexist: the touchscreen Mac, a touch laptop, an
   iPad with a trackpad. Phones (finger only) and desktops (pointer only) keep the layout they shipped
   with, so vendoring this file never changes how a live site looks on either. */
@media (any-pointer: coarse) and (any-pointer: fine) {
  :where(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"],
         select, summary, .btn, .button):not(.touch-skip) {
    min-height: 44px;
    min-width: 44px;
  }
  :where(input[type="text"], input[type="email"], input[type="search"], input[type="password"],
         input[type="url"], input[type="tel"], input[type="number"]):not(.touch-skip) {
    min-height: 44px;
  }
}

/* On the touchscreen Mac WebKit reports no coarse pointer (measured 2026-11-27), so the media query above never
   matches there; inside our own Mac apps TouchReady.swift sets html.touch-ready on the first finger instead. */
html.touch-ready :where(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"],
       select, summary, .btn, .button):not(.touch-skip) { min-height: 44px; min-width: 44px; }
html.touch-ready :where(input[type="text"], input[type="email"], input[type="search"], input[type="password"],
       input[type="url"], input[type="tel"], input[type="number"]):not(.touch-skip) { min-height: 44px; }

/* Anything that appears only on hover is always visible with a finger. */
@media (hover: none) {
  .hover-reveal, [data-hover-reveal] { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; }
}
html.touch-ready .hover-reveal, html.touch-ready [data-hover-reveal] {
  opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
}

/* A draggable surface the page marks keeps the finger to itself instead of scrolling the page. */
[data-touch-drag], .touch-drag { touch-action: none; }
/* Long-press opens our menu, not the system callout or a text selection. */
html.touch-ready [data-long-press], html.touch-ready .long-press { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
