/* Only the native theme snapshot receives this animation; ordinary navigation
   keeps its existing fade/float controller. The underlying DOM never moves. */
@property --theme-reveal-radius {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
html[data-theme-transition]::view-transition { pointer-events: none; }
html[data-theme-transition]::view-transition-group(root),
html[data-theme-transition]::view-transition-image-pair(root) { animation: none; }
html[data-theme-transition]::view-transition-old(root),
html[data-theme-transition]::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
html[data-theme-transition]::view-transition-old(root) { z-index: 1; }
html[data-theme-transition]::view-transition-new(root) {
  z-index: 2;
  animation: theme-soft-crossfade 1500ms cubic-bezier(.22,.61,.36,1) both;
}
html[data-theme-transition='radial-feather']::view-transition-new(root) {
  mask-image: radial-gradient(circle at var(--theme-origin-x) var(--theme-origin-y),
    #000 max(0px, calc(var(--theme-reveal-radius) - var(--theme-feather-width))), transparent var(--theme-reveal-radius));
  animation-name: theme-feather-reveal;
}
@keyframes theme-soft-crossfade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes theme-feather-reveal {
  from { --theme-reveal-radius: 0px; opacity: 0; }
  to { --theme-reveal-radius: var(--theme-end-radius); opacity: 1; }
}
html[data-theme-transition='pixel']::view-transition-new(root) {
  mask-mode: alpha;
  mask-repeat: no-repeat;
  mask-position: 0 0;
  mask-size: var(--theme-pixel-width) var(--theme-pixel-height);
  animation-name: theme-pixel-dissolve;
  animation-duration: 500ms;
  animation-timing-function: steps(1, end);
}
@keyframes theme-pixel-dissolve {
  0% { mask-image: linear-gradient(transparent, transparent); opacity: 1; }
  5% { mask-image: var(--theme-pixel-mask-1); opacity: 1; }
  10% { mask-image: var(--theme-pixel-mask-2); opacity: 1; }
  15% { mask-image: var(--theme-pixel-mask-3); opacity: 1; }
  20% { mask-image: var(--theme-pixel-mask-4); opacity: 1; }
  25% { mask-image: var(--theme-pixel-mask-5); opacity: 1; }
  30% { mask-image: var(--theme-pixel-mask-6); opacity: 1; }
  35% { mask-image: var(--theme-pixel-mask-7); opacity: 1; }
  40% { mask-image: var(--theme-pixel-mask-8); opacity: 1; }
  45% { mask-image: var(--theme-pixel-mask-9); opacity: 1; }
  50% { mask-image: var(--theme-pixel-mask-10); opacity: 1; }
  55% { mask-image: var(--theme-pixel-mask-11); opacity: 1; }
  60% { mask-image: var(--theme-pixel-mask-12); opacity: 1; }
  65% { mask-image: var(--theme-pixel-mask-13); opacity: 1; }
  70% { mask-image: var(--theme-pixel-mask-14); opacity: 1; }
  75% { mask-image: var(--theme-pixel-mask-15); opacity: 1; }
  80% { mask-image: var(--theme-pixel-mask-16); opacity: 1; }
  85% { mask-image: var(--theme-pixel-mask-17); opacity: 1; }
  90% { mask-image: var(--theme-pixel-mask-18); opacity: 1; }
  95% { mask-image: var(--theme-pixel-mask-19); opacity: 1; }
  100% { mask-image: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme-transition]::view-transition-new(root) { animation: none; mask-image: none; }
}
html[data-animations='off'][data-theme-transition]::view-transition-new(root) { animation: none; mask-image: none; }
