/* =========================================================
   Phones and tablets
   ========================================================= */

/* Every tap counts as a tap. Without this, two quick taps (very common in our tests)
   are treated as "double-tap to zoom" and the second tap is thrown away.
   Pinch-to-zoom still works. */
html, body, * { touch-action: manipulation; }
* { -webkit-tap-highlight-color: transparent; }

/* No accidental text selection or "copy" pop-ups while tapping fast in a test */
.stage, .card.peek-host, .logic-board, .color-grid, .chimp-grid, .answer-grid, .peri-arena, .melody-rolls, .spatial-row, .notes {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.stage input, .stage textarea { -webkit-user-select: text; user-select: text; }

/* On touch screens, hover effects "stick" after a tap. Only lift buttons on devices with a real mouse. */
@media (hover: none) {
  .btn:hover { transform: none; filter: none; box-shadow: 0 var(--btn-depth, 5px) 0 0 color-mix(in srgb, var(--b) 55%, #000), inset 0 2px 0 rgba(255,255,255,.18); }
  .test-card:hover { transform: none; }
  .test-card:hover .test-icon { animation: none; }
  .ward-item:hover, .logic-opt:not(:disabled):hover, .peri-arrow:not(:disabled):hover { transform: none; }
}

/* Narrow phones: the header has 6 buttons, so the logo shrinks to just Blip */
@media (max-width: 430px) {
  .logo-word { display: none; }
  .site-header { padding: 10px 10px; }
  .nav { gap: 3px; }
  .nav a[data-nav="profile"] { padding: 8px 6px; }
}

/* While the page starts up, keep it quiet: no half-second flash of the plain text version.
   (The class is removed as soon as the app has drawn the page; a safety timer removes it too.) */
.js-loading .site-header, .js-loading #app, .js-loading #seo, .js-loading .site-footer { visibility: hidden; }
.js-loading #app { min-height: 100vh; }
