Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

45.1 KB
Raw Blame
@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";
@import "./nav-states.css";
@import "./nav-subs.css";
@import "./motion.css";
@import "./tab-row.css";
@import "./fx-compare.css";
@import "./release-art.css";

@custom-variant dark (&:is(.dark *));
/* Hover for the app frame's controls: like hover:, but only while the mouse leads (nav-states.css), so a control under a
   resting mouse never shows a second highlight beside the keyboard's. */
@custom-variant nav-hover {
  @media (hover: hover) {
    &:is(html:not([data-input="keyboard"]) *):hover {
      @slot;
    }
  }
}

:root {
  --radius: 0.625rem; /* 10px = Liner radius-medium. With the multipliers below: sm 6, md 8, lg 10, xl 14 */

  /* Surfaces. Canvas sheet is white; the frame (sidebar) is one tint darker */
  --background: oklch(1 0 0);                       /* #ffffff */
  --foreground: oklch(0.235 0.002 286);             /* #1e1e1f */
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.235 0.002 286);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.235 0.002 286);

  /* Brand: Fuobe Iris */
  --primary: oklch(0.52 0.21 282);                  /* #5d4bdb, white text 6.0:1 */
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.958 0.001 286);              /* #f1f1f2, subtle buttons and chips */
  --secondary-foreground: oklch(0.235 0.002 286);
  --muted: oklch(0.958 0.001 286);                  /* #f1f1f2 */
  --muted-foreground: oklch(0.539 0.005 286);       /* #6e6e71, 5.1:1 on white */
  --accent: oklch(0.667 0.004 286 / 8%);            /* translucent hover wash (Liner alpha-gray-8) */
  --accent-foreground: oklch(0.235 0.002 286);
  --destructive: oklch(0.577 0.215 27);             /* #dc2627 */
  --border: oklch(0.931 0.001 286);                 /* #e8e8e9 */
  --input: oklch(0.92 0.003 286);                   /* #e4e4e6 */
  --ring: oklch(0.62 0.17 282);                     /* components apply ring/50 → soft iris halo */

  /* Charts: iris, teal, amber, rose, sky */
  --chart-1: oklch(0.52 0.21 282);
  --chart-2: oklch(0.70 0.115 195);
  --chart-3: oklch(0.80 0.15 80);
  --chart-4: oklch(0.66 0.21 8);
  --chart-5: oklch(0.66 0.15 240);

  /* Sidebar = app frame */
  --sidebar: oklch(0.985 0.001 286);                /* #fafafb */
  --sidebar-foreground: oklch(0.235 0.002 286);
  --sidebar-primary: oklch(0.52 0.21 282);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(0.958 0.001 286);         /* active row #f1f1f2 */
  --sidebar-accent-foreground: oklch(0.235 0.002 286);
  --sidebar-border: oklch(0.931 0.001 286);
  --sidebar-ring: oklch(0.62 0.17 282);

  /* Fuobe extensions (Liner-inspired semantic roles) */
  --brand-text: oklch(0.47 0.20 282);               /* #513dc5, brand-colored text and links */
  --brand-faint: oklch(0.52 0.21 282 / 8%);         /* selected chip / tile fill */
  --brand-faint-hover: oklch(0.52 0.21 282 / 12%);
  --highlight: oklch(0.88 0.16 95);                 /* Spark #f9d544: credits, "New", favorites */
  --highlight-foreground: oklch(0.30 0.06 85);      /* #3c2b02 */
  --subtle-foreground: oklch(0.799 0.004 286);      /* #bdbdc0 placeholders, disabled controls, icons; too faint for text (1.9:1), use muted */
  --border-strong: oklch(0.667 0.004 286 / 48%);
  --success: oklch(0.56 0.13 147);
  --warning: oklch(0.62 0.15 60);
  --overlay: oklch(0 0 0 / 48%);
  --tooltip: oklch(0.345 0.003 286);                /* #39393b inverse chip, both themes */
  --tooltip-foreground: oklch(1 0 0);
  --media: oklch(0.183 0.002 286);                  /* lightbox / video letterbox, always dark */

  --elevation-soft: 0 4px 12px oklch(0 0 0 / 5%);
  --elevation-normal: 0 0 1px oklch(0 0 0 / 6%), 0 1px 8px oklch(0 0 0 / 6%), 0 2px 12px oklch(0 0 0 / 8%);
  --elevation-strong: 0 6px 16px oklch(0 0 0 / 12%), 0 4px 12px oklch(0 0 0 / 8%), 0 0 8px oklch(0 0 0 / 8%);
  --elevation-heavy: 0 16px 20px oklch(0 0 0 / 12%), 0 8px 16px oklch(0 0 0 / 8%), 0 0 8px oklch(0 0 0 / 8%);
}

.dark {
  --background: oklch(0.183 0.002 286);             /* #121213 canvas (deeper than Liner's #1e1e1f) */
  --foreground: oklch(0.985 0.001 286);             /* #fafafb */
  --card: oklch(0.235 0.002 286);                   /* #1e1e1f */
  --card-foreground: oklch(0.985 0.001 286);
  --popover: oklch(0.265 0.004 286);                /* #252527 */
  --popover-foreground: oklch(0.985 0.001 286);

  --primary: oklch(0.57 0.20 282);                  /* #6a5ee7, white text 4.8:1 */
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.29 0.004 286);               /* #2b2b2d */
  --secondary-foreground: oklch(0.985 0.001 286);
  --muted: oklch(0.29 0.004 286);
  --muted-foreground: oklch(0.735 0.003 286);       /* #a9a9ab, 8:1 on canvas */
  --accent: oklch(1 0 0 / 7%);                      /* white-alpha hover wash */
  --accent-foreground: oklch(0.985 0.001 286);
  --destructive: oklch(0.68 0.20 25);               /* #fc5855 */
  --border: oklch(1 0 0 / 8%);
  --input: oklch(1 0 0 / 12%);
  --ring: oklch(0.66 0.15 282);

  --chart-1: oklch(0.66 0.15 282);
  --chart-2: oklch(0.75 0.12 195);
  --chart-3: oklch(0.84 0.15 85);
  --chart-4: oklch(0.72 0.18 8);
  --chart-5: oklch(0.72 0.13 240);

  --sidebar: oklch(0.21 0.003 286);                 /* #18181a frame, a touch lighter than the canvas */
  --sidebar-foreground: oklch(0.985 0.001 286);
  --sidebar-primary: oklch(0.57 0.20 282);
  --sidebar-primary-foreground: oklch(1 0 0);
  --sidebar-accent: oklch(1 0 0 / 8%);
  --sidebar-accent-foreground: oklch(0.985 0.001 286);
  --sidebar-border: oklch(1 0 0 / 8%);
  --sidebar-ring: oklch(0.66 0.15 282);

  --brand-text: oklch(0.74 0.13 282);               /* #9ea0fa */
  --brand-faint: oklch(0.57 0.20 282 / 14%);
  --brand-faint-hover: oklch(0.57 0.20 282 / 20%);
  --highlight: oklch(0.85 0.15 95);
  --highlight-foreground: oklch(0.30 0.06 85);
  --subtle-foreground: oklch(0.476 0.005 286);      /* #5c5c5f */
  --border-strong: oklch(1 0 0 / 24%);
  --success: oklch(0.72 0.16 147);
  --warning: oklch(0.75 0.16 60);
  --overlay: oklch(0 0 0 / 64%);
  --tooltip: oklch(0.345 0.003 286);
  --tooltip-foreground: oklch(1 0 0);
  --media: oklch(0.122 0 0);

  --elevation-soft: 0 6px 12px oklch(0 0 0 / 20%);
  --elevation-normal: 0 0 1px oklch(0 0 0 / 22%), 0 1px 8px oklch(0 0 0 / 22%), 0 2px 16px oklch(0 0 0 / 26%);
  --elevation-strong: 0 6px 16px oklch(0 0 0 / 36%), 0 4px 12px oklch(0 0 0 / 24%), 0 0 8px oklch(0 0 0 / 24%);
  --elevation-heavy: 0 16px 20px oklch(0 0 0 / 36%), 0 8px 16px oklch(0 0 0 / 24%), 0 0 8px oklch(0 0 0 / 24%);
}

/*
 * The italic face of next/font's fallback family for Instrument Serif (layout.tsx), which only measures the upright
 * one: Times New Roman's own italic, scaled to Instrument Serif Italic's width and metrics (its 990/310 of 1000
 * ascent/descent; the size from Home's second headline line, the same length in both), so text drawn in it while the
 * face is late takes the same box.
 */
@font-face {
  font-family: "Instrument Serif Fallback";
  font-style: italic;
  src: local("Times New Roman Italic"), local("TimesNewRomanPS-ItalicMT");
  ascent-override: 112.22%;
  descent-override: 35.14%;
  line-gap-override: 0%;
  size-adjust: 88.22%;
}

@theme inline {
  /* Fonts: variables come from next/font (see 5.3) */
  --font-sans: var(--font-inter), ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: var(--font-instrument-serif), ui-serif, Georgia, serif;
  --font-mono: var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, monospace;

  /* shadcn color mapping */
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-ring: var(--ring);
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);

  /* Fuobe extensions → bg-brand-faint, text-brand-text, bg-highlight, bg-overlay, text-subtle-foreground… */
  --color-brand-text: var(--brand-text);
  --color-brand-faint: var(--brand-faint);
  --color-brand-faint-hover: var(--brand-faint-hover);
  --color-highlight: var(--highlight);
  --color-highlight-foreground: var(--highlight-foreground);
  --color-subtle-foreground: var(--subtle-foreground);
  --color-border-strong: var(--border-strong);
  --color-success: var(--success);
  --color-warning: var(--warning);
  --color-overlay: var(--overlay);
  --color-tooltip: var(--tooltip);
  --color-tooltip-foreground: var(--tooltip-foreground);
  --color-media: var(--media);

  /* Radius: keep the repo's multipliers. With --radius 10px: sm 6, md 8, lg 10, xl 14, 2xl 18, 3xl 22, 4xl 26 */
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-3xl: calc(var(--radius) * 2.2);
  --radius-4xl: calc(var(--radius) * 2.6);
  --radius-sheet: 0.75rem;     /* 12px: inset sheet corners, dialogs, result tiles */
  --radius-composer: 1.75rem;  /* 28px: pill composer (use rounded-[20px] below sm) */

  /* Elevation → shadow-soft / shadow-normal / shadow-strong / shadow-heavy */
  --shadow-soft: var(--elevation-soft);
  --shadow-normal: var(--elevation-normal);
  --shadow-strong: var(--elevation-strong);
  --shadow-heavy: var(--elevation-heavy);

  /* Type extras → text-[13px] (13px sidebar rows), text-body (15px reading), text-display (34px hero) */
  --text-[13px]: 0.8125rem;
  --text-[13px]--line-height: 1.3;
  --text-body: 0.9375rem;
  --text-body--line-height: 1.7;
  --text-display: 2.125rem;
  --text-display--line-height: 1.15;

  /* Motion (Liner primitives) → ease-enter / ease-exit / ease-move */
  --ease-enter: cubic-bezier(0.08, 0.82, 0.17, 1);
  --ease-exit: cubic-bezier(0.3, 0, 1, 1);
  --ease-move: cubic-bezier(0.36, 0, 0.12, 1);
  --default-transition-duration: 100ms;
  --default-transition-timing-function: cubic-bezier(0.36, 0, 0.12, 1);

  --animate-shimmer-text: shimmer-text 2.5s ease-in-out infinite;
  --animate-skeleton: skeleton-sweep 1.4s ease-in-out infinite;
  --animate-fade-up: fade-up var(--motion-base) cubic-bezier(0.08, 0.82, 0.17, 1) both;
  --animate-pop-in: pop-in var(--motion-fast) cubic-bezier(0.08, 0.82, 0.17, 1) both;
  --animate-caret: caret-blink 1s step-end infinite;
  /* Click feedback while a link's route loads: shows only if the navigation takes a moment. */
  --animate-pending-in: pending-in 150ms ease-out 120ms both;
  /* Home: the composer's ring brightens once when a Try chip fills it; Audio's waveform ripples on hover. */
  --animate-ring-flash: ring-flash 260ms ease-out both;
  --animate-wave-bar: wave-bar 900ms ease-in-out infinite;
  /* Clean up voice's demo: the "Noisy restaurant" dot pulses while the room plays. */
  --animate-live-dot: live-dot 1.1s ease-out infinite;
  /* Watermark Remover: the scan line moving down the picture, and the line across the marks being removed. */
  --animate-wm-scan: wm-scan 2.2s ease-in-out infinite;
  --animate-wm-sweep: wm-sweep 1.6s ease-in-out infinite;

  @keyframes shimmer-text {
    from { mask-position: 100% 0; }
    to   { mask-position: 0 0; }
  }
  @keyframes skeleton-sweep {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
  }
  @keyframes fade-up {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes pop-in {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
  }
  @keyframes pending-in {
    from { opacity: 0; }
    to   { opacity: 1; }
  }
  @keyframes caret-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
  }
  @keyframes ring-flash {
    0% { opacity: 0; }
    35% { opacity: 1; }
    100% { opacity: 0; }
  }
  @keyframes wave-bar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.35); }
  }
  @keyframes live-dot {
    from { box-shadow: 0 0 0 0 rgb(255 179 71 / 60%); }
    to { box-shadow: 0 0 0 8px rgb(255 179 71 / 0%); }
  }
  @keyframes wm-scan {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }
  @keyframes wm-sweep {
    0% { top: 0%; }
    50% { top: calc(100% - 2px); }
    100% { top: 0%; }
  }
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  html {
    @apply font-sans;
  }
  body {
    /* the frame color (the top bar and pages outside the app frame); the app's <main> uses bg-background */
    @apply bg-sidebar text-foreground antialiased;
    font-feature-settings: "cv11", "ss01"; /* Inter: single-storey a, open digits; optional */
    /* viewport-fit=cover puts the page under the notch of a phone held sideways; every page keeps clear of it here (fixed bars pad themselves) */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  h1, h2, h3, .font-heading {
    letter-spacing: -0.01em; /* Liner uses -0.03em on Flare; Instrument Serif is already tight */
  }
  button:not(:disabled), [role="button"]:not(:disabled) {
    cursor: pointer;
  }
}

@layer utilities {
  /* "Generating…" label: <span class="shimmer-text animate-shimmer-text">Generating…</span> */
  .shimmer-text {
    mask-image: linear-gradient(90deg, #000 30%, #0004 50%, #000 70%);
    mask-size: 250% 100%;
  }
  .skeleton-sweep {
    background-image: linear-gradient(90deg, transparent, oklch(1 0 0 / 50%) 50%, transparent);
    background-size: 200% 100%;
    background-repeat: no-repeat;
  }
  .dark .skeleton-sweep {
    background-image: linear-gradient(90deg, transparent, oklch(1 0 0 / 6%) 50%, transparent);
  }
  @media (prefers-reduced-motion: reduce) {
    .animate-shimmer-text, .animate-skeleton { animation: none; }
  }
}

/* Fuobe additions */
@layer utilities {
  .scrollbar-none {
    scrollbar-width: none;
  }
  .scrollbar-none::-webkit-scrollbar {
    display: none;
  }
  .checkerboard {
    background-color: var(--muted);
    background-image: conic-gradient(var(--secondary) 25%, transparent 0 50%, var(--secondary) 0 75%, transparent 0);
    background-size: 16px 16px;
  }
}

/* ---------------------------------------------------------------------------------------------
 * The app frame (components/nav): the top bar from md (56 px) and the phone's tab bar below it
 * (64 px plus the home indicator's inset). Pages size themselves to what is left: h-content,
 * min-h-content; sticky headers sit under the bar (top-chrome) and sticky footers above the tabs
 * (bottom-chrome). A full-screen studio, and the on-screen keyboard, hide the phone's tabs.
 * ------------------------------------------------------------------------------------------- */
:root {
  --chrome-top: 0px;
  --chrome-bottom: 0px;
  --content-h: calc(100svh - var(--chrome-top) - var(--chrome-bottom));
}
@media (min-width: 768px) {
  :root { --chrome-top: 3.5rem; }
}
@media (max-width: 767.98px) {
  :root { --chrome-bottom: calc(4rem + env(safe-area-inset-bottom)); }
  html[data-fullscreen-studio], html[data-keyboard-open] { --chrome-bottom: 0px; }
}
@media print {
  :root { --chrome-top: 0px; --chrome-bottom: 0px; }
}
@utility h-content { height: var(--content-h); }
@utility min-h-content { min-height: var(--content-h); }
@utility max-h-content { max-height: var(--content-h); }
@utility top-chrome { top: var(--chrome-top); }
@utility bottom-chrome { bottom: var(--chrome-bottom); }
/* A link to #section, and Tab moving down the page, stop clear of the bar and the tabs (focus is never hidden under them). */
html {
  scroll-padding-top: var(--chrome-top);
  scroll-padding-bottom: var(--chrome-bottom);
}

/* Markdown (status / docs pages) */
.prose-fuobe { font-size: var(--text-body); line-height: 1.7; }
.prose-fuobe h1 { font-family: var(--font-heading); font-size: 34px; line-height: 1.15; margin: 0 0 0.6em; }
.prose-fuobe h2 { font-family: var(--font-heading); font-size: 26px; margin: 1.6em 0 0.5em; }
.prose-fuobe h3 { font-weight: 600; font-size: 16px; margin: 1.4em 0 0.4em; }
.prose-fuobe p, .prose-fuobe ul, .prose-fuobe ol { margin: 0 0 1em; }
.prose-fuobe ul { list-style: disc; padding-left: 1.4em; }
.prose-fuobe ol { list-style: decimal; padding-left: 1.4em; }
.prose-fuobe li { margin: 0.25em 0; }
.prose-fuobe a { color: var(--brand-text); text-underline-offset: 2px; }
.prose-fuobe a:hover { text-decoration: underline; }
.prose-fuobe code { font-family: var(--font-mono); font-size: 0.85em; background: var(--muted); border-radius: 4px; padding: 0.1em 0.35em; }
.prose-fuobe pre { background: var(--muted); border-radius: 10px; padding: 12px 14px; overflow-x: auto; margin: 0 0 1em; }
.prose-fuobe pre code { background: none; padding: 0; }
.prose-fuobe table { width: 100%; border-collapse: separate; border-spacing: 0; border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; margin: 0 0 1.2em; font-size: 14px; display: block; overflow-x: auto; }
.prose-fuobe th { text-align: left; font-weight: 600; padding: 10px 14px; background: var(--muted); }
.prose-fuobe td { padding: 8px 14px; border-top: 0.5px solid var(--border); vertical-align: top; }
.prose-fuobe blockquote { border-left: 3px solid var(--border); padding-left: 1em; color: var(--muted-foreground); }

/* ---------------------------------------------------------------------------------------------
 * Horizontal scrollers with fade edges (gallery category strip): data-fade-start / -end are set
 * by the scroll handler when there is more to see on that side.
 * ------------------------------------------------------------------------------------------- */
.fade-x {
  --fade-l: 0px;
  --fade-r: 0px;
  mask-image: linear-gradient(to right, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}
.fade-x[data-fade-start] { --fade-l: 32px; }
.fade-x[data-fade-end] { --fade-r: 56px; }

/*
 * Home's sections under the fold (home-sections.tsx): the first paint doesn't wait for their layout. Until the page
 * is idle (home-view.tsx then marks them data-laid-out, one at a time) each one is laid out only once it comes near
 * the screen, and is --cv high until then: its measured height at that width, so nothing moves when it's drawn.
 */
.home-cv {
  content-visibility: auto;
  contain-intrinsic-size: auto var(--cv, 700px);
}
.home-cv[data-laid-out] {
  content-visibility: visible;
}

/* ---------------------------------------------------------------------------------------------
 * Procedural preset previews (preset-preview.tsx, src/lib/preset-cards.ts).
 * A camera move animates --pv-t from 0 to 1; every depth layer turns it into its own transform:
 *   translate = (pan + tx·d + orbit·o)% · t, scale = 1 + base + (zoom + dolly·d) · t, rotate = roll · t
 * (the same formula as layerTransform() in preset-cards.ts, which the tests check for coverage).
 * Effects and apps add a treatment (.pv-fx) whose resting styles are the poster frame.
 * ------------------------------------------------------------------------------------------- */
@property --pv-t {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.pv { position: absolute; inset: 0; overflow: hidden; isolation: isolate; contain: layout paint; }
.pv i { position: absolute; display: block; pointer-events: none; }
.pv-cam, .pv-shake, .pv-fx { position: absolute; inset: 0; }
.pv-cam { --pv-t: 0; }
.pv-img {
  position: absolute; left: -12%; top: -12%; width: 124%; height: 124%; max-width: none;
  object-fit: cover; user-select: none; pointer-events: none;
}
.pv-layer {
  transform:
    translate(
      calc((var(--pv-panX, 0) + var(--pv-tx, 0) * var(--d) + var(--pv-orbit, 0) * var(--o)) * var(--pv-t) * 1%),
      calc((var(--pv-panY, 0) + var(--pv-ty, 0) * var(--d)) * var(--pv-t) * 1%)
    )
    scale(calc(1 + var(--pv-base, 0) + (var(--pv-zoom, 0) + var(--pv-dolly, 0) * var(--d)) * var(--pv-t)))
    rotate(calc(var(--pv-roll, 0) * var(--pv-t) * 1deg));
}
/* Each preset's own hue recolors the still (blend: color keeps its light and shade), so
 * neighbouring cards on the same still read as different looks. */
.pv-tint {
  inset: 0; z-index: 1; mix-blend-mode: color; opacity: 0.42;
  background: linear-gradient(135deg, oklch(0.72 0.16 var(--pv-hue, 282)), oklch(0.55 0.2 calc(var(--pv-hue, 282) + 50)));
}
.pv[data-flip] .pv-shake { scale: -1 1; }

/* A camera move rests partway in (the still already shows the move's framing), and plays on from
 * there; its line diagram (move-glyphs.ts) says which move it is until it plays. */
.pv[data-profile] .pv-cam { --pv-t: 0.5; }
.pv:is([data-profile="crash"], [data-profile="yoyo"], [data-profile="whip"]) .pv-cam { --pv-t: 0; }
.pv[data-profile="crash-rev"] .pv-cam { --pv-t: 1; }
.pv[data-profile="loop"] .pv-cam { --pv-t: 0.06; }
.pv-glyph {
  position: absolute; left: 50%; top: 50%; z-index: 7; width: 42%; translate: -50% -50%;
  fill: none; stroke: #fff; stroke-width: 1.75px; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 1.5px oklch(0 0 0 / 0.55)); opacity: 0.92; transition: opacity 220ms ease;
}
.pv-glyph path { vector-effect: non-scaling-stroke; }
.pv-glyph [data-dashed] { stroke-dasharray: 2.5 3; opacity: 0.75; }
.pv[data-playing] .pv-glyph { opacity: 0; }
.pv-fx { z-index: 5; }
.pv[data-playing] .pv-layer, .pv[data-playing] .pv-cam { will-change: transform; }

/* Timing profiles */
.pv[data-playing] .pv-cam { animation: pv-t-up var(--pv-dur, 3s) cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
.pv[data-playing][data-profile="ease-rev"] .pv-cam { animation-name: pv-t-down; }
.pv[data-playing][data-profile="slow"] .pv-cam { animation-timing-function: ease-in-out; }
.pv[data-playing][data-profile="loop"] .pv-cam { animation: pv-t-up var(--pv-dur, 3s) linear infinite; }
.pv[data-playing][data-profile="crash"] .pv-cam { animation: pv-t-crash var(--pv-dur, 2.4s) linear infinite; }
.pv[data-playing][data-profile="crash-rev"] .pv-cam { animation: pv-t-crash-rev var(--pv-dur, 2.4s) linear infinite; }
.pv[data-playing][data-profile="yoyo"] .pv-cam { animation: pv-t-yoyo var(--pv-dur, 3s) ease-in-out infinite; }
.pv[data-playing][data-profile="whip"] .pv-cam { animation: pv-t-whip var(--pv-dur, 2.6s) ease-in-out infinite; }
.pv[data-playing]:not([data-profile]) .pv-cam { animation: none; }
/* Play on from the resting frame instead of jumping back to the start. */
.pv[data-playing]:is([data-profile="ease"], [data-profile="ease-rev"], [data-profile="slow"]) .pv-cam { animation-delay: calc(var(--pv-dur, 3s) * -0.5); }
.pv[data-playing][data-profile="loop"] .pv-cam { animation-delay: calc(var(--pv-dur, 3s) * -0.06); }
@keyframes pv-t-up { from { --pv-t: 0; } to { --pv-t: 1; } }
@keyframes pv-t-down { from { --pv-t: 1; } to { --pv-t: 0; } }
@keyframes pv-t-crash {
  0%, 24% { --pv-t: 0; animation-timing-function: cubic-bezier(0.8, 0, 0.9, 0.5); }
  36%, 80% { --pv-t: 1; animation-timing-function: ease-in-out; }
  100% { --pv-t: 0; }
}
@keyframes pv-t-crash-rev {
  0%, 24% { --pv-t: 1; animation-timing-function: cubic-bezier(0.8, 0, 0.9, 0.5); }
  36%, 80% { --pv-t: 0; animation-timing-function: ease-in-out; }
  100% { --pv-t: 1; }
}
@keyframes pv-t-yoyo { 0%, 100% { --pv-t: 0; } 28% { --pv-t: 1; } 50% { --pv-t: 0.3; } 74% { --pv-t: 1; } }
@keyframes pv-t-whip { 0%, 28% { --pv-t: 0; } 40%, 68% { --pv-t: 1; } 80%, 100% { --pv-t: 0; } }

/* Camera-wide extras */
.pv[data-playing][data-stage="handheld"] .pv-shake { animation: pv-handheld 2.1s ease-in-out infinite; }
.pv[data-playing][data-stage="walk"] .pv-shake { animation: pv-walk 0.9s ease-in-out infinite; }
.pv[data-playing][data-stage="bank"] .pv-shake { animation: pv-bank 2.2s ease-in-out infinite alternate; }
.pv[data-playing][data-stage="impact"] .pv-shake { animation: pv-impact var(--pv-dur, 1.4s) linear infinite; }
.pv[data-playing][data-stage="float"] .pv-shake { animation: pv-float 2.6s ease-in-out infinite; }
.pv[data-playing][data-stage="flicker"] .pv-shake { animation: pv-flicker 1.2s steps(1) infinite; }
.pv[data-playing][data-stage="rack"] .pv-l-bg, .pv[data-playing][data-stage="rack"] .pv-l-mid { animation: pv-blur-in var(--pv-dur, 3s) ease-in-out infinite alternate; }
.pv[data-playing][data-stage="rack"] .pv-l-subject, .pv[data-playing][data-stage="rack"] .pv-l-fg { animation: pv-blur-out var(--pv-dur, 3s) ease-in-out infinite alternate; }
/* Subject-only extras use the individual translate/scale properties, so they add to the move. */
.pv[data-playing][data-stage="bounce"] .pv-l-subject { animation: pv-bounce 1.3s cubic-bezier(0.3, 0, 0.3, 1) infinite; }
.pv[data-playing][data-stage="slide"] .pv-l-subject { animation: pv-slide var(--pv-dur, 3s) ease-in-out infinite alternate; }
.pv[data-playing][data-stage="turn"] .pv-l-subject { animation: pv-turn 2.4s ease-in-out infinite; }
.pv[data-playing][data-through] .pv-l-fg { animation: pv-through var(--pv-dur, 3s) cubic-bezier(0.45, 0, 0.55, 1) infinite alternate; }
.pv[data-playing][data-profile="ease-rev"][data-through] .pv-l-fg { animation-direction: alternate-reverse; }
@keyframes pv-handheld {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  18% { translate: -0.9% 0.6%; rotate: -0.5deg; }
  37% { translate: 0.7% -0.4%; rotate: 0.4deg; }
  56% { translate: -0.4% -0.8%; rotate: -0.25deg; }
  77% { translate: 0.9% 0.5%; rotate: 0.5deg; }
}
@keyframes pv-walk { 0%, 50%, 100% { translate: 0 0; } 25%, 75% { translate: 0 -1.1%; } }
@keyframes pv-bank { from { rotate: -5deg; } to { rotate: 5deg; } }
@keyframes pv-impact {
  0%, 30%, 52%, 100% { translate: 0 0; }
  34% { translate: -2.2% 1%; } 38% { translate: 2% -1.2%; } 42% { translate: -1.4% 0.8%; } 47% { translate: 0.9% -0.5%; }
}
@keyframes pv-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.6%; } }
@keyframes pv-flicker { 0%, 100% { filter: none; } 20% { filter: brightness(1.18); } 45% { filter: brightness(0.92); } 70% { filter: brightness(1.1); } }
@keyframes pv-blur-in { from { filter: blur(0); } to { filter: blur(3px); } }
@keyframes pv-blur-out { from { filter: blur(3px); } to { filter: blur(0); } }
@keyframes pv-bounce { 0%, 100% { translate: 0 0; } 42%, 58% { translate: 0 -8%; } }
@keyframes pv-slide { from { translate: 0 0; } to { translate: calc(var(--pv-tx, 6) * -1.5%) 0; } }
@keyframes pv-turn { 0%, 100% { scale: 1 1; } 50% { scale: 0.86 1; } }
@keyframes pv-through { 0% { opacity: 1; } 70% { opacity: 0.25; } 100% { opacity: 0; } }

/* ----- Treatments (effects and apps) ----- */
.pv-spark {
  --x: calc(12% + mod(var(--i) * 37, 76) * 1%);
  --y: calc(14% + mod(var(--i) * 53, 64) * 1%);
  left: var(--x); top: var(--y); width: 10px; height: 10px; margin: -5px;
  background: radial-gradient(circle, #fff 0 18%, oklch(0.95 0.08 90 / 0.8) 30%, transparent 62%);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0.75; scale: 0.7;
}
.pv[data-playing] .pv-spark { animation: pv-twinkle 1.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.23s); }
@keyframes pv-twinkle { 0%, 100% { opacity: 0; scale: 0.3; } 50% { opacity: 1; scale: 1.15; } }
.pv[data-fx="sparkle"] .pv-spark { width: 12px; height: 12px; }
.pv[data-playing][data-fx="sparkle"] .pv-spark { animation: pv-twinkle 1.4s ease-in-out infinite, pv-fall 2.8s linear infinite; animation-delay: calc(var(--i) * -0.31s); }
@keyframes pv-fall { from { translate: 0 -30%; } to { translate: 0 260%; } }

.pv-fire {
  left: -10%; right: -10%; bottom: -12%; height: 64%; transform-origin: 50% 100%;
  background:
    radial-gradient(45% 75% at 28% 100%, #fff1a8 0, #ffb13b 30%, #ff5a1f 55%, transparent 72%),
    radial-gradient(40% 70% at 72% 100%, #ffe58a 0, #ff8a2a 34%, #ff3d1f 58%, transparent 74%);
  mix-blend-mode: screen; filter: blur(3px); opacity: 0.9;
}
.pv-fire-2 { height: 48%; opacity: 0.75; scale: -1 1; }
.pv[data-playing] .pv-fire { animation: pv-flame 0.55s ease-in-out infinite alternate; }
.pv[data-playing] .pv-fire-2 { animation-duration: 0.42s; animation-delay: -0.2s; }
@keyframes pv-flame { from { transform: scale(1, 0.9) skewX(-3deg); } to { transform: scale(1.05, 1.15) skewX(3deg); } }
.pv[data-fx="fire"] .pv-spark { top: auto; bottom: 10%; background: radial-gradient(circle, #ffe9a0 0 25%, #ff7a2a 45%, transparent 65%); clip-path: none; }
.pv[data-playing][data-fx="fire"] .pv-spark { animation: pv-ember 1.6s ease-out infinite; animation-delay: calc(var(--i) * -0.33s); }
@keyframes pv-ember { from { translate: 0 0; opacity: 1; } to { translate: 12px -120px; opacity: 0; } }

.pv-wave { left: -60%; width: 220%; aspect-ratio: 1; top: 64%; border-radius: 43%; background: oklch(0.62 0.13 230 / 0.55); }
.pv-wave-2 { top: 70%; border-radius: 40%; background: oklch(0.72 0.12 210 / 0.5); rotate: 40deg; }
.pv[data-playing] .pv-wave { animation: pv-spin 5s linear infinite; }
.pv[data-playing] .pv-wave-2 { animation-duration: 3.6s; animation-direction: reverse; }
.pv[data-playing][data-fx="water"] .pv-fx { animation: pv-rise 3s ease-in-out infinite alternate; }
@keyframes pv-spin { to { rotate: 360deg; } }
@keyframes pv-rise { from { translate: 0 6%; } to { translate: 0 -14%; } }

.pv-frost { inset: 0; background: radial-gradient(ellipse at center, transparent 38%, oklch(0.93 0.05 220 / 0.55) 72%, oklch(0.97 0.03 220 / 0.92) 100%); mix-blend-mode: screen; }
.pv[data-fx="ice"] .pv-cam { filter: saturate(0.75) hue-rotate(-12deg); }
.pv[data-playing] .pv-frost { animation: pv-freeze 2.6s ease-in-out infinite alternate; }
@keyframes pv-freeze { from { opacity: 0.25; scale: 1.25; } to { opacity: 1; scale: 1; } }

.pv-streaks {
  top: 0; bottom: 0; left: -100%; width: 300%;
  background: repeating-linear-gradient(98deg, transparent 0 22px, oklch(1 0 0 / 0.38) 22px 24px, transparent 24px 58px, oklch(1 0 0 / 0.22) 58px 59px, transparent 59px 90px);
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}
.pv[data-playing] .pv-streaks { animation: pv-gust 0.9s linear infinite; }
@keyframes pv-gust { to { translate: 33.33% 0; } }

.pv-bolt { position: absolute; left: 54%; top: -4%; width: 18%; height: 72%; fill: #f4f7ff; filter: drop-shadow(0 0 6px #9fc4ff); opacity: 0; }
.pv-flash { inset: 0; background: #fff; opacity: 0; mix-blend-mode: soft-light; }
.pv[data-fx="lightning"] .pv-bolt { opacity: 0.85; }
.pv[data-playing][data-fx="lightning"] .pv-bolt { animation: pv-strike 2.2s steps(1) infinite; }
.pv[data-playing][data-fx="lightning"] .pv-flash, .pv[data-playing][data-fx="explode"] .pv-flash { animation: pv-strike 2.2s steps(1) infinite; }
@keyframes pv-strike { 0%, 100% { opacity: 0; } 8% { opacity: 1; } 12% { opacity: 0; } 16% { opacity: 0.8; } 22% { opacity: 0; } }

/* At rest the burst shows near its peak, placed by the preset's hue so neighbouring blasts differ. */
.pv-burst {
  left: calc(50% + sin(var(--pv-hue, 0) * 1deg) * 22%); top: calc(50% + cos(var(--pv-hue, 0) * 3deg) * 12%);
  width: 120%; aspect-ratio: 1; translate: -50% -50%; scale: 0.72; border-radius: 50%;
  background: radial-gradient(circle, #fffbe0 0, #ffd166 18%, #ff7b2e 36%, oklch(0.5 0.2 30 / 0.6) 52%, transparent 66%);
  mix-blend-mode: screen; opacity: 0.85;
}
.pv[data-playing][data-fx="explode"] .pv-burst { animation: pv-boom 2.2s cubic-bezier(0.2, 0.7, 0.3, 1) infinite; }
.pv[data-playing][data-fx="explode"] .pv-shake { animation: pv-impact 2.2s linear infinite; }
@keyframes pv-boom { 0%, 6% { scale: 0.05; opacity: 1; } 40% { scale: 1.1; opacity: 0.9; } 80%, 100% { scale: 1.5; opacity: 0; } }

.pv-halo { left: 50%; top: 46%; width: 80%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, oklch(0.98 0.06 90 / 0.8), oklch(0.9 0.12 80 / 0.35) 40%, transparent 68%); mix-blend-mode: screen; }
.pv[data-playing] .pv-halo { animation: pv-pulse 1.8s ease-in-out infinite; }
@keyframes pv-pulse { 0%, 100% { opacity: 0.55; scale: 0.9; } 50% { opacity: 1; scale: 1.12; } }

.pv-petal { left: calc(8% + mod(var(--i) * 29, 84) * 1%); top: calc(-6% + mod(var(--i) * 41, 70) * 1%); width: 9px; height: 6px; border-radius: 60% 0 60% 0; background: oklch(0.86 0.09 355); rotate: calc(var(--i) * 47deg); opacity: 0.9; }
.pv[data-playing] .pv-petal { animation: pv-drift 3.2s linear infinite; animation-delay: calc(var(--i) * -0.4s); }
@keyframes pv-drift { from { translate: -10px -40px; rotate: 0deg; } to { translate: 30px 260px; rotate: 300deg; } }

.pv-shade { inset: 0; background: oklch(0.15 0.03 280 / 0.45); mix-blend-mode: multiply; }
.pv-light { left: 0; top: 0; width: 90%; aspect-ratio: 1; translate: -30% -25%; border-radius: 50%; background: radial-gradient(circle, oklch(0.97 0.08 75 / 0.9), oklch(0.85 0.12 60 / 0.3) 45%, transparent 70%); mix-blend-mode: screen; }
.pv[data-playing] .pv-light { animation: pv-sweep 3.2s ease-in-out infinite alternate; }
@keyframes pv-sweep { from { translate: -30% -25%; } to { translate: 45% 10%; } }

.pv-vignette { inset: 0; background: radial-gradient(ellipse at center, transparent 30%, oklch(0.1 0.02 20 / 0.85) 95%); }
.pv-blood { inset: 0; background: oklch(0.45 0.2 25 / 0.35); mix-blend-mode: multiply; opacity: 0.6; }
.pv[data-playing] .pv-vignette { animation: pv-pulse 1.1s ease-in-out infinite; }
.pv[data-playing] .pv-blood { animation: pv-strike 1.8s steps(1) infinite; }
.pv[data-playing][data-fx="dark"] .pv-shake { animation: pv-handheld 0.8s linear infinite; }

.pv-flare { left: -30%; top: 30%; width: 160%; height: 26%; background: radial-gradient(closest-side, oklch(1 0 0 / 0.95), oklch(0.85 0.1 220 / 0.55) 18%, transparent 65%), linear-gradient(to bottom, transparent 46%, oklch(0.9 0.1 210 / 0.75) 50%, transparent 54%); mix-blend-mode: screen; translate: -18% 0; }
.pv-flash-soft { background: oklch(0.95 0.06 220); }
.pv[data-playing] .pv-flare { animation: pv-glide 2.4s ease-in-out infinite alternate; }
.pv[data-playing][data-fx="flare"] .pv-flash { animation: pv-strike 2.4s steps(1) infinite; }
@keyframes pv-glide { from { translate: -22% 0; } to { translate: 22% 0; } }

/* Wipes between the original and a treated copy; the seam rides the edge. */
.pv-wipe-h { clip-path: inset(0 0 0 var(--w, 50%)); }
.pv-wipe-v { clip-path: inset(var(--w, 50%) 0 0 0); }
.pv-halftone { position: absolute; inset: 0; display: block; }
.pv-halftone::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, oklch(0.2 0.02 280 / 0.45) 0 1.1px, transparent 1.6px) 0 0 / 6px 6px; mix-blend-mode: multiply; }
.pv-inked { filter: grayscale(1) contrast(1.7) brightness(1.05); }
.pv-graded { filter: sepia(0.45) saturate(1.7) hue-rotate(calc(var(--pv-hue, 282) * 1deg - 30deg)) contrast(1.1); }
.pv-soft { filter: blur(3px) saturate(0.7) brightness(0.95); }
.pv-morph { filter: hue-rotate(150deg) saturate(1.6) contrast(1.15) brightness(1.05); }
.pv-recolor { filter: hue-rotate(calc(var(--pv-hue, 282) * 1deg)) saturate(1.4); }
.pv-seam { background: oklch(1 0 0 / 0.9); box-shadow: 0 0 10px oklch(1 0 0 / 0.8); }
.pv-seam-v { top: 0; bottom: 0; width: 2px; left: var(--w, 50%); }
.pv-seam-h { left: 0; right: 0; height: 2px; top: var(--w, 50%); }
.pv-knob::after { content: ""; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; translate: -50% -50%; border-radius: 9999px; background: #fff; box-shadow: 0 1px 4px oklch(0 0 0 / 0.35); }
@property --w { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.pv[data-fx] .pv-fx { --w: 50%; }
.pv[data-fx="wipe"] .pv-fx { --w: 62%; }
.pv[data-playing] .pv-fx:has(.pv-seam) { animation: pv-wipe 3s ease-in-out infinite alternate; }
@keyframes pv-wipe { from { --w: 100%; } to { --w: 0%; } }

.pv-rgb { filter: drop-shadow(3px 0 0 oklch(0.65 0.25 20 / 0.7)) drop-shadow(-3px 0 0 oklch(0.8 0.15 200 / 0.7)); opacity: 0.6; mix-blend-mode: screen; }
.pv-slice { clip-path: inset(38% 0 48% 0); translate: 4% 0; }
.pv-slice-2 { clip-path: inset(66% 0 22% 0); translate: -3% 0; }
.pv[data-playing] .pv-slice { animation: pv-jitter 0.6s steps(2) infinite; }
.pv[data-playing] .pv-slice-2 { animation-duration: 0.45s; animation-direction: reverse; }
.pv[data-playing] .pv-rgb { animation: pv-strike 1.2s steps(1) infinite; }
@keyframes pv-jitter { 0% { translate: 5% 0; } 25% { translate: -4% 0; } 50% { translate: 2% 0; } 75% { translate: -6% 0; } 100% { translate: 3% 0; } }

.pv-ring { inset: 0; box-shadow: inset 0 0 0 999px oklch(0.15 0.02 280 / 0); }
.pv[data-playing][data-fx="tiny"] .pv-cam { animation: pv-planet 3.2s ease-in-out infinite alternate; }
@keyframes pv-planet { from { clip-path: circle(80% at 50% 50%); scale: 1; rotate: 0deg; } to { clip-path: circle(36% at 50% 50%); scale: 0.92; rotate: -25deg; } }

.pv-grid { inset: 0; opacity: 0.25; background: linear-gradient(oklch(0.85 0.12 200 / 0.6) 1px, transparent 1px) 0 0 / 100% 14px, linear-gradient(90deg, oklch(0.85 0.12 200 / 0.6) 1px, transparent 1px) 0 0 / 14px 100%; mask-image: radial-gradient(ellipse at 50% 45%, #000 20%, transparent 60%); }
.pv-scanline { left: 0; right: 0; top: 38%; height: 3px; background: oklch(0.85 0.15 200); box-shadow: 0 0 12px 3px oklch(0.8 0.15 200 / 0.7); }
.pv[data-playing] .pv-scanline { animation: pv-scan 1.8s ease-in-out infinite alternate; }
@keyframes pv-scan { from { top: 14%; } to { top: 82%; } }
.pv-brackets { left: 30%; right: 30%; top: 16%; bottom: 30%; --c: oklch(1 0 0 / 0.9); background: linear-gradient(var(--c), var(--c)) 0 0 / 14px 2px, linear-gradient(var(--c), var(--c)) 0 0 / 2px 14px, linear-gradient(var(--c), var(--c)) 100% 0 / 14px 2px, linear-gradient(var(--c), var(--c)) 100% 0 / 2px 14px, linear-gradient(var(--c), var(--c)) 0 100% / 14px 2px, linear-gradient(var(--c), var(--c)) 0 100% / 2px 14px, linear-gradient(var(--c), var(--c)) 100% 100% / 14px 2px, linear-gradient(var(--c), var(--c)) 100% 100% / 2px 14px; background-repeat: no-repeat; }
.pv-brackets-wide { left: 10%; right: 10%; top: 12%; bottom: 12%; }
.pv[data-playing] .pv-brackets-wide { animation: pv-frame 2.6s ease-in-out infinite alternate; }
.pv[data-playing][data-fx="frame"] .pv-cam { animation: pv-push 2.6s ease-in-out infinite alternate; }
@keyframes pv-frame { from { inset: 12% 10%; } to { inset: 24% 24%; } }
@keyframes pv-push { from { scale: 1; } to { scale: 1.18; } }
.pv-rec { left: 13%; top: 15%; width: 7px; height: 7px; border-radius: 9999px; background: oklch(0.63 0.24 25); box-shadow: 0 0 6px oklch(0.63 0.24 25); }
.pv[data-playing] .pv-rec { animation: pv-strike 1s steps(1) infinite reverse; }

.pv-shine { top: -20%; bottom: -20%; width: 28%; left: 10%; rotate: 18deg; background: linear-gradient(90deg, transparent, oklch(1 0 0 / 0.55), transparent); mix-blend-mode: soft-light; }
.pv[data-playing] .pv-shine { animation: pv-shine 2.2s ease-in-out infinite; }
.pv[data-playing][data-fx="shine"] .pv-cam { animation: pv-push 4.4s ease-in-out infinite alternate; }
@keyframes pv-shine { 0% { left: -40%; } 60%, 100% { left: 120%; } }

.pv-progress { left: 8%; right: 8%; bottom: 9%; height: 3px; border-radius: 9999px; background: linear-gradient(90deg, #fff var(--p, 32%), oklch(1 0 0 / 0.35) var(--p, 32%)); }
.pv-play { left: 50%; top: 46%; width: 30px; height: 30px; translate: -50% -50%; border-radius: 9999px; background: oklch(0 0 0 / 0.35) linear-gradient(#fff, #fff) 55% 50% / 0 0 no-repeat; }
.pv-play::after { content: ""; position: absolute; left: 12px; top: 9px; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
@property --p { syntax: "<percentage>"; inherits: true; initial-value: 32%; }
.pv[data-playing] .pv-progress { animation: pv-progress 3.2s linear infinite; }
.pv[data-playing] .pv-play { opacity: 0; transition: opacity 200ms; }
.pv[data-playing][data-fx="play"] .pv-cam { animation: pv-push 3.2s ease-in-out infinite alternate; }
@keyframes pv-progress { from { --p: 0%; } to { --p: 100%; } }

/* Cracked glass: drawn at rest, the cracks race out from the impact when playing. */
.pv-crack { position: absolute; inset: 0; width: 100%; height: 100%; fill: oklch(1 0 0 / 0.9); stroke: oklch(1 0 0 / 0.88); stroke-width: 1.3px; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 1px oklch(0 0 0 / 0.7)); }
.pv-crack path { fill: none; vector-effect: non-scaling-stroke; stroke-dasharray: 220; stroke-dashoffset: 0; }
.pv[data-playing] .pv-crack path { animation: pv-crack 2.2s cubic-bezier(0.2, 0.8, 0.3, 1) infinite; }
.pv[data-playing][data-fx="crack"] .pv-flash { animation: pv-strike 2.2s steps(1) infinite; }
.pv[data-playing][data-fx="crack"] .pv-shake { animation: pv-impact 2.2s linear infinite; }
@keyframes pv-crack { 0%, 8% { stroke-dashoffset: 220; } 40%, 100% { stroke-dashoffset: 0; } }

.pv[data-playing][data-fx="pop"] .pv-cam { animation: pv-pop 1.6s cubic-bezier(0.3, 1.4, 0.5, 1) infinite; }
.pv[data-playing][data-fx="morph"] .pv-cam, .pv[data-playing][data-fx="glow"] .pv-cam { animation: pv-push 3s ease-in-out infinite alternate; }
@keyframes pv-pop { 0%, 100% { scale: 1; } 30% { scale: 1.1; } 55% { scale: 1.03; } }

@media (prefers-reduced-motion: reduce) {
  .pv, .pv * { animation: none !important; transition: none !important; }
}

/* Live edit (src/components/live): a new frame fades in over the last; the demo dock's caret blinks. */
@keyframes live-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes live-caret { 50% { opacity: 0; } }
@keyframes live-chip { from { opacity: 0; translate: 6px 0; } to { opacity: 1; translate: 0 0; } }
/* A live frame is drawn across the picture: a soft edge travels left to right across the part the camera shows, and
   a faint line rides on it. The mask is 2.5 pictures wide; --sweep-from/--sweep-to and --scan-from/--scan-to come
   from sweepPath (src/lib/live/demo.ts). */
@keyframes live-sweep {
  from { -webkit-mask-image: linear-gradient(90deg, #000 46%, transparent 54%); mask-image: linear-gradient(90deg, #000 46%, transparent 54%); -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: var(--sweep-from, 100%) 0; mask-position: var(--sweep-from, 100%) 0; }
  to { -webkit-mask-image: linear-gradient(90deg, #000 46%, transparent 54%); mask-image: linear-gradient(90deg, #000 46%, transparent 54%); -webkit-mask-size: 250% 100%; mask-size: 250% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: var(--sweep-to, 0%) 0; mask-position: var(--sweep-to, 0%) 0; }
}
@keyframes live-scan { from { opacity: 1; transform: translateX(var(--scan-from, -10%)); } 85% { opacity: 1; } to { opacity: 0; transform: translateX(var(--scan-to, 110%)); } }
@media (prefers-reduced-motion: reduce) {
  [data-live-stage] img, [data-live-demo] img { animation: none !important; transition: none !important; }
}

/* A preset cover shown whole (cover-framing.ts) sits over a blurred copy of itself, drawn only when the frame isn't
   the cover's own 4:3 shape: in a 4:3 frame the picture covers it, so it is neither fetched nor painted. */
.cover-whole { container-type: size; }
@container (aspect-ratio < 33/25) or (aspect-ratio > 27/20) {
  .cover-whole-backdrop { background-image: var(--cover-bg); }
}

/* Menus and popovers open and close without their fade, zoom and slide when the system asks for less motion. */
@media (prefers-reduced-motion: reduce) {
  [data-slot="dropdown-menu-content"], [data-slot="dropdown-menu-sub-content"], [data-slot="popover-content"] { animation: none !important; }
}

/*
 * Kinetic's sliders: a themed track with the value filled in the brand colour (--fill, set by the slider) and a 20 px
 * thumb, the same in light and dark (the native track is light grey on white in every theme).
 */
.k-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  --fill: 0%;
  --track: color-mix(in oklab, var(--foreground) 14%, transparent);
}
.k-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 9999px;
  background: linear-gradient(to right, var(--primary) var(--fill), var(--track) var(--fill));
}
.k-range[dir="rtl"]::-webkit-slider-runnable-track {
  background: linear-gradient(to left, var(--primary) var(--fill), var(--track) var(--fill));
}
.k-range::-moz-range-track {
  height: 6px;
  border-radius: 9999px;
  background: var(--track);
}
.k-range::-moz-range-progress {
  height: 6px;
  border-radius: 9999px;
  background: var(--primary);
}
.k-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 9999px;
  background: var(--background);
  border: 2px solid var(--primary);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}
.k-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: var(--background);
  border: 2px solid var(--primary);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
}
.k-range:focus-visible {
  outline: none;
}
.k-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ring) 45%, transparent);
}
.k-range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ring) 45%, transparent);
}
.k-range:disabled {
  cursor: default;
}