/* ═══════════════════════════════════════════════════════════════════════
   DECK-SAFE — the two bugs every card deck ships with. Import this on any
   page with a rotating card deck. Both were re-found on three separate
   sites before this file existed.

   1. DRAGGING SELECTS AND GHOSTS THE CARD.
      A draggable surface that is also selectable makes the browser guess
      which gesture you meant, and it guesses wrong: you get blue highlight
      smeared across the cards and a translucent drag-image of the card
      floating with the cursor. Mike: "the card is coming out."

   2. THE DECK SPINS WHEN THE POINTER MERELY PASSES OVER.
      Two separate causes, and BOTH have to be closed:
      (a) `mouseenter` on the word list fires for every word swept across,
          so crossing the rail on the way somewhere else spins through four
          cards. → a dwell delay, below.
      (b) a horizontal trackpad / Magic Mouse swipe fires `wheel` with a
          real deltaX and a few units of deltaY noise, so a guard that only
          asks `deltaY > 2` turns the deck sideways. → see deck-safe.js.
   ═══════════════════════════════════════════════════════════════════════ */

/* 1 — nothing in the deck is selectable or natively draggable */
.deck, .deck *,
.deck-card, .deck-card *,
.deck-cyl, .deck-in,
.spine, .spine *,
[data-deck], [data-deck] * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.deck img, .deck-card img, .spine img, [data-deck] img {
  -webkit-user-drag: none;
  pointer-events: none;   /* the card takes the tap, never the image */
}

/* the drag surface says what it is */
.deck-in, .deck-card, .spine-in { cursor: grab; }
.deck-in:active, .deck-card:active, .spine-in:active { cursor: grabbing; }

/* 🔴 a dialog with an author `display` beats [hidden]'s UA display:none, so a
   closed panel keeps covering the page and eats every click at opacity 0.
   This one shipped live and cost an evening. */
.sheet[hidden], .panel[hidden], .veil[hidden], [role="dialog"][hidden] { display: none !important; }

/* 🔴 2026-08-31 — a card turned near edge-on squeezes its type into an
   illegible smear that reads as a rendering fault. Fade the CONTENTS faster
   than the card, so neighbours are clean paper edges and only the face carries
   type. Requires the deck script to publish --face (see rkDeckFace below). */
.deck-card>*,[data-deck] .card>*{
  opacity:clamp(0,calc((var(--face,1) - 0.62) * 3.4),1);
  transition:opacity .18s linear}
