/* ==========================================================================
   Amuse — website styles
   Structure: fonts · tokens · base · layout · components (top → bottom of page)
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  src: url('../fonts/geist-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geist-mono-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;

  /* Brand (sampled from the Amuse logo) */
  --brand-300: #7bbbea;
  --brand-400: #3a92d4;
  --brand-500: #0d72ba;
  --brand-600: #0a5f9c;
  --green-400: #94cb88;
  --green-500: #74b768;
  --green-600: #4f9443;

  /* Light theme */
  --bg: #ffffff;
  --bg-2: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f0f3f7;
  --line: #e5e9f0;
  --line-2: #d4dbe5;
  --text: #0a1220;
  --text-2: #344054;
  --muted: #5f6b80;
  --faint: #8a94a6;
  --accent: var(--brand-500);
  --accent-text: #0b65a6;
  --accent-soft: #eaf3fb;
  --green: var(--green-500);
  --green-text: #3c7c31;
  --green-soft: #edf6ea;
  --violet-text: #6d4fd1;
  --violet-soft: #f1edfd;
  --amber-text: #a3600b;
  --amber-soft: #fdf3e2;
  --grad-a: #0b65a6;
  --grad-b: #1a8ad0;
  --grad-c: #4f9443;
  --glow-a: rgba(13, 114, 186, 0.14);
  --glow-b: rgba(116, 183, 104, 0.14);
  --grid-line: rgba(10, 18, 32, 0.05);
  --shot-glow: 0.5;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 1px rgba(16, 24, 40, 0.03);
  --shadow-2: 0 6px 16px -4px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-3: 0 28px 70px -24px rgba(16, 24, 40, 0.32), 0 10px 24px -10px rgba(16, 24, 40, 0.16);
  --logo-light: block;
  --logo-dark: none;
  --show-moon: inline-block;
  --show-sun: none;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --header-h: 64px;
  --gutter: 24px;
  color-scheme: light;
  interpolate-size: allow-keywords;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #070a10;
    --bg-2: #0a0e16;
    --surface: #0e131c;
    --surface-2: #111823;
    --surface-3: #161e2a;
    --line: #1c2533;
    --line-2: #2a3546;
    --text: #edf2f8;
    --text-2: #c5cedb;
    --muted: #8e9aae;
    --faint: #687488;
    --accent: #3b9be0;
    --accent-text: #6cb6ec;
    --accent-soft: rgba(59, 155, 224, 0.12);
    --green: #86c97a;
    --green-text: #93d487;
    --green-soft: rgba(134, 201, 122, 0.12);
    --violet-text: #b7a3ff;
    --violet-soft: rgba(167, 139, 250, 0.12);
    --amber-text: #f2b65c;
    --amber-soft: rgba(242, 182, 92, 0.12);
    --grad-a: #5aaeea;
    --grad-b: #7cc4f2;
    --grad-c: #94d686;
    --glow-a: rgba(13, 114, 186, 0.28);
    --glow-b: rgba(116, 183, 104, 0.18);
    --grid-line: rgba(255, 255, 255, 0.045);
    --shot-glow: 0.7;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 8px 20px -6px rgba(0, 0, 0, 0.55);
    --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, 0.75), 0 10px 24px -10px rgba(0, 0, 0, 0.5);
    --logo-light: none;
    --logo-dark: block;
    --show-moon: none;
    --show-sun: inline-block;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #070a10;
  --bg-2: #0a0e16;
  --surface: #0e131c;
  --surface-2: #111823;
  --surface-3: #161e2a;
  --line: #1c2533;
  --line-2: #2a3546;
  --text: #edf2f8;
  --text-2: #c5cedb;
  --muted: #8e9aae;
  --faint: #687488;
  --accent: #3b9be0;
  --accent-text: #6cb6ec;
  --accent-soft: rgba(59, 155, 224, 0.12);
  --green: #86c97a;
  --green-text: #93d487;
  --green-soft: rgba(134, 201, 122, 0.12);
  --violet-text: #b7a3ff;
  --violet-soft: rgba(167, 139, 250, 0.12);
  --amber-text: #f2b65c;
  --amber-soft: rgba(242, 182, 92, 0.12);
  --grad-a: #5aaeea;
  --grad-b: #7cc4f2;
  --grad-c: #94d686;
  --glow-a: rgba(13, 114, 186, 0.28);
  --glow-b: rgba(116, 183, 104, 0.18);
  --grid-line: rgba(255, 255, 255, 0.045);
  --shot-glow: 0.7;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 8px 20px -6px rgba(0, 0, 0, 0.55);
  --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, 0.75), 0 10px 24px -10px rgba(0, 0, 0, 0.5);
  --logo-light: none;
  --logo-dark: block;
  --show-moon: none;
  --show-sun: inline-block;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
strong { font-weight: 600; }
::selection { background: color-mix(in srgb, var(--accent) 24%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.i {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 14px;
  transform: translateY(-160%); transition: transform 0.2s;
}
.skip-link:focus { transform: none; }

.text-link { color: var(--accent-text); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link .i { width: 14px; height: 14px; }
.mono { font-family: var(--mono); }

/* ---------- Typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-text);
}
.eyebrow::before {
  content: ''; width: 7px; height: 7px; border-radius: 2px;
  background: linear-gradient(135deg, var(--brand-500), var(--green-500));
}
.h2 {
  font-size: clamp(2rem, 1.25rem + 2.6vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 620;
  text-wrap: balance;
}
.lead {
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}
.text-gradient {
  background: linear-gradient(95deg, var(--grad-a) 8%, var(--grad-b) 50%, var(--grad-c) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 18px; border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 560; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s, border-color 0.15s, box-shadow 0.2s, color 0.15s;
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; gap: 8px; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-lg { --h: 52px; padding: 0 24px; font-size: 16px; border-radius: 14px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #1a82cd 0%, #0d72ba 100%);
  border-color: #0b66a7;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(13, 114, 186, 0.3), 0 8px 22px -8px rgba(13, 114, 186, 0.6);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #2289d3 0%, #0b69ad 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 1px 2px rgba(13, 114, 186, 0.3), 0 12px 30px -10px rgba(13, 114, 186, 0.75);
}
.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-2);
  box-shadow: var(--shadow-1);
}
.btn-secondary:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--text) 24%, transparent); }
.btn-count {
  margin-right: -8px; padding: 2px 8px; border-radius: 7px;
  background: var(--surface-3); color: var(--text-2);
  font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums;
}
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px;
  color: var(--text-2); transition: background-color 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .i { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s, backdrop-filter 0.25s;
}
.site-header.is-scrolled,
.site-header.menu-open {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom-color: var(--line);
}
.site-header.menu-open { background: var(--bg); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; flex: none; border-radius: 8px; }
.logo { height: 30px; width: auto; }
.logo-light { display: var(--logo-light); }
.logo-dark { display: var(--logo-dark); }
.nav { margin-inline: auto; }
.nav-links { display: flex; gap: 2px; }
.nav-links a {
  display: block; padding: 7px 12px; border-radius: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--text-2);
  transition: color 0.15s, background-color 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-3); }
.nav-links a.is-active { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav + .header-actions { margin-left: 0; }
.theme-toggle .i-moon { display: var(--show-moon); }
.theme-toggle .i-sun { display: var(--show-sun); }
.gh-link {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 5px 0 11px;
  border-radius: 10px; border: 1px solid var(--line); color: var(--text-2);
  font-size: 14px; font-weight: 500; transition: border-color 0.15s, color 0.15s;
}
.gh-link:hover { border-color: var(--line-2); color: var(--text); }
.gh-link > .i { width: 17px; height: 17px; }
.gh-stars {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 7px;
  background: var(--surface-3); font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.gh-stars .i { width: 12px; height: 12px; color: #e3a008; fill: #e3a008; stroke-width: 1.5; }
.menu-toggle { display: none; }
.menu-toggle .i-x { display: none; }
.menu-toggle[aria-expanded='true'] .i-x { display: inline-block; }
.menu-toggle[aria-expanded='true'] .i-menu { display: none; }

.mobile-menu {
  position: absolute; inset: var(--header-h) 0 auto; height: calc(100dvh - var(--header-h));
  background: var(--bg); border-top: 1px solid var(--line); overflow-y: auto;
  animation: menuIn 0.25s ease;
}
.mobile-menu nav { display: grid; padding-top: 12px; padding-bottom: 32px; }
.mobile-menu nav > a {
  padding: 14px 4px; font-size: 20px; font-weight: 560; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-actions { display: grid; gap: 10px; margin-top: 24px; }
.mobile-menu-actions .btn { --h: 50px; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(48px, 7vw, 88px));
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 75% 50% at 50% 0%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 50% at 50% 0%, #000 30%, transparent 80%);
}
.hero-bg::after {
  content: ''; position: absolute; left: -10%; right: -10%; top: -120px; height: 1000px;
  background:
    radial-gradient(38% 45% at 24% 22%, var(--glow-a), transparent 72%),
    radial-gradient(34% 42% at 78% 16%, var(--glow-b), transparent 72%);
}
.hero-copy { display: grid; justify-items: center; text-align: center; gap: 22px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-1); font-size: 13.5px; font-weight: 500; color: var(--text-2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-pill:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.pill-tag {
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--green-text); background: var(--green-soft);
}
.hero-pill .i { width: 14px; height: 14px; color: var(--faint); transition: transform 0.2s; }
.hero-pill:hover .i { transform: translateX(2px); }
.hero-title {
  font-size: clamp(2.6rem, 1.3rem + 5.4vw, 5.1rem);
  line-height: 1.02; letter-spacing: -0.048em; font-weight: 650;
  text-wrap: balance;
}
.hero-sub { max-width: 650px; font-size: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem); color: var(--muted); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px;
  font-size: 13.5px; color: var(--faint);
}
.hero-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.hero-meta .platform-note { flex-basis: 100%; color: var(--amber-text); }

.hero-shot-wrap { margin-top: clamp(48px, 7vw, 80px); max-width: 1248px; }
.hero-shot { position: relative; }
.shot-glow {
  position: absolute; inset: 6% 4% -6%; z-index: -1; filter: blur(70px); opacity: var(--shot-glow);
  background:
    radial-gradient(48% 60% at 28% 40%, rgba(13, 114, 186, 0.55), transparent 70%),
    radial-gradient(44% 56% at 76% 60%, rgba(116, 183, 104, 0.45), transparent 70%);
}

/* ---------- Hero screenshots (real app captures) ---------- */
.shots { display: grid; justify-items: center; }
.shots .shot-tabs {
  margin-bottom: 22px;
  background: color-mix(in srgb, var(--surface-3) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.shot-tabs .mode-tab { height: 36px; padding: 0 15px; font-size: 14px; }
.shot-tabs .mode-tab .i { width: 16px; height: 16px; }
.shot-frame { position: relative; width: 100%; }
.shot {
  position: relative; margin: 0; overflow: hidden; border-radius: 12px; background: #232323;
  box-shadow: 0 0 0 1px rgba(10, 18, 32, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.05) inset, var(--shadow-3);
}
.shot > img { width: 100%; height: auto; }
.shot.is-entering { animation: shotIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes shotIn { from { opacity: 0; transform: scale(0.994); } }

/* Generation reveal over the image canvas inside the Image screenshot (700×700 at 865,50 of 1916×1030). */
.shot-reveal {
  position: absolute; left: 45.146%; top: 4.854%; width: 36.534%; height: 67.961%;
  overflow: hidden; pointer-events: none; background: #1d1d22;
}
.shot-reveal img, .shot-reveal canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot-reveal canvas { opacity: 0; filter: blur(6px) saturate(0.8) brightness(0.8); transform: scale(1.12); }
.js .shot-reveal img { filter: blur(18px) saturate(0.6); transform: scale(1.2); }
.js .shot-reveal canvas { opacity: 1; }
.shot-reveal.is-done { opacity: 0; transition: opacity 0.5s ease; }

/* ---------- Marquee ---------- */
.marquee { padding: clamp(56px, 7vw, 88px) 0 clamp(8px, 2vw, 24px); text-align: center; }
.marquee-label { margin-bottom: 22px; font-size: 13.5px; font-weight: 500; color: var(--faint); }
.marquee-track {
  display: flex; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.marquee-list { display: flex; flex: none; gap: 52px; padding-right: 52px; animation: marquee 70s linear infinite; }
.marquee-list li {
  font-size: clamp(1.1rem, 1rem + 0.45vw, 1.375rem); font-weight: 600; letter-spacing: -0.025em;
  white-space: nowrap; color: var(--muted); opacity: 0.8;
}
.marquee:hover .marquee-list { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(84px, 10vw, 136px); }
.section-soft { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head {
  display: grid; justify-items: center; gap: 16px; max-width: 760px;
  margin: 0 auto clamp(44px, 5vw, 64px); text-align: center;
}
.section-head .lead { max-width: 640px; }
.section-head-left { justify-items: start; text-align: left; margin-inline: 0; }

/* ---------- Studios (tabs) ---------- */
.modes { display: grid; justify-items: center; }
.mode-tabs {
  position: relative; display: inline-flex; gap: 4px; padding: 5px; margin-bottom: clamp(36px, 5vw, 56px);
  border-radius: 14px; background: var(--surface-3); border: 1px solid var(--line);
}
.mode-tab {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 10px;
  font-size: 14.5px; font-weight: 560; color: var(--muted); transition: color 0.2s;
}
.mode-tab:hover { color: var(--text-2); }
.mode-tab[aria-selected='true'] { color: var(--text); }
.mode-tab .i { width: 17px; height: 17px; }
.mode-tab-indicator {
  position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--line);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mode-panel {
  width: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(36px, 5vw, 72px); align-items: center;
}
.mode-panel:focus-visible { outline-offset: 8px; }
@media (min-width: 961px) { .mode-panel { min-height: 600px; } }
.mode-panel.is-entering .mode-copy { animation: fadeUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.mode-panel.is-entering .mode-visual { animation: fadeUp 0.6s 0.05s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } }
.mode-copy h3 { margin-bottom: 12px; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 620; letter-spacing: -0.03em; }
.mode-copy > p { font-size: 1.0625rem; color: var(--muted); }
.flow-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.flow-list li {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; font-weight: 500; color: var(--text-2); box-shadow: var(--shadow-1);
}
.mode-stat { font-size: 14.5px; color: var(--muted); }
.mode-stat strong { color: var(--text); }

/* Real output shown in the Image studio panel */
.output-card {
  position: relative; justify-self: center; width: 100%; max-width: 560px; margin: 0; overflow: hidden;
  border-radius: 20px; background: #111; box-shadow: 0 0 0 1px rgba(10, 18, 32, 0.08), var(--shadow-3);
}
.output-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.output-card figcaption {
  position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 8px; padding: 13px 15px;
  border-radius: 14px; color: #fff; background: rgba(8, 10, 16, 0.58); border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
}
.output-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--mono); font-size: 11.5px; color: #c9d2df; }
.output-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-family: var(--font); font-size: 12px; font-weight: 560; color: #b9eab0; background: rgba(124, 196, 111, 0.18);
}
.output-chip .i { width: 13px; height: 13px; }
.output-prompt { font-size: 13.5px; line-height: 1.5; color: #eef2f8; }

/* Mini app windows used in the studio panels */
.mini {
  --a-line: rgba(255, 255, 255, 0.07);
  --a-fill: rgba(255, 255, 255, 0.045);
  --a-muted: #8592a6;
  --a-faint: #5a6678;
  --a-accent: #3a9be0;
  --a-green: #7cc46f;
  border-radius: 18px; overflow: hidden; background: #0e1218; color: #e3e9f2; font-size: 13px;
  box-shadow: 0 0 0 1px rgba(10, 18, 32, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06) inset, var(--shadow-3);
  user-select: none;
}
.mini .i { width: 15px; height: 15px; stroke-width: 1.75; }
.mini-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 46px; padding: 0 16px;
  background: #0a0d12; border-bottom: 1px solid var(--a-line);
}
.mini-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 560; }
.mini-title .i { color: var(--a-accent); }
.mini-chip {
  padding: 3px 9px; border-radius: 6px; background: var(--a-fill); border: 1px solid var(--a-line);
  font-family: var(--mono); font-size: 11px; color: #aab5c5; white-space: nowrap;
}
.img-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 10px; padding: 14px; }
.img-grid figure { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; }
.img-grid figure:first-child { grid-row: span 3; aspect-ratio: auto; }
.img-grid figure:not(:first-child) figcaption { display: none; }
.img-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.img-grid figure:hover img { transform: scale(1.05); }
.img-grid figcaption {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px;
  background: rgba(8, 10, 14, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 11px; color: #e8edf5;
}
.mini-foot { display: flex; align-items: center; gap: 12px; padding: 0 16px 16px; font-size: 12px; color: var(--a-muted); }
.mini-file { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; }
.mini-progress { flex: 1; height: 4px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.mini-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--a-accent), var(--a-green)); }
.mini-done { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; white-space: nowrap; color: var(--a-green); }
.mini-foot { flex-wrap: wrap; row-gap: 6px; }

.player { padding: 14px 14px 0; }
.player-frame { position: relative; aspect-ratio: 9 / 5; border-radius: 10px; overflow: hidden; background: #000; }
.player-frame video { width: 100%; height: 100%; object-fit: cover; }
.player-controls { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-family: var(--mono); font-size: 11px; color: #aab5c5; }
.player-btn {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; color: #cfd8e3;
  transition: background-color 0.15s, color 0.15s;
}
.player-btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.player-btn .i { width: 15px; height: 15px; }
.player .i-pause, .player .i-sound { display: none; }
.player.is-playing .i-play { display: none; }
.player.is-playing .i-pause { display: inline-block; }
.player-btn[aria-pressed='true'] .i-muted { display: none; }
.player-btn[aria-pressed='true'] .i-sound { display: inline-block; }
.player-time { min-width: 86px; font-variant-numeric: tabular-nums; }
.player-scrub {
  position: relative; flex: 1; height: 14px; cursor: pointer;
  background: linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)) center / 100% 3px no-repeat;
}
.player-scrub span { position: absolute; left: 0; top: 50%; height: 3px; width: 0; margin-top: -1.5px; border-radius: 2px; background: #fff; }
.tl { position: relative; display: grid; gap: 6px; margin: 2px 14px 14px; padding-top: 10px; border-top: 1px solid var(--a-line); }
.tl-track { display: grid; grid-template-columns: 24px 1fr; align-items: center; gap: 8px; }
.tl-tag { font-family: var(--mono); font-size: 10.5px; color: var(--a-faint); }
.tl-lane { position: relative; display: flex; gap: 3px; height: 28px; border-radius: 6px; background: rgba(255, 255, 255, 0.03); overflow: hidden; }
.tl-clip { flex: none; width: var(--w); height: 100%; border-radius: 5px; }
.tl-clip-img { background-size: auto 100%; background-repeat: repeat-x; box-shadow: inset 0 0 0 1.5px rgba(58, 155, 224, 0.75); }
.tl-clip-text {
  margin-left: var(--x); display: flex; align-items: center; padding: 0 8px; font-size: 11px; color: #bfe8b6;
  background: rgba(124, 196, 111, 0.16); box-shadow: inset 0 0 0 1px rgba(124, 196, 111, 0.5);
}
.tl-lane .wave { flex: 1; height: 100%; padding: 0 4px; }
.tl-rail { position: absolute; top: 6px; bottom: 0; left: 32px; right: 0; pointer-events: none; }
.tl-playhead, .ve-playhead {
  position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; border-radius: 1px;
  background: #f87171; box-shadow: 0 0 10px rgba(248, 113, 113, 0.7); animation: playhead 10s linear infinite;
}
@keyframes playhead { to { left: 100%; } }
.tl-playhead[data-video-playhead] { animation: none; } /* follows the real video's time (main.js) */

.wave { display: flex; align-items: center; gap: 2px; height: 56px; }
.wave span { flex: 1; min-width: 1.5px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); }
.wave span.on { background: #4fa8e8; }
.wave-tl span { background: rgba(167, 139, 250, 0.55); }
.track { padding: 18px 16px 4px; }
.track-head { display: flex; align-items: center; gap: 14px; }
.track-play {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: #fff; color: #0e1218; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.6); transition: transform 0.15s;
}
.track-play:hover { transform: scale(1.05); }
.track-play .i { width: 16px; height: 16px; fill: currentColor; }
.track-play .i-play { margin-left: 2px; }
.track .i-pause { display: none; }
.track.is-playing .i-play { display: none; }
.track.is-playing .i-pause { display: inline-block; }
.track-meta { min-width: 0; }
.track-title { font-size: 15px; font-weight: 600; }
.song-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.song-tags span { padding: 2px 8px; border-radius: 999px; background: var(--a-fill); border: 1px solid var(--a-line); font-size: 11px; color: #aab5c5; }
.track-wave { margin-top: 16px; cursor: pointer; }
.track-wave .wave { height: 60px; }
.song-times { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--a-faint); font-variant-numeric: tabular-nums; }
.prompt-box {
  margin: 12px 16px 14px; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.6; color: #c3ccd9;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--a-line);
}
.prompt-label { display: block; margin-bottom: 4px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--a-green); }

.chat { display: grid; gap: 16px; padding: 18px 16px; }
.msg-user { justify-self: end; display: grid; justify-items: end; gap: 8px; max-width: 80%; }
.msg-user p { padding: 9px 13px; border-radius: 14px 14px 4px 14px; background: #135f9a; color: #fff; font-size: 13px; }
.msg-ai { max-width: 96%; font-size: 13px; line-height: 1.6; color: #d3dbe6; }
.thinking { margin-bottom: 12px; }
.thinking summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; cursor: pointer; list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.1); font-size: 11.5px; color: #9aa6b8; transition: color 0.15s, border-color 0.15s;
}
.thinking summary::-webkit-details-marker { display: none; }
.thinking summary:hover { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.thinking summary .i { width: 13px; height: 13px; }
.thinking p { margin-top: 8px; padding: 2px 0 2px 12px; border-left: 2px solid rgba(255, 255, 255, 0.12); font-size: 12px; font-style: italic; color: #9aa6b8; }
.msg-ai ol { display: grid; gap: 6px; margin-top: 8px; padding-left: 20px; list-style: decimal; }
.msg-ai ol li::marker { color: var(--a-accent); font-weight: 600; }
.msg-ai strong { color: #fff; font-weight: 560; }
.typing { display: inline-flex; gap: 4px; margin-top: 10px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #7d8899; animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-input {
  display: flex; align-items: center; height: 44px; margin: 0 16px 16px; padding: 0 6px 0 14px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(255, 255, 255, 0.03); color: var(--a-faint);
}
.chat-icons { display: flex; align-items: center; gap: 12px; margin-left: auto; color: var(--a-muted); }
.chat-send { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #0d72ba; color: #fff; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-1); transition: border-color 0.2s, box-shadow 0.25s;
}
.card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.card-visual { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 200px; padding: 22px 22px 0; }
.card-body { padding: 20px 24px 24px; }
.card-body h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.015em; }
.card-body h3 .i { width: 18px; height: 18px; color: var(--accent); }
.card-body p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.card-editor { grid-column: span 2; }
.card-upscale { grid-row: span 2; }
.card-extract { grid-column: span 2; }

.card-editor .card-visual {
  align-items: flex-end; padding: 28px 28px 0;
  background: radial-gradient(70% 90% at 50% 100%, var(--accent-soft), transparent 70%);
}
.ve {
  position: relative; width: 100%; padding: 12px 14px 16px; color: #aab5c5;
  border-radius: 14px 14px 0 0; background: #0e1218;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 -10px 40px -16px rgba(10, 18, 32, 0.45);
}
.ve .i { width: 13px; height: 13px; stroke-width: 1.75; }
.ve-ruler { display: flex; justify-content: space-between; padding-left: 36px; margin-bottom: 4px; font-family: var(--mono); font-size: 10px; color: #5a6678; }
.ve-track { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; margin-top: 6px; }
.ve-tag { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; background: rgba(255, 255, 255, 0.05); }
.ve-lane { position: relative; height: 30px; border-radius: 6px; background: rgba(255, 255, 255, 0.025); }
.ve-clip {
  position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--w); display: flex; align-items: center;
  padding: 0 10px; border-radius: 6px; font-size: 11px; white-space: nowrap; overflow: hidden;
}
.ve-media { background-size: auto 100%; background-repeat: repeat-x; box-shadow: inset 0 0 0 1.5px rgba(58, 155, 224, 0.75); }
.ve-overlay { color: #d6c9ff; background: rgba(167, 139, 250, 0.15); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.45); }
.wave-ve { height: 100%; padding: 0 6px; }
.wave-ve span { background: rgba(58, 155, 224, 0.5); }
.ve-rail { position: absolute; top: 26px; bottom: 12px; left: 50px; right: 14px; pointer-events: none; }
.ve-playhead { animation-duration: 12s; }
.ve-playhead::before {
  content: ''; position: absolute; top: -6px; left: -4px; width: 10px; height: 8px; background: #f87171;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.card-upscale .card-visual { align-items: stretch; padding: 22px 22px 0; }
.compare {
  position: relative; width: 100%; min-height: 320px; border-radius: 14px; overflow: hidden; background: #111;
  cursor: ew-resize; touch-action: pan-y; -webkit-user-select: none; user-select: none;
}
.compare > img, .compare > canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-zoom {
  position: absolute; z-index: 2; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 7px; font-size: 11px; color: #e8edf5; pointer-events: none;
  background: rgba(8, 10, 14, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.compare-zoom .i { width: 12px; height: 12px; }
.compare::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px;
  background: #fff; box-shadow: 0 0 14px rgba(0, 0, 0, 0.45);
}
.compare-handle {
  position: absolute; z-index: 2; top: 50%; left: var(--pos); width: 40px; height: 40px;
  display: grid; place-items: center; border-radius: 50%; transform: translate(-50%, -50%);
  background: #fff; color: #0a1220; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none; transition: box-shadow 0.2s, transform 0.15s;
}
.compare.is-dragging .compare-handle { transform: translate(-50%, -50%) scale(1.1); }
.compare-handle .i { width: 18px; height: 18px; }
.compare-label {
  position: absolute; z-index: 2; top: 12px; padding: 4px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 500;
  color: #fff; background: rgba(8, 10, 14, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  pointer-events: none;
}
.compare-label-l { left: 12px; }
.compare-label-r { right: 12px; }
/* Keyboard / screen-reader control for the slider; pointer dragging is handled on .compare in main.js. */
.compare-range {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0;
}
.card-visual:has(.compare-range:focus-visible) .compare-handle { box-shadow: 0 0 0 4px var(--accent), 0 6px 18px rgba(0, 0, 0, 0.35); }

.frames { width: 100%; display: grid; gap: 16px; }
.frames-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; height: 112px; }
.fr { position: relative; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.fr-gen { background: transparent; border-style: dashed; }
.fr::after {
  content: ''; position: absolute; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%;
  bottom: calc(10% + sin(var(--p) * 22.5deg) * 64%);
  background: var(--accent);
}
.fr-gen::after { background: var(--green); }
.js .card-interp .fr-gen { opacity: 0; transform: scale(0.85); }
.js .card-interp.is-in .fr-gen { animation: frameIn 0.5s calc(0.35s + var(--p) * 0.09s) cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes frameIn { to { opacity: 1; transform: none; } }
.frames-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); }
.frames-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 9px; height: 9px; border-radius: 50%; }
.lg-key { background: var(--accent); }
.lg-gen { background: var(--green); }

/* Real inpaint: original → mask over the yellow jellyfish → inpainted result, on a loop. */
.inpaint { position: relative; width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #111; }
.inpaint img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.inpaint-before { animation: inpaintSwap 9s ease-in-out infinite; }
@keyframes inpaintSwap { 0%, 46% { opacity: 1; } 56%, 92% { opacity: 0; } 100% { opacity: 1; } }
.mask {
  position: absolute; left: 9%; top: 3%; width: 22%; height: 48%; border-radius: 48% 48% 34% 34%;
  background: rgba(58, 155, 224, 0.32); outline: 1.5px dashed rgba(255, 255, 255, 0.95);
  opacity: 0; animation: maskShow 9s ease-in-out infinite;
}
@keyframes maskShow { 0%, 16% { opacity: 0; } 26%, 46% { opacity: 1; } 56%, 100% { opacity: 0; } }
.inpaint-state { position: absolute; top: 10px; right: 10px; display: grid; }
.inpaint-state span {
  grid-area: 1 / 1; justify-self: end; padding: 4px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 500; color: #fff;
  background: rgba(8, 10, 14, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.inpaint-state .st-after { color: #b9eab0; opacity: 0; animation: stAfter 9s ease-in-out infinite; }
.inpaint-state .st-before { animation: stBefore 9s ease-in-out infinite; }
@keyframes stBefore { 0%, 48% { opacity: 1; } 54%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes stAfter { 0%, 48% { opacity: 0; } 54%, 94% { opacity: 1; } 100% { opacity: 0; } }
.inpaint-prompt {
  position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px;
  padding: 8px 11px; border-radius: 10px; font-size: 12px; color: #fff;
  background: rgba(8, 10, 14, 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.inpaint-prompt .i { width: 14px; height: 14px; color: #7cc46f; }

.extract { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.extract figure { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.extract img { width: 100%; height: 100%; object-fit: cover; }
.extract figcaption {
  position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500;
  color: #fff; background: rgba(8, 10, 14, 0.58); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.chip-cloud { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 8px; }
.chip-cloud span {
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.chip-cloud .hl { border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); color: var(--accent-text); }
.chip-cloud .hl-g { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-soft); color: var(--green-text); }
.chip-cloud .cn { border-style: dashed; font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: transparent; }

.voice { width: 100%; display: grid; justify-items: center; gap: 20px; }
.wave-voice { width: 100%; height: 76px; gap: 3px; }
.wave-voice span {
  background: linear-gradient(180deg, var(--brand-400), var(--green-500));
  transform-origin: center; animation: speak 1.3s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1s);
}
@keyframes speak { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.langs span { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; color: var(--text-2); }
.langs .more { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }

.tools { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tools li {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line);
}
.tools .i { width: 16px; height: 16px; color: var(--accent); }

.gallery { width: 100%; }
.gallery-filters { display: flex; gap: 4px; margin-bottom: 10px; }
.gallery-filters span { padding: 4px 10px; border-radius: 8px; font-size: 12px; color: var(--muted); }
.gallery-filters .on { background: var(--surface-3); color: var(--text); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-grid > * { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; object-fit: cover; }
.g-video { position: relative; }
.g-video img { width: 100%; height: 100%; object-fit: cover; }
.g-video .i {
  position: absolute; left: 6px; bottom: 6px; width: 20px; height: 20px; padding: 5px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; fill: #fff;
}
.gallery-grid > .g-feature { grid-row: span 2; aspect-ratio: auto; height: 100%; }
.g-audio, .g-text { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #18436a, #2b6a4a); }
.g-text { background: linear-gradient(135deg, #2c2f6e, #5b2f6f); }
.g-audio .i, .g-text .i { width: 22px; height: 22px; }

.details {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 36px;
  margin-top: clamp(48px, 6vw, 72px); padding-top: clamp(40px, 5vw, 56px); border-top: 1px solid var(--line);
}
.details li { display: flex; gap: 14px; }
.details .i { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.details h3 { margin-bottom: 4px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.details p { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* ---------- Privacy ---------- */
.privacy { overflow: hidden; isolation: isolate; color: #e8edf5; background: #070b12; }
:root[data-theme='dark'] .privacy { background: #0a0f18; border-block: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .privacy { background: #0a0f18; border-block: 1px solid var(--line); } }
.privacy-bg { position: absolute; inset: 0; z-index: -1; }
.privacy-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(45% 60% at 88% 30%, rgba(13, 114, 186, 0.32), transparent 70%),
    radial-gradient(40% 55% at 8% 95%, rgba(116, 183, 104, 0.2), transparent 70%);
}
.privacy-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 80% at 80% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 80% at 80% 40%, #000, transparent 75%);
}
.privacy-inner { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(40px, 6vw, 80px); align-items: center; }
.privacy-copy { display: grid; justify-items: start; gap: 16px; }
.eyebrow-on-dark { color: #6fb6ec; }
.privacy .lead { color: #9aa6b8; max-width: 560px; }
.privacy-points { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; margin-top: 24px; }
.privacy-points li { display: flex; gap: 14px; }
.privacy-points .i { width: 20px; height: 20px; margin-top: 2px; color: #86c97a; }
.privacy-points h3 { margin-bottom: 3px; font-size: 15px; font-weight: 600; color: #fff; }
.privacy-points p { font-size: 14px; line-height: 1.5; color: #8d99ab; }
.log {
  overflow: hidden; border-radius: 18px; font-family: var(--mono); font-size: 13px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.log-bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 12px; color: #7d8899; }
.log-dots { display: flex; gap: 6px; }
.log-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.log-lines { display: grid; gap: 12px; padding: 18px 18px 20px; }
.log-lines li { display: grid; grid-template-columns: 16px 128px minmax(0, 1fr); gap: 10px; align-items: baseline; color: #c3ccd9; }
.log-lines .ok { color: #86c97a; }
.log-lines .k { color: #8d99ab; }
.log-lines .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e3e9f2; }
.log-lines .log-hl { margin-top: 6px; padding: 11px 12px; border-radius: 11px; background: rgba(134, 201, 122, 0.1); border: 1px solid rgba(134, 201, 122, 0.3); }
.log-lines .log-hl .v { color: #a6e39a; font-weight: 600; }
.js .privacy-visual .log-lines li { opacity: 0; transform: translateY(6px); }
.js .privacy-visual.is-in .log-lines li { animation: logIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.js .privacy-visual.is-in .log-lines li:nth-child(1) { animation-delay: 0.25s; }
.js .privacy-visual.is-in .log-lines li:nth-child(2) { animation-delay: 0.55s; }
.js .privacy-visual.is-in .log-lines li:nth-child(3) { animation-delay: 0.85s; }
.js .privacy-visual.is-in .log-lines li:nth-child(4) { animation-delay: 1.15s; }
.js .privacy-visual.is-in .log-lines li:nth-child(5) { animation-delay: 1.65s; }
@keyframes logIn { to { opacity: 1; transform: none; } }

/* ---------- Models ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.stats > div { display: flex; flex-direction: column-reverse; gap: 6px; padding: 26px 28px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats dt { font-size: 14px; color: var(--muted); }
.stats dd {
  font-size: clamp(2.25rem, 1.7rem + 1.8vw, 3.25rem); line-height: 1; font-weight: 600; letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.stats > div:nth-child(1) dd { color: var(--accent-text); }
.stats-sub { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: 22px 0 clamp(48px, 6vw, 64px); font-size: 14px; color: var(--muted); }
.stats-sub strong { color: var(--text); }
.catalog-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.filter { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 13px; background: var(--surface-3); border: 1px solid var(--line); }
.filter button {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px;
  font-size: 14px; font-weight: 560; color: var(--muted); transition: color 0.15s, background-color 0.15s;
}
.filter button:hover { color: var(--text); }
.filter button span { font-size: 12px; font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.filter button[aria-checked='true'] { color: var(--text); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--line); }
.search { position: relative; display: flex; align-items: center; width: min(100%, 280px); }
.search .i { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 14px 0 38px; border-radius: 12px; outline: none;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.mcard {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  animation: cardIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.mcard:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-2); }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.mcard-top { display: flex; align-items: center; gap: 8px; }
.mtag { padding: 2px 7px; border-radius: 6px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; }
.mtag-image { color: var(--accent-text); background: var(--accent-soft); }
.mtag-video { color: var(--violet-text); background: var(--violet-soft); }
.mtag-audio { color: var(--amber-text); background: var(--amber-soft); }
.mtag-text { color: var(--green-text); background: var(--green-soft); }
.badge-new {
  margin-left: auto; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #fff;
  background: linear-gradient(90deg, var(--brand-500), var(--green-500));
}
.mcard h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.mcard .variants { margin-top: -4px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.caps { display: flex; flex-wrap: wrap; gap: 5px; }
.caps li { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; color: var(--text-2); background: var(--surface-3); }
.mcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px;
  border-top: 1px dashed var(--line); font-family: var(--mono); font-size: 11px; color: var(--faint);
}
.mcard-foot a { display: inline-flex; align-items: center; gap: 3px; padding: 2px 4px; border-radius: 6px; color: var(--muted); }
.mcard-foot a:hover { color: var(--accent-text); }
.mcard-foot .i { width: 13px; height: 13px; }
.model-empty { display: grid; justify-items: center; gap: 14px; padding: 40px 0; text-align: center; color: var(--muted); }
.catalog-more { display: flex; justify-content: center; margin-top: 28px; }
.footnote { margin-top: 28px; font-size: 13px; text-align: center; color: var(--faint); }

/* ---------- Hardware ---------- */
.hw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hw-card {
  position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.hw-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 120px; opacity: 0.09;
  background: radial-gradient(80% 100% at 0% 0%, var(--vendor), transparent 70%);
}
.hw-head { position: relative; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.hw-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--vendor); }
.hw-head h3 { font-size: 20px; font-weight: 620; letter-spacing: -0.025em; }
.hw-backends { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hw-backends li {
  padding: 4px 10px; border-radius: 8px; font-family: var(--mono); font-size: 12px; color: var(--text);
  background: var(--surface-3); border: 1px solid var(--line);
}
.hw-card > p { font-size: 14.5px; color: var(--muted); }
.hw-card > p.hw-note { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 13px; color: var(--faint); }
.hw-note .i { width: 15px; height: 15px; }
.hw-lower { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 16px; margin-top: 16px; }
.engines, .quality { padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.sub-title { margin-bottom: 20px; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.engine-list { display: grid; gap: 20px; }
.engine-list li { display: flex; gap: 14px; }
.engine-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--accent-text); background: var(--accent-soft); }
.engine-icon .i { width: 18px; height: 18px; }
.engine-list h4 { margin-bottom: 2px; font-size: 15px; font-weight: 600; }
.engine-list p { font-size: 14px; line-height: 1.5; color: var(--muted); }
.q-table { overflow: hidden; border-radius: 14px; border: 1px solid var(--line); }
.q-row { display: grid; grid-template-columns: 1.25fr 0.85fr 1fr 1fr; align-items: center; gap: 14px; padding: 13px 16px; font-size: 14px; }
.q-row + .q-row { border-top: 1px solid var(--line); }
.q-head { background: var(--surface-2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--faint); }
.q-row .mono { font-size: 13px; color: var(--text-2); }
.meter { position: relative; display: block; height: 6px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.meter::after { content: ''; position: absolute; inset: 0 auto 0 0; width: calc(var(--n) / 3 * 100%); border-radius: 3px; background: var(--accent); }
.meter-g::after { background: var(--green); }
.q-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- Open source ---------- */
.oss-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 16px; }
.oss-card {
  display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
}
.oss-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.oss-card-head h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--line); font-size: 13px; color: var(--muted); transition: color 0.15s, border-color 0.15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--line-2); }
.copy-btn .i { width: 14px; height: 14px; }
.copy-btn.is-done { color: var(--green-text); border-color: color-mix(in srgb, var(--green) 45%, transparent); }
.code {
  overflow-x: auto; padding: 18px 20px; border-radius: 14px; font-family: var(--mono); font-size: 13px; line-height: 1.75;
  color: #e3e9f2; background: #0b1018; border: 1px solid rgba(255, 255, 255, 0.06); tab-size: 2;
}
.code .c { color: #6b7a90; }
.oss-note {
  display: flex; gap: 9px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
}
.oss-note .i { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.oss-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.oss-links a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; font-size: 14px; font-weight: 500;
  color: var(--text-2); border: 1px solid var(--line); transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.oss-links a:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-2); }
.oss-links .i { width: 16px; height: 16px; color: var(--muted); }
.oss-links a[href*='sponsors'] .i { color: #db2777; }
.timeline { position: relative; display: grid; gap: 24px; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; }
.timeline li::before {
  content: ''; position: absolute; left: -26px; top: 5px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-2);
}
.timeline li:first-child::before { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.timeline a { display: block; border-radius: 8px; }
.timeline a:hover h4 { color: var(--accent-text); }
.rel-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 12.5px; color: var(--faint); }
.rel-ver { padding: 1px 7px; border-radius: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--text-2); background: var(--surface-3); }
.timeline h4 { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; transition: color 0.15s; }
.timeline p { margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.repo-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: auto;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.repo-stats > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 14px 16px; }
.repo-stats > div + div { border-left: 1px solid var(--line); }
.repo-stats dt { font-size: 12.5px; color: var(--faint); }
.repo-stats dd { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.built-on { margin-top: clamp(40px, 5vw, 56px); text-align: center; }
.built-on p { margin-bottom: 14px; font-size: 13px; color: var(--faint); }
.built-on ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.built-on a {
  display: block; padding: 6px 13px; border-radius: 999px; font-size: 13.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); transition: border-color 0.15s, color 0.15s;
}
.built-on a:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.faq-wrap .section-head { position: sticky; top: calc(var(--header-h) + 32px); margin-bottom: 0; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 2px;
  list-style: none; cursor: pointer; font-size: 16.5px; font-weight: 560; letter-spacing: -0.012em;
  transition: color 0.15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-text); }
.faq summary::after {
  content: ''; flex: none; width: 22px; height: 22px; border-radius: 50%; color: var(--muted);
  background:
    linear-gradient(currentColor, currentColor) center / 10px 1.6px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.6px 10px no-repeat,
    var(--surface-3);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), content-visibility 0.35s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }
.faq-a { max-width: 660px; padding: 0 2px 22px; font-size: 15px; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { padding-block: clamp(84px, 10vw, 136px); }
.cta-card {
  position: relative; isolation: isolate; overflow: hidden; display: grid; justify-items: center; gap: 18px;
  padding: clamp(52px, 7vw, 88px) 24px; border-radius: 28px; text-align: center; color: #fff;
  background: #070b12; border: 1px solid rgba(255, 255, 255, 0.06); box-shadow: var(--shadow-3);
}
.cta-glow { position: absolute; inset: 0; z-index: -1; }
.cta-glow::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(42% 75% at 18% 0%, rgba(13, 114, 186, 0.5), transparent 70%),
    radial-gradient(40% 70% at 84% 100%, rgba(116, 183, 104, 0.38), transparent 70%);
}
.cta-glow::after {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(60% 70% at 50% 30%, #000, transparent 75%);
  mask-image: radial-gradient(60% 70% at 50% 30%, #000, transparent 75%);
}
.cta-icon { width: 92px; height: 92px; margin-bottom: 4px; filter: drop-shadow(0 14px 32px rgba(13, 114, 186, 0.5)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.cta .lead { max-width: 520px; color: #9aa6b8; }
.cta .btn-secondary { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); box-shadow: none; }
.cta .btn-secondary:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(255, 255, 255, 0.28); }
.cta-meta { font-size: 13.5px; color: #7d8899; }
.cta-meta .text-link { color: #8cc8f2; }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 36px; border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; }
.footer-brand .logo { height: 28px; }
.footer-brand p { margin-top: 16px; font-size: 14px; color: var(--muted); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(130px, auto)); gap: 48px; }
.footer-cols h3 { margin-bottom: 14px; font-size: 13px; font-weight: 600; }
.footer-cols ul { display: grid; gap: 10px; }
.footer-cols a { font-size: 14px; color: var(--muted); transition: color 0.15s; }
.footer-cols a:hover { color: var(--text); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 56px; padding-top: 24px;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--faint);
}

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.hero-copy .reveal:nth-child(2) { transition-delay: 0.06s; }
.hero-copy .reveal:nth-child(3) { transition-delay: 0.12s; }
.hero-copy .reveal:nth-child(4) { transition-delay: 0.18s; }
.hero-copy .reveal:nth-child(5) { transition-delay: 0.24s; }
.shots.reveal { transition-delay: 0.3s; transition-duration: 1.1s; }
.bento .reveal:nth-child(3n + 2) { transition-delay: 0.07s; }
.bento .reveal:nth-child(3n + 3) { transition-delay: 0.14s; }
.hw-grid .reveal:nth-child(2) { transition-delay: 0.07s; }
.hw-grid .reveal:nth-child(3) { transition-delay: 0.14s; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hw-lower, .oss-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .mode-panel { grid-template-columns: minmax(0, 1fr); }
  .mode-copy { max-width: 620px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
  .card-upscale { grid-row: span 1; }
  .card-gallery { grid-column: span 2; }
  .card-gallery .gallery-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .card-gallery .gallery-grid > .g-feature { grid-row: auto; aspect-ratio: 1; }
  .card-upscale .compare { min-height: 280px; }
  .privacy-inner { grid-template-columns: minmax(0, 1fr); }
  .privacy-visual { max-width: 560px; }
  .hw-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .faq-wrap .section-head { position: static; }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .gh-label { display: none; }
  .shot { border-radius: 8px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(3) { border-left: 0; }
  .stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .catalog-bar { flex-direction: column; align-items: stretch; }
  .search { width: 100%; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .hide-xs { display: none; }
  .header-download { display: none; }
  .gh-link { padding: 0 9px; }
  .gh-link > .i { display: none; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .mode-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
  .mode-tab { justify-content: center; padding: 0 6px; gap: 6px; font-size: 13.5px; }
  .mode-tab .i { display: none; }
  .shot-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .shot-tabs .mode-tab { padding: 0 4px; font-size: 13px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .card-editor, .card-extract, .card-gallery { grid-column: span 1; }
  .card-gallery .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-gallery .gallery-grid > .g-feature { grid-row: span 2; aspect-ratio: auto; }
  .card-body { padding: 18px 20px 22px; }
  .card-visual { padding: 18px 18px 0; min-height: 0; }
  .card-editor .card-visual { padding: 20px 14px 0; }
  .ve-ruler span:nth-child(even) { visibility: hidden; }
  .ve-clip { font-size: 10px; padding: 0 6px; }
  .frames-row { height: 90px; gap: 4px; }
  .details, .privacy-points { grid-template-columns: minmax(0, 1fr); }
  .log-lines li { grid-template-columns: 16px 104px minmax(0, 1fr); font-size: 12px; }
  .tools { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tools li { font-size: 12.5px; padding: 9px 10px; gap: 8px; }
  .stats > div { padding: 20px; }
  .repo-stats { grid-template-columns: 1fr 1fr 1.35fr; }
  .repo-stats > div { padding: 12px; }
  .repo-stats dd { font-size: 16px; white-space: nowrap; }
  .stats dt { font-size: 13px; white-space: nowrap; }
  .filter { width: 100%; }
  .filter button { flex: 1 1 auto; justify-content: center; padding: 0 9px; }
  .q-row { grid-template-columns: 1.2fr 0.8fr 1fr 1fr; gap: 10px; padding: 12px; font-size: 13px; }
  .oss-card, .engines, .quality, .hw-card { padding: 22px; }
  .oss-links { grid-template-columns: minmax(0, 1fr); }
  .code { font-size: 12px; padding: 16px; }
  .mini-chip { display: none; }
  .msg-user { max-width: 92%; }
  .chat-icons svg:not(:last-child) { display: none; }
  .footer-bottom { flex-direction: column; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee-list { animation: none; }
  .marquee-track { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .marquee-list { flex-wrap: wrap; justify-content: center; gap: 12px 32px; padding: 0 var(--gutter); }
  .marquee-list[aria-hidden='true'] { display: none; }
  .tl-playhead, .ve-playhead { left: 38%; }
  .js .card-interp .fr-gen, .js .privacy-visual .log-lines li { opacity: 1; transform: none; }
  .inpaint-before, .mask, .inpaint-state .st-before { animation: none; opacity: 0; }
  .inpaint-state .st-after { animation: none; opacity: 1; }
}
