@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  /* Плавный перелив между страницами: мягкое проявление с лёгким подъёмом,
     без горизонтальных сдвигов влево-вправо (чтобы не было эффекта слайдов). */
  ::view-transition-old(*) {
    animation: 480ms cubic-bezier(.4, 0, .5, 1) both page-out;
  }

  ::view-transition-new(*) {
    animation: 900ms cubic-bezier(.22, .61, .36, 1) 140ms both page-in;
  }

  @keyframes page-out {
    to { opacity: 0; transform: translateY(-6px); }
  }

  @keyframes page-in {
    from { opacity: 0; transform: translateY(10px); }
  }

  :root:active-view-transition [data-motion-pending] { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  [data-motion-pending] { opacity: 0; }
  [data-motion-pending]:focus-within { opacity: 1; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .cursor-glow {
    position: relative;
    isolation: isolate;
    transition: scale .22s ease, transform .22s ease, color .22s ease, box-shadow .22s ease;
  }
  .cursor-glow::before {
    content: "";
    position: absolute;
    inset: -3px -6px;
    z-index: -1;
    border-radius: 999px;
    background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), #bf9aff70, transparent 72%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .favori-header .cursor-glow::before,
  .cursor-glow.btn-gold::before {
    background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%), #ffe0a676, transparent 72%);
  }
  .cursor-glow:hover { scale: 1.045; }
  .cursor-glow:hover::before { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
