/* Handshape pictures (design/assets/handshapes, public domain). The drawings are dark line art on transparent,
   so dark mode inverts them to light lines. */
.hand, .cam .ghost { scale: -1 1; }
.hand { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hand { filter: invert(1) hue-rotate(180deg); } }
:root[data-theme="dark"] .hand { filter: invert(1) hue-rotate(180deg); }

/* Picture tiles: drawing fills the tile, the letter sits small in the corner */
.tile.pic { padding: 14%; font-size: 0; }
.tile.pic .hand { position: absolute; inset: 12% 12% 16%; width: 76%; height: 72%; opacity: .92; transition: transform var(--dur-base) var(--ease-spring); }
.tile.pic:hover .hand { transform: scale(1.06); }
.tile.pic .tl { position: absolute; left: 10px; bottom: 6px; font-size: var(--type-headline-size); line-height: 1; font-weight: 600; color: var(--color-ink); }
.tile.pic.beta .tl { color: var(--color-muted); }
.tile.pic.beta .hand { opacity: .55; }

/* Letter page hero tile */
.letter-big.pic { font-size: 0; }
.letter-big.pic .hand { position: absolute; inset: 12%; width: 76%; height: 76%; }
.letter-big.pic .tl { position: absolute; left: 12px; bottom: 8px; font-size: var(--type-title2-size); line-height: 1; font-weight: 600; color: var(--color-ink); }

/* Camera guide: picture card in the top-right of the webcam, away from the face, on a light frosted backdrop
   (dark line art on near-white glass) so it reads on any background, in light and dark mode. */
.cam .ghost {
  position: absolute; z-index: 2; pointer-events: none; top: 10px; right: 10px; left: auto;
  width: clamp(96px, 30%, 170px); aspect-ratio: 1; height: auto; padding: 10px; box-sizing: border-box;
  object-fit: contain; border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .58);
  -webkit-backdrop-filter: blur(8px) brightness(1.25) saturate(1.2); backdrop-filter: blur(8px) brightness(1.25) saturate(1.2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .6), 0 8px 24px -8px rgba(0, 0, 0, .35);
  filter: none; opacity: 0; transform: translateY(-6px) scale(.96);
  transition: opacity var(--dur-base) var(--ease), transform var(--dur-base) var(--ease-spring);
}
.cam .ghost.on { opacity: 1; transform: none; }
.cam .ghost:not([src]) { display: none; }
@media (max-width: 420px) { .cam .ghost { top: 6px; right: 6px; padding: 6px; } }

/* Picture hint card */
.hint-card { gap: var(--space-md); }
.hint-card .hint-img { width: 96px; height: 96px; flex: none; padding: 6px; background: var(--color-fill); border-radius: var(--radius-sm); }
.hint-card .big { margin-left: auto; }

@media (prefers-reduced-motion: reduce) { .cam .ghost { transition: none; } }
