/* Page transitions: the next page arrives as a downpour of watercolor drops.
   The drops themselves (masks, keyframes, wet rims) are generated per arrival by
   turn.js. Browsers without cross-document view transitions simply navigate, and so
   do phones and tablets (anything driven by touch): the drops never ran smoothly
   there, so pages simply change. Keep in step with TURNS in turn.js. */
@media (hover: hover) and (pointer: fine) {
  @view-transition { navigation: auto; }
}

::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }

/* the wet rims turn.js lays over the drops (it sizes and centres each one) */
.turn-fx { position: fixed; z-index: 2147483647; pointer-events: none; }
.turn-fx svg { display: block; width: 100%; height: 100%; overflow: visible; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---- the tuning card (turn-tune.js) */
.turn-tune {
  position: fixed; left: 14px; bottom: 14px; z-index: 160; width: 228px;
  padding: 8px 12px 9px; color: #2b231c;
  background: color-mix(in srgb, var(--paper, #f3ead9) 94%, white); border: 1px solid rgba(43, 35, 28, 0.28);
  border-radius: 4px 6px 3px 5px; box-shadow: 1px 2px 0 rgba(43, 35, 28, 0.12);
  font: 600 16px/1 'Caveat', 'Caveat Fallback', cursive; transform: rotate(0.4deg);
}
.turn-tune summary { cursor: pointer; list-style: none; color: #6e6152; font-weight: 500; }
.turn-tune summary::-webkit-details-marker { display: none; }
.turn-tune[open] summary { margin-bottom: 6px; }
.turn-tune label { display: grid; gap: 1px; margin-bottom: 5px; }
.turn-tune label span { display: flex; justify-content: space-between; gap: 8px; }
.turn-tune output { font: 500 13px/1 ui-monospace, 'JetBrains Mono', monospace; color: #6e6152; }
.turn-tune input[type='range'] { width: 100%; margin: 0; accent-color: #8a6a3c; }
.turn-tune .row { display: flex; gap: 14px; margin-top: 6px; }
.turn-tune button { padding: 0; border: 0; background: none; cursor: pointer; font: 600 16px/1 'Caveat', 'Caveat Fallback', cursive; color: #2f6a45; text-decoration: underline wavy rgba(47, 106, 69, 0.35); }
.turn-tune button.quiet { color: #6e6152; text-decoration-color: rgba(43, 35, 28, 0.3); }
@media (max-width: 1100px) { .turn-tune { position: static; display: block; margin: 0 auto 16px; transform: none; } }
