/* =================================================================
   Seitenübergänge – eigene Keyframes.
   .pt-out--<id> = alte Karte verlässt die Bühne, .pt-in--<id> = neue Karte kommt.
   Dauer: --pt-duration (Admin, 300–1200 ms).
   ================================================================= */
.pt-page[class*="pt-in--"], .pt-page[class*="pt-out--"] { animation-duration: var(--pt-duration, 700ms); animation-fill-mode: both; will-change: transform, opacity; }
.pt-page[class*="pt-in--"] { z-index: 2; }
.pt-page[class*="pt-out--"] { z-index: 1; }
:root { --pt-ease: cubic-bezier(.7, 0, .3, 1); --pt-ease-out: cubic-bezier(.22, .61, .36, 1); --pt-ease-in: cubic-bezier(.55, .06, .68, .19); }

/* ---------- Überblenden ---------- */
.pt-out--fade { animation-name: ptFadeOut; animation-timing-function: ease; }
.pt-in--fade  { animation-name: ptFadeIn; animation-timing-function: ease; }
@keyframes ptFadeOut { to { opacity: 0; } }
@keyframes ptFadeIn  { from { opacity: 0; } }

/* ---------- Schieben ---------- */
.pt-out--slide-left  { animation-name: ptToLeft;   animation-timing-function: var(--pt-ease); }
.pt-in--slide-left   { animation-name: ptFromRight; animation-timing-function: var(--pt-ease); }
.pt-out--slide-right { animation-name: ptToRight;  animation-timing-function: var(--pt-ease); }
.pt-in--slide-right  { animation-name: ptFromLeft; animation-timing-function: var(--pt-ease); }
.pt-out--slide-up    { animation-name: ptToTop;    animation-timing-function: var(--pt-ease); }
.pt-in--slide-up     { animation-name: ptFromBottom; animation-timing-function: var(--pt-ease); }
.pt-out--slide-down  { animation-name: ptToBottom; animation-timing-function: var(--pt-ease); }
.pt-in--slide-down   { animation-name: ptFromTop;  animation-timing-function: var(--pt-ease); }
@keyframes ptToLeft    { to { transform: translateX(-100%); } }
@keyframes ptToRight   { to { transform: translateX(100%); } }
@keyframes ptToTop     { to { transform: translateY(-100%); } }
@keyframes ptToBottom  { to { transform: translateY(100%); } }
@keyframes ptFromRight { from { transform: translateX(100%); } }
@keyframes ptFromLeft  { from { transform: translateX(-100%); } }
@keyframes ptFromBottom { from { transform: translateY(100%); } }
@keyframes ptFromTop   { from { transform: translateY(-100%); } }

/* ---------- Schieben + Blenden ---------- */
.pt-out--slide-fade-left  { animation-name: ptToLeftFade;  animation-timing-function: var(--pt-ease-in); }
.pt-in--slide-fade-left   { animation-name: ptFromRightFade; animation-timing-function: var(--pt-ease-out); }
.pt-out--slide-fade-right { animation-name: ptToRightFade; animation-timing-function: var(--pt-ease-in); }
.pt-in--slide-fade-right  { animation-name: ptFromLeftFade; animation-timing-function: var(--pt-ease-out); }
.pt-out--slide-fade-up    { animation-name: ptToTopFade;   animation-timing-function: var(--pt-ease-in); }
.pt-in--slide-fade-up     { animation-name: ptFromBottomFade; animation-timing-function: var(--pt-ease-out); }
.pt-out--slide-fade-down  { animation-name: ptToBottomFade; animation-timing-function: var(--pt-ease-in); }
.pt-in--slide-fade-down   { animation-name: ptFromTopFade; animation-timing-function: var(--pt-ease-out); }
@keyframes ptToLeftFade     { to { opacity: 0; transform: translateX(-28%); } }
@keyframes ptToRightFade    { to { opacity: 0; transform: translateX(28%); } }
@keyframes ptToTopFade      { to { opacity: 0; transform: translateY(-22%); } }
@keyframes ptToBottomFade   { to { opacity: 0; transform: translateY(22%); } }
@keyframes ptFromRightFade  { from { opacity: 0; transform: translateX(28%); } }
@keyframes ptFromLeftFade   { from { opacity: 0; transform: translateX(-28%); } }
@keyframes ptFromBottomFade { from { opacity: 0; transform: translateY(22%); } }
@keyframes ptFromTopFade    { from { opacity: 0; transform: translateY(-22%); } }

/* ---------- Skalieren ---------- */
.pt-out--scale-down-up { animation-name: ptScaleDown; animation-timing-function: var(--pt-ease-in); }
.pt-in--scale-down-up  { animation-name: ptFromBottom; animation-timing-function: var(--pt-ease-out); }
.pt-out--scale-up-down { animation-name: ptScaleUpOut; animation-timing-function: var(--pt-ease-in); }
.pt-in--scale-up-down  { animation-name: ptScaleUpIn; animation-timing-function: var(--pt-ease-out); animation-delay: calc(var(--pt-duration, 700ms) * .2); }
.pt-out--zoom-through  { animation-name: ptZoomOut; animation-timing-function: var(--pt-ease-in); }
.pt-in--zoom-through   { animation-name: ptZoomIn; animation-timing-function: var(--pt-ease-out); }
@keyframes ptScaleDown  { to { opacity: 0; transform: scale(.82); } }
@keyframes ptScaleUpOut { to { opacity: 0; transform: scale(1.18); } }
@keyframes ptScaleUpIn  { from { opacity: 0; transform: scale(.86); } }
@keyframes ptZoomOut    { to { opacity: 0; transform: scale(1.6); } }
@keyframes ptZoomIn     { from { opacity: 0; transform: scale(.6); } }

/* ---------- Umdrehen (zweiphasig) ---------- */
.pt-out--flip-h, .pt-out--flip-v { animation-duration: calc(var(--pt-duration, 700ms) * .5); animation-timing-function: var(--pt-ease-in); transform-origin: 50% 50%; }
.pt-in--flip-h, .pt-in--flip-v { animation-duration: calc(var(--pt-duration, 700ms) * .5); animation-delay: calc(var(--pt-duration, 700ms) * .5); animation-timing-function: var(--pt-ease-out); transform-origin: 50% 50%; }
.pt-out--flip-h { animation-name: ptFlipOutY; }
.pt-in--flip-h  { animation-name: ptFlipInY; }
.pt-out--flip-v { animation-name: ptFlipOutX; }
.pt-in--flip-v  { animation-name: ptFlipInX; }
@keyframes ptFlipOutY { to { transform: translateZ(-300px) rotateY(90deg); opacity: .3; } }
@keyframes ptFlipInY  { from { transform: translateZ(-300px) rotateY(-90deg); opacity: .3; } }
@keyframes ptFlipOutX { to { transform: translateZ(-300px) rotateX(90deg); opacity: .3; } }
@keyframes ptFlipInX  { from { transform: translateZ(-300px) rotateX(-90deg); opacity: .3; } }

/* ---------- Falten ---------- */
.pt-out--fold-left  { animation-name: ptFoldLeft; transform-origin: 100% 50%; animation-timing-function: ease-in; }
.pt-in--fold-left   { animation-name: ptFromRightFade; animation-timing-function: var(--pt-ease-out); }
.pt-out--fold-right { animation-name: ptFoldRight; transform-origin: 0% 50%; animation-timing-function: ease-in; }
.pt-in--fold-right  { animation-name: ptFromLeftFade; animation-timing-function: var(--pt-ease-out); }
@keyframes ptFoldLeft  { to { opacity: 0; transform: rotateY(90deg); } }
@keyframes ptFoldRight { to { opacity: 0; transform: rotateY(-90deg); } }

/* ---------- Wegdrücken / Heranziehen ---------- */
.pt-out--push-left  { animation-name: ptPushLeft; transform-origin: 0% 50%; animation-timing-function: ease-in; }
.pt-in--push-left   { animation-name: ptFromRight; animation-timing-function: var(--pt-ease); }
.pt-out--pull-right { animation-name: ptScaleDown; animation-timing-function: ease-in; }
.pt-in--pull-right  { animation-name: ptPullRight; transform-origin: 100% 50%; animation-timing-function: var(--pt-ease-out); animation-delay: calc(var(--pt-duration, 700ms) * .15); }
@keyframes ptPushLeft  { to { opacity: 0; transform: rotateY(90deg); } }
@keyframes ptPullRight { from { opacity: 0; transform: rotateY(-90deg); } }

/* ---------- Würfel ---------- */
.pt-out--cube-left  { animation-name: ptCubeOutLeft; transform-origin: 100% 50%; animation-timing-function: var(--pt-ease); }
.pt-in--cube-left   { animation-name: ptCubeInLeft; transform-origin: 0% 50%; animation-timing-function: var(--pt-ease); }
.pt-out--cube-right { animation-name: ptCubeOutRight; transform-origin: 0% 50%; animation-timing-function: var(--pt-ease); }
.pt-in--cube-right  { animation-name: ptCubeInRight; transform-origin: 100% 50%; animation-timing-function: var(--pt-ease); }
@keyframes ptCubeOutLeft  { 50% { transform: translateX(-50%) translateZ(-180px) rotateY(-45deg); } to { transform: translateX(-100%) rotateY(-90deg); } }
@keyframes ptCubeInLeft   { from { transform: translateX(100%) rotateY(90deg); } 50% { transform: translateX(50%) translateZ(-180px) rotateY(45deg); } }
@keyframes ptCubeOutRight { 50% { transform: translateX(50%) translateZ(-180px) rotateY(45deg); } to { transform: translateX(100%) rotateY(90deg); } }
@keyframes ptCubeInRight  { from { transform: translateX(-100%) rotateY(-90deg); } 50% { transform: translateX(-50%) translateZ(-180px) rotateY(-45deg); } }

/* ---------- Zeitung ---------- */
.pt-out--newspaper { animation-name: ptNewspaperOut; animation-duration: calc(var(--pt-duration, 700ms) * .55); animation-timing-function: ease-in; transform-origin: 50% 50%; }
.pt-in--newspaper  { animation-name: ptNewspaperIn; animation-duration: calc(var(--pt-duration, 700ms) * .55); animation-delay: calc(var(--pt-duration, 700ms) * .45); animation-timing-function: var(--pt-ease-out); transform-origin: 50% 50%; }
@keyframes ptNewspaperOut { to { transform: scale(.1) rotate(540deg); opacity: 0; } }
@keyframes ptNewspaperIn  { from { transform: scale(.1) rotate(-540deg); opacity: 0; } }

/* ---------- Herunterfallen ---------- */
.pt-out--fall { animation-name: ptFall; transform-origin: 0% 0%; animation-timing-function: ease-in; z-index: 3 !important; }
.pt-in--fall  { animation-name: ptScaleUpIn; animation-timing-function: var(--pt-ease-out); }
@keyframes ptFall { 0% { transform: rotateZ(0); } 20% { transform: rotateZ(10deg); animation-timing-function: ease-out; } 40% { transform: rotateZ(17deg); } 60% { transform: rotateZ(16deg); } 100% { transform: translateY(110%) rotateZ(17deg); } }

/* ---------- Reduzierte Bewegung: nur kurzes Überblenden ---------- */
@media (prefers-reduced-motion: reduce) {
  .pt-page[class*="pt-in--"], .pt-page[class*="pt-out--"] { animation-name: ptFadeIn !important; animation-duration: 200ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transform: none !important; }
  .pt-page[class*="pt-out--"] { animation-name: ptFadeOut !important; }
}
