/* Touch
 * Making taps reliable in an installed iOS PWA.
 *
 * In a standalone iOS web app, taps on interactive elements go hit-or-miss:
 * the first tap selects text or does nothing, and a second is needed. It
 * affects exactly the things this app is made of — the score circles, the
 * -2..+2 buttons, the chart tabs, the word-cloud chips.
 *
 * Both halves are needed. This file stops the browser treating a tap as the
 * start of a selection or a double-tap-to-zoom gesture; touch.js handles the
 * event itself. CSS alone fixes it in Safari and NOT in the installed app,
 * which is how it gets shipped broken — it looks fine while you are testing.
 *
 * Scoped to interactive elements on purpose: applying touch-action globally
 * would break scrolling, and user-select: none on text would stop people
 * copying their own notes out.
 */

.statcircle,
.segbtn,
.chip,
.tabbar button,
.weekpeek,
.weeklabel,
.theme-toggle,
.accordion-close,
.navprimary,
.navtext,
.sessionend,
.googlebtn {
  /* No double-tap zoom, no gesture ambiguity — the element handles its own tap. */
  touch-action: manipulation;

  -webkit-user-select: none;
  user-select: none;

  /* iOS paints its own grey flash over taps, which fights the components'
     own :active states. */
  -webkit-tap-highlight-color: transparent;
}

/* Text the user wrote is theirs to select, even inside a card whose controls
   are not. */
.notefield,
.invitefield,
.word,
.insight-sentences,
.guided-prompt {
  -webkit-user-select: text;
  user-select: text;
}
