/* CSS Motion — only what these patterns need: Deck, Lightbox */
:root {
  --mo-speed: 1;   
  --mo-gap: 1;     
  --mo-press: 1;   
  --mo-over: 1;    
  --mo-std: var(--ease-standard, ease-in-out);
  --mo-spring: var(--ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
  --mo-spring-soft: var(--ease-spring-soft, cubic-bezier(0.3, 1.25, 0.5, 1));
  --mo-wipe: var(--ease-wipe, cubic-bezier(0.85, 0, 0.15, 1));
  --mo-close: var(--ease-close, cubic-bezier(0.76, 0, 0.24, 1));
  --mo-out: var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  --mo-in: var(--ease-in, cubic-bezier(0.4, 0, 1, 1));
  --mo-sheet: var(--ease-sheet, cubic-bezier(0.32, 0.72, 0, 1));
  --mo-bounce: var(--ease-bounce, linear(0, 0.063 9.1%, 0.25 18.1%, 0.563 27.2%, 0.765 31.8%, 1 36.3%, 0.813 45.5%, 0.75 54.5%, 0.813 63.7%, 0.891 68.2%, 1 72.7%, 0.953 77.2%, 0.938 81.8%, 0.953 86.3%, 1 90.9%, 0.984 95.5%, 1));
  --mo-elastic: var(--ease-elastic, linear(0, 0.093 2.3%, 0.328 4.5%, 0.932 9.1%, 1.177 11.4%, 1.336 13.6%, 1.398 15.9%, 1.375 18.2%, 0.946 27.3%, 0.843 31.8%, 0.876 36.4%, 1.014 43.2%, 1.062 47.7%, 0.976 63.6%, 1));
  --mo-anticipate: var(--ease-anticipate, cubic-bezier(0.68, -0.55, 0.27, 1.55));
}
[data-mood="calm"] { --mo-speed: 1.15; --mo-gap: 1.1; --mo-press: 0.6; --mo-over: 0.4; }
[data-mood="lively"] { --mo-speed: 0.9; --mo-gap: 0.9; --mo-press: 1.3; --mo-over: 1.5; }
[data-mood="still"] { --mo-speed: 0.85; --mo-gap: 0.7; --mo-press: 0.5; --mo-over: 0; }
.mo-stage { position: relative; overflow: hidden; background: var(--stage); border-radius: var(--radius-28); }
.mo-deck { position: relative; }
.mo-deck > * {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border-radius: var(--radius-20);
  background: var(--panel);
  color: var(--fg);
  box-shadow: var(--shadow);
  z-index: calc(10 - var(--p, 0));
  transform: translateY(calc(var(--p, 0) * 12px)) scale(calc(1 - var(--p, 0) * 0.07));
  transition: transform calc(0.5s * var(--mo-speed)) var(--mo-spring-soft) calc(0.12s * var(--mo-speed));
}
.mo-deck > [data-leaving] { animation: mo-deck-round calc(0.6s * var(--mo-speed)) var(--mo-std) both; }
.mo-lightbox { position: absolute; inset: 0; visibility: hidden; transition: visibility 0s calc(0.3s * var(--mo-speed)); }
.mo-lightbox[data-open] { visibility: visible; transition: none; }
.mo-lightbox-veil { position: absolute; inset: 0; background: #0b0b10; opacity: 0; transition: opacity calc(0.25s * var(--mo-speed)) var(--mo-in); }
.mo-lightbox[data-open] .mo-lightbox-veil { opacity: 0.72; transition: opacity calc(0.35s * var(--mo-speed)) var(--mo-out); }
.mo-lightbox-pic { position: absolute; transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--s, 0.3)); transform-origin: 0 0; opacity: 0; transition: transform calc(0.3s * var(--mo-speed)) var(--mo-in), opacity calc(0.1s * var(--mo-speed)) calc(0.2s * var(--mo-speed)); }
.mo-lightbox[data-open] .mo-lightbox-pic { transform: none; opacity: 1; transition: transform calc(0.5s * var(--mo-speed)) var(--mo-spring-soft), opacity calc(0.1s * var(--mo-speed)); }
.mo-lightbox[data-open] .mo-lightbox-pic[data-swap="next"] { animation: mo-lightbox-next calc(0.35s * var(--mo-speed)) var(--mo-std) both; }
.mo-lightbox[data-open] .mo-lightbox-pic[data-swap="prev"] { animation: mo-lightbox-prev calc(0.35s * var(--mo-speed)) var(--mo-std) both; }
.mo-lightbox-ui { opacity: 0; transition: opacity calc(0.1s * var(--mo-speed)); }
.mo-lightbox[data-open] .mo-lightbox-ui { opacity: 1; transition: opacity calc(0.25s * var(--mo-speed)) var(--mo-out) calc(0.25s * var(--mo-speed)); }
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
@media (forced-colors: active) { [data-theme]:not(#mo-none) {
    --bg: Canvas; --stage: Canvas; --panel: Canvas; --glass: Canvas;
    --fg: CanvasText; --muted: color-mix(in srgb, CanvasText 75%, Canvas); --on-muted: Canvas; --line: CanvasText;
    --accent: Highlight; --accent-2: Highlight; --on-accent: HighlightText; --accent-soft: Canvas; --accent-ink: CanvasText;
    
    --shape-1: color-mix(in srgb, CanvasText 25%, Canvas); --shape-2: color-mix(in srgb, CanvasText 35%, Canvas); --shape-3: color-mix(in srgb, CanvasText 45%, Canvas);
    --shape-4: color-mix(in srgb, CanvasText 60%, Canvas); --shape-5: color-mix(in srgb, CanvasText 75%, Canvas); --shape-6: color-mix(in srgb, CanvasText 90%, Canvas);
    --hue-1: color-mix(in srgb, CanvasText 30%, Canvas); --hue-2: color-mix(in srgb, CanvasText 45%, Canvas); --hue-3: color-mix(in srgb, CanvasText 40%, Canvas);
    --hue-4: color-mix(in srgb, CanvasText 65%, Canvas); --hue-5: color-mix(in srgb, CanvasText 80%, Canvas); --hue-6: color-mix(in srgb, CanvasText 90%, Canvas);
    --shadow-low: 0 0 0 1px CanvasText; --shadow: 0 0 0 1px CanvasText; --shadow-pop: 0 0 0 2px CanvasText;
  } }
@media (prefers-reduced-motion: reduce) {
  
  [class^="mo-"], [class*=" mo-"],
  [class^="mo-"]::before, [class*=" mo-"]::before,
  [class^="mo-"]::after, [class*=" mo-"]::after,
  [class^="mo-"] *, [class*=" mo-"] *,
  [class^="mo-"] *::before, [class*=" mo-"] *::before,
  [class^="mo-"] *::after, [class*=" mo-"] *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  
  .mo-spinner, .mo-loader, .mo-typing, .mo-skeleton, .mo-save[data-state="saving"] > svg, .mo-storyring[data-state="loading"] .mo-storyring-ring { animation: mo-wait 1.6s linear infinite alternate !important; }
  
  .mo-credits { overflow: auto; -webkit-mask-image: none; mask-image: none; }
  .mo-credits > div { animation: none !important; transform: none; padding: 16px 0; }
  
  .mo-lower > * { animation: none !important; transform: none; }
  
  .mo-marquee > div { animation: none !important; transform: none; width: auto; flex-wrap: wrap; }
  .mo-marquee > div > [aria-hidden="true"] { display: none; }
  
  .mo-parallax > * { transform: none !important; }
  .mo-readalong > span { opacity: 1 !important; }
  .mo-inview { opacity: 1 !important; animation: none !important; }
  .mo-hscroll-pin { position: static; overflow: visible; }
  .mo-hscroll-track { transform: none !important; flex-direction: column; width: auto; }
  
  .mo-colorwave > i { animation-duration: 5s !important; animation-delay: calc((var(--c, 0) + var(--r, 0)) * -0.28s) !important; animation-play-state: paused !important; }
}
@keyframes mo-loader {
  0%, 60%, 100% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(-12px) scale(0.9, 1.15); }
  40% { transform: translateY(0) scale(1.2, 0.8); }
  50% { transform: translateY(0) scale(0.95, 1.06); }
}
@keyframes mo-deck-round {
  0% { z-index: 10; transform: translateY(0) scale(1); }
  45% { z-index: 10; transform: translateX(112%) rotate(8deg) scale(0.96); }
  46% { z-index: 0; transform: translateX(112%) rotate(8deg) scale(0.96); }
  100% { z-index: 0; transform: translateY(calc(var(--last, 2) * 12px)) scale(calc(1 - var(--last, 2) * 0.07)); }
}
@keyframes mo-skeleton { 0%, 55%, 100% { opacity: 0.5; transform: scaleX(1); } 25% { opacity: 1; transform: scaleX(1.03); } }
@keyframes mo-marquee { to { transform: translateX(calc(-50% - var(--space-12) / 2)); } }
@keyframes mo-credits { from { transform: translateY(var(--h, 400px)); } to { transform: translateY(-100%); } }
@keyframes mo-colorwave { 0%, 100% { background: var(--hue-1); transform: scale(0.7); } 20% { background: var(--hue-3); transform: scale(1); } 40% { background: var(--hue-4); transform: scale(0.8); } 60% { background: var(--hue-5); transform: scale(1); } 80% { background: var(--hue-2); transform: scale(0.75); } }
@keyframes mo-lightbox-next { 0% { opacity: 0; transform: translateX(24px); } 60% { opacity: 1; transform: translateX(calc(-3px * var(--mo-over))); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes mo-lightbox-prev { 0% { opacity: 0; transform: translateX(-24px); } 60% { opacity: 1; transform: translateX(calc(3px * var(--mo-over))); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes mo-wait { from { opacity: 1; } to { opacity: 0.45; } }
