/* DotDotDot Studio web UI. Dark studio: near-black canvas, dark rounded cards, one lime accent,
   wide uppercase display type. Fonts are self-hosted (web/fonts, SIL OFL). */
@font-face { font-family: "Archivo Variable"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo.woff2) format("woff2-variations"); }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter.woff2) format("woff2-variations"); }

:root {
  --bg: #09090b; --bg-2: #0f0f12; --panel: #151419; --panel-2: #1b1a20; --panel-3: #24222a;
  --line: #232129; --line-2: #2f2d36; --ink: #f4f4f2; --dim: #9b94af; --faint: #676275;
  --accent: #ff4fcf; --accent-ink: #1c0418; --accent-soft: rgba(255, 79, 207, .14);
  --grad: linear-gradient(100deg, #ffb340 0%, #ff4f8b 28%, #f03fe0 52%, #7d4dff 76%, #2fb8ff 100%);
  --grad-soft: linear-gradient(100deg, rgba(255, 179, 64, .16), rgba(240, 63, 224, .16) 50%, rgba(47, 184, 255, .16));
  --cyan: #3ad7ff; --orange: #ffb340;
  --violet: #9b7bff; --pink: #ff4f8b; --bad: #ff6b5e; --ok: #8fe07c; --warn: #ffb340;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --bar: 56px; --tabs: 0px;
  --top: 56px;
  --font: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Archivo Variable", "Archivo", "Inter Variable", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }
.display { font-family: var(--display); font-weight: 800; font-stretch: 118%; text-transform: uppercase; letter-spacing: -.01em; line-height: .95; }
.dim { color: var(--dim); } .faint { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 1em; height: 1em; flex: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2b2932; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--bar); display: flex; align-items: center; gap: 18px;
  padding: 0 18px; background: rgba(9, 9, 10, .86); backdrop-filter: blur(14px); border-bottom: 1px solid #16151a; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.02em; font-size: 16px; flex: none; }
.logo .mark { width: 26px; height: 26px; }
.nav-main { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-main::-webkit-scrollbar { display: none; }
.nav-main a { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 9px; color: #c7bfe1; font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.nav-main a:hover { color: var(--ink); background: #141318; }
.nav-main a[aria-current="page"] { color: var(--accent); }
.nav-main .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 6px; flex: none; }
.tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .02em; background: var(--accent); color: var(--accent-ink); white-space: nowrap; }
.tag.violet { background: var(--violet); color: #160f2b; }
.tag.pink { background: var(--pink); color: #2b0716; }
.tag.ghost { background: transparent; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-2); }
.tag.dark { background: rgba(0, 0, 0, .55); color: var(--ink); backdrop-filter: blur(6px); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn.menu-btn { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; color: #c7bfe1; cursor: pointer; font-size: 17px; }
.icon-btn:hover { background: #18181d; color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 0;
  background: var(--panel-2); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: var(--panel-3); }
.btn:active { transform: translateY(1px); }
.btn.lime { background: var(--accent); color: var(--accent-ink); }
.btn.lime:hover { background: #ff7ddc; }
.btn.white { background: #f4f4f2; color: #0b0b0d; }
.btn.white:hover { background: #fff; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.ghost:hover { background: #141318; }
.btn.small { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.danger:hover { color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.gpu { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: #111115; color: #d1c9ed; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.gpu:hover { border-color: #3b3844; }
.gpu .dot { width: 8px; height: 8px; border-radius: 50%; background: #5c5869; flex: none; }
.gpu.warm .dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 79, 207, .14); }
.gpu.waking .dot { background: var(--warn); animation: pulse 1.1s infinite; }
.gpu.error .dot, .gpu.off .dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: .35; } }

/* ------------------------------------------------------------------ shared bits */
.view { min-height: calc(100vh - var(--top)); }
.page { padding: 26px clamp(16px, 2vw, 40px) 80px; max-width: clamp(1480px, 92vw, 2600px); margin: 0 auto; }
.page.studio { max-width: none; padding-top: 18px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 38px 0 14px; }
.sec-head h2 { margin: 0; font-size: 26px; }
.sec-head p { margin: 6px 0 0; color: var(--dim); font-size: 13px; }
.more { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; font-size: 13px; white-space: nowrap; }
.more:hover { color: var(--accent); }
.pill-link { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; background: var(--panel-2); font-weight: 600; font-size: 13px; }
.pill-link:hover { background: var(--panel-3); }
.pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pills button { flex: none; height: 32px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: #bcb4d4; font-weight: 600; font-size: 13px; cursor: pointer; }
.pills button:hover { color: var(--ink); background: #141318; }
.pills button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #111115; border: 1px solid #1c1b21; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 9px; border: 0; background: transparent;
  color: #ada6c4; font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: #24222a; color: var(--ink); }
.empty { color: var(--dim); text-align: center; padding: 40px 16px; }
img.alpha, .alpha img { background: repeating-conic-gradient(#211f26 0% 25%, #141318 0% 50%) 50% / 16px 16px; }
.wave { background: radial-gradient(120% 140% at 50% 120%, #1d2210, #0d0d10 70%); }
.kbd { font: 600 11px var(--font); padding: 1px 5px; border-radius: 5px; background: #201e25; color: var(--dim); }
pre.code { margin: 0; padding: 12px 14px; border-radius: 10px; background: #0d0d10; border: 1px solid var(--line); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #d4cbf0; }
.toast-host { position: fixed; left: 50%; top: calc(var(--top) + 12px); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; pointer-events: none; justify-items: center; }
.toast { pointer-events: auto; background: #1d1c22; border: 1px solid var(--line-2); color: var(--ink); padding: 10px 14px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); max-width: min(560px, calc(100vw - 32px)); white-space: pre-wrap; animation: rise .25s var(--ease); }
.toast.err { border-color: rgba(255, 107, 94, .5); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* media tiles: a card that plays its loop on hover or when visible */
.media { position: relative; overflow: hidden; background: #0d0d10; }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }   /* a tall photo in a wide card keeps the head */
.media > img.contain { object-fit: contain; }
.media .badges { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.media .badges.top { top: 10px; bottom: auto; }
.media .typeicon { position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(6px); color: #fff; font-size: 13px; }

/* masonry: columns built in JS so the newest item stays first in reading order */
.masonry { display: flex; gap: 12px; align-items: flex-start; }
.masonry > .col { flex: 1 1 0; min-width: 0; display: grid; gap: 12px; }

/* ------------------------------------------------------------------ explore */
.hero-wrap { position: relative; margin: 0 -22px; }
.hero-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 31%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 22px; scroll-padding: 0 22px; scrollbar-width: none; }
.hero-row::-webkit-scrollbar { display: none; }
.hero-card { position: relative; scroll-snap-align: start; aspect-ratio: 16 / 11; border-radius: var(--r-xl); overflow: hidden; background: #111; cursor: pointer; isolation: isolate; }
.hero-card .media { position: absolute; inset: 0; }
.hero-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .78)); z-index: 1; pointer-events: none; }
.hero-card .txt { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 2; }
.hero-card h3 { margin: 8px 0 6px; font-size: clamp(20px, 1.9vw, 28px); }
.hero-card p { margin: 0; color: #cec5e9; font-size: 13px; max-width: 46ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-card .media > video, .hero-card .media > img { transition: transform .6s var(--ease); }
.hero-card:hover .media > video, .hero-card:hover .media > img { transform: scale(1.03); }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(20, 20, 22, .82); color: #fff; display: grid; place-items: center; font-size: 18px; backdrop-filter: blur(8px); }
.hero-nav.prev { left: 30px; } .hero-nav.next { right: 30px; }
.hero-nav:hover { background: #2a2932; }
.promo { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 14px; margin-top: 14px; }
.promo-lead { border-radius: var(--r-xl); padding: 26px; background: radial-gradient(140% 100% at 0% 0%, #1f2a06 0%, #131216 55%); border: 1px solid #1c1b21;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 280px; }
.promo-lead h2 { margin: 0; font-size: clamp(28px, 3vw, 42px); }
.promo-lead h2 em { font-style: normal; color: var(--accent); }
.promo-lead p { margin: 0; color: #bcb4d4; max-width: 42ch; }
.promo-lead .row { display: flex; gap: 8px; flex-wrap: wrap; }
.tiles6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile6 { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid #1d1c22; cursor: pointer;
  transition: border-color .15s, background .15s; min-height: 132px; }
.tile6:hover { border-color: #35333d; background: #18181d; }
.tile6 .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #211f26; color: var(--accent); font-size: 19px; }
.tile6 .t { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.tile6 p { margin: 0; color: var(--dim); font-size: 13px; }
.m-item { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--panel); cursor: pointer; }
.m-item .media > img, .m-item .media > video { height: auto; }
.m-item .media.audio { aspect-ratio: 4 / 3; display: grid; place-items: center; }
.m-item .media.audio > img { height: auto; object-fit: contain; padding: 0 12px; }
.m-item .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .75));
  display: flex; align-items: center; justify-content: space-between; gap: 8px; opacity: 0; transition: opacity .2s; font-size: 13px; font-weight: 600; }
.m-item:hover .cap, .m-item:focus-visible .cap { opacity: 1; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.how > div { padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid #1d1c22; }
.how h3 { margin: 10px 0 6px; font-size: 15px; }
.how p { margin: 0; color: var(--dim); font-size: 13px; }
.how .n { font-family: var(--display); font-weight: 800; font-stretch: 118%; color: var(--accent); font-size: 22px; }

/* ------------------------------------------------------------------ apps page */
.apps-head { display: grid; gap: 14px; padding-top: 8px; }
.apps-head .ic { width: 34px; height: 34px; color: var(--ink); font-size: 26px; }
.apps-head h1 { margin: 0; font-size: clamp(32px, 4.4vw, 58px); }
.apps-head h1 em { font-style: normal; color: var(--accent); }
.apps-head p { margin: 0; color: var(--dim); }
.apps-bar { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; min-width: 0; }
.apps-bar .pills { flex: 1 1 320px; min-width: 0; }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--panel); border: 1px solid #1f1e25; width: min(260px, 100%); flex: none; color: var(--dim); }
.search input { border: 0; background: transparent; color: var(--ink); font: inherit; width: 100%; outline: none; }
.app-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; }
.app-card { display: flex; flex-direction: column; gap: 10px; padding: 8px 8px 12px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid #1c1b21; cursor: pointer;
  transition: border-color .15s, background .15s; min-width: 0; }
.app-card:hover { border-color: #34323d; background: #18181d; }
.app-card .media { aspect-ratio: 1 / 1; border-radius: 11px; }
.app-card .media.audio > img { object-fit: contain; padding: 0 10px; }
.app-card .media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #3b3844; font-size: 40px; }
.app-card h3 { margin: 0 4px; font-size: 14px; font-weight: 700; }
.app-card p { margin: 0 4px; color: var(--dim); font-size: 12.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.app-card .btn { margin: auto 4px 0; height: 32px; border-radius: 9px; font-size: 12.5px; }

/* ------------------------------------------------------------------ workspace */
.ws { display: grid; min-height: calc(100vh - var(--top)); }
.ws.l-sidebar { grid-template-columns: 340px minmax(0, 1fr); }
.ws-main { min-width: 0; padding: 14px 20px 40px; display: flex; flex-direction: column; gap: 14px; }
.ws.l-composer .ws-main { padding-bottom: 230px; }
.ws-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.ws-top .right { display: flex; gap: 6px; align-items: center; }
.feed-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 40px 16px 20px; position: relative; isolation: isolate; min-height: 46vh; }
.feed-empty::before { content: ""; position: absolute; left: 50%; top: 48%; width: min(720px, 90vw); height: 360px; transform: translate(-50%, -50%); z-index: -1;
  background: radial-gradient(closest-side, rgba(70, 140, 130, .22), rgba(70, 140, 130, 0)); filter: blur(10px); }
.feed-empty .glass { width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 22px; display: grid; place-items: center;
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03)); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 20px 50px rgba(0, 0, 0, .5); backdrop-filter: blur(10px); }
.feed-empty .glass svg { width: 40px; height: 40px; }
.feed-empty h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); }
.feed-empty h2 span { display: block; color: #7d7d86; }
.feed-empty p { margin: 14px auto 0; color: var(--dim); max-width: 52ch; }
.feed-empty .ex { margin: 26px auto 0; display: inline-flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 14px; background: rgba(21, 21, 23, .8);
  border: 1px solid var(--line); cursor: pointer; text-align: left; }
.feed-empty .ex:hover { border-color: #3b3844; }
.feed-empty .ex .media { width: 54px; height: 54px; border-radius: 9px; flex: none; }
.feed-empty .ex b { display: block; font-size: 13px; }
.feed-empty .ex small { color: var(--dim); font-size: 12px; }
.feed { min-width: 0; }
.feed.dense .masonry > .col, .feed.dense .masonry { gap: 8px; }

/* result card */
.rcard { position: relative; border-radius: var(--r); overflow: hidden; background: var(--panel); cursor: pointer; min-height: 60px; }
.rcard .media > img, .rcard .media > video { height: auto; }
.rcard .media.audio { aspect-ratio: 16 / 9; display: grid; place-items: center; }
.rcard .media.audio > img { height: auto; object-fit: contain; padding: 0 14px; }
.rcard .ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 8px; opacity: 0; transition: opacity .15s;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 30%, transparent 62%, rgba(0, 0, 0, .7)); }
.rcard:hover .ov, .rcard:focus-within .ov { opacity: 1; }
.rcard .ov .row { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.rcard .ov .acts { display: flex; gap: 4px; }
.rcard .ov .meta { font-size: 12px; color: #e3e3e8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mini { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; border: 0; background: rgba(15, 15, 17, .75); color: #fff; cursor: pointer;
  backdrop-filter: blur(8px); font-size: 14px; }
.mini:hover { background: rgba(40, 40, 44, .9); }
.mini.lime { background: var(--accent); color: var(--accent-ink); }
.rcard.pending { aspect-ratio: 1 / 1; background: #121216; cursor: default; }
.rcard.pending.video { aspect-ratio: 16 / 9; }
.rcard.pending .shimmer { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .05) 50%, transparent 70%) #121216;
  background-size: 220% 100%; animation: shimmer 1.6s linear infinite; }
.rcard.pending > img.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); opacity: .85; }
@keyframes shimmer { to { background-position: -120% 0; } }
.rcard.pending .state { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 8px; z-index: 2; }
.rcard.pending .state b { font-size: 13px; }
.rcard.pending .state small { color: var(--dim); font-size: 12px; }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .4s var(--ease); }
.bar.indet > i { width: 35%; animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.rcard.pending .stop { position: absolute; right: 8px; top: 8px; z-index: 2; }
.rcard.failed { background: #1a1112; border: 1px solid rgba(255, 107, 94, .25); padding: 14px; display: grid; gap: 10px; cursor: default; }
.rcard.failed b { color: var(--bad); font-size: 13px; }
.rcard.failed pre { margin: 0; white-space: pre-wrap; font: 12px/1.45 ui-monospace, Menlo, Consolas, monospace; color: #e6c8c5; max-height: 180px; overflow: auto; }
.rcard.failed .row { display: flex; gap: 6px; }

/* composer: the floating prompt bar */
.composer { position: fixed; z-index: 30; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(940px, calc(100% - 32px));
  background: rgba(24, 24, 27, .92); border: 1px solid #2d2b34; border-radius: 22px; padding: 12px; box-shadow: 0 24px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(18px); display: grid; gap: 10px; }
.composer.drag { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 24px 80px rgba(0, 0, 0, .65); }
.cmp-top { display: flex; gap: 10px; align-items: flex-start; padding: 2px 4px 0; }
.cmp-attach { display: flex; gap: 8px; flex: none; }
.att { position: relative; width: 56px; height: 56px; border-radius: 11px; overflow: hidden; background: #0f0f12; border: 1px solid #333; flex: none; }
.att img, .att video { width: 100%; height: 100%; object-fit: cover; }
.att .x { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .7); color: #fff; font-size: 11px;
  display: grid; place-items: center; cursor: pointer; padding: 0; }
.att .lbl { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; font-weight: 700; text-align: center; background: rgba(0, 0, 0, .6); padding: 1px 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att.need { border: 1px dashed #565262; display: grid; place-items: center; color: #8a8a93; cursor: pointer; background: transparent; font-size: 20px; }
.att.need:hover { border-color: var(--accent); color: var(--accent); }
.att.need.missing { border-color: var(--bad); color: var(--bad); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.cmp-prompt { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: var(--ink); font: 15px/1.5 var(--font); padding: 6px 2px;
  min-height: 48px; max-height: 220px; }
.cmp-prompt::placeholder { color: #75757e; }
.cmp-prompt.missing::placeholder { color: var(--bad); }
.cmp-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmp-row .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 11px; border: 0; background: #27252d; color: #e4e4e8;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; max-width: 260px; }
.chip:hover { background: #302e38; }
.chip .k { color: #8f8f98; font-weight: 500; }
.chip .v { overflow: hidden; text-overflow: ellipsis; }
.chip.square { width: 34px; padding: 0; justify-content: center; font-size: 16px; }
.chip.model { padding-left: 4px; }
.chip.model .thumb { width: 26px; height: 26px; border-radius: 8px; overflow: hidden; background: #111; flex: none; }
.chip.model .thumb img, .chip.model .thumb video { width: 100%; height: 100%; object-fit: cover; }
.chip.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 79, 207, .35); }
.chip.filled .k { color: var(--accent); }
.count { display: inline-flex; align-items: center; height: 34px; border-radius: 11px; background: #27252d; padding: 0 4px; gap: 2px; font-weight: 700; font-size: 13px; }
.count button { width: 26px; height: 26px; border-radius: 8px; border: 0; background: transparent; color: #c6bee0; cursor: pointer; font-size: 15px; }
.count button:hover:not(:disabled) { background: #34323c; color: #fff; }
.count button:disabled { opacity: .35; cursor: default; }
.count span { min-width: 30px; text-align: center; }
.count span small { color: var(--faint); font-weight: 600; }
.generate { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 14px; border: 0; cursor: pointer; background: var(--accent);
  color: var(--accent-ink); font-family: var(--display); font-weight: 800; font-stretch: 112%; font-size: 15px; letter-spacing: .01em; text-transform: uppercase;
  transition: background .15s, transform .1s, box-shadow .15s; white-space: nowrap; }
.generate:hover { background: #ff7ddc; box-shadow: 0 0 0 4px var(--accent-soft); }
.generate:active { transform: translateY(1px); }
.generate .cost { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font); font-stretch: 100%; font-weight: 700; font-size: 13px; text-transform: none; opacity: .8; }
.generate:disabled { background: #312f39; color: #8c8c80; cursor: not-allowed; box-shadow: none; }
.generate.wide { width: 100%; justify-content: center; height: 50px; }
.cmp-hint { font-size: 12px; color: var(--dim); padding: 0 6px; }
.cmp-hint.err { color: var(--bad); }

/* popovers (selects, sliders, seed, model switcher) */
.pop { position: fixed; z-index: 85; min-width: 220px; max-width: min(380px, calc(100vw - 24px)); max-height: min(440px, calc(100vh - 100px)); overflow: auto;
  background: #1b1a20; border: 1px solid #302e38; border-radius: 14px; padding: 6px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); animation: rise .14s var(--ease); }
.pop h4 { margin: 6px 8px 8px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.pop .opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; border: 0; background: transparent; color: #e4e4e8;
  text-align: left; cursor: pointer; font-size: 13.5px; }
.pop .opt:hover, .pop .opt:focus-visible { background: #28262e; }
.pop .opt .chk { margin-left: auto; color: var(--accent); visibility: hidden; }
.pop .opt[aria-selected="true"] .chk { visibility: visible; }
/* a multiple select: picked options carry their number (the order they run in) or a check */
.pop h4 .n { margin-left: 8px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.pop h4 .mini-link { float: right; border: 0; background: none; color: var(--dim); font: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; padding: 0; }
.pop h4 .mini-link:hover { color: var(--ink); }
.multi-list { max-height: 360px; overflow-y: auto; }
.pop .usein { max-height: min(460px, 70vh); overflow-y: auto; }
.pop .usein details summary { padding: 8px 10px; color: var(--dim); cursor: pointer; font-size: 13px; }
.pop .opt[aria-pressed="true"] { color: var(--ink); background: #201e25; }
.pop .opt .pick { margin-left: auto; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #0b0b0d; font-size: 11.5px; font-weight: 800; }
.pop .opt .pick svg { width: 12px; height: 12px; }
.pop .opt .thumb { width: 40px; height: 40px; border-radius: 9px; overflow: hidden; background: #111; flex: none; }
.pop .opt .thumb img, .pop .opt .thumb video { width: 100%; height: 100%; object-fit: cover; }
.pop .opt .two { display: grid; min-width: 0; }
.pop .opt .two small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop .pad { padding: 8px 10px 10px; display: grid; gap: 10px; }
.pop textarea, .pop input[type="number"], .pop input[type="text"] { width: 100%; background: #111115; border: 1px solid #2f2d36; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: inherit; }
.pop textarea { min-height: 120px; resize: vertical; }
.pop .row { display: flex; gap: 6px; align-items: center; }
.pop .help { color: var(--dim); font-size: 12px; margin: 0; }

/* ranges and switches */
.range { display: grid; gap: 6px; }
.range .top { display: flex; justify-content: space-between; font-size: 13px; }
.range .top b { font-weight: 700; color: var(--ink); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), #34323c var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: #34323c; }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; margin-top: -6px; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #393742; transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s var(--ease); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); background: #1c0418; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* sidebar layout (video and tools) */
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column; border-right: 1px solid #18181d; background: #0c0c0e; min-width: 0; }
.side-tabs { display: flex; gap: 2px; padding: 12px 14px 0; border-bottom: 1px solid #18181d; overflow-x: auto; scrollbar-width: none; flex: none; }
.side-tabs::-webkit-scrollbar { display: none; }
.side-tabs button { flex: none; height: 36px; padding: 0 8px; border: 0; background: transparent; color: #9a93ae; font-weight: 600; font-size: 13px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.side-tabs button:hover { color: var(--ink); }
.side-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.side-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.side-scroll > * { flex: none; min-width: 0; }
.model-card { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 8.5; background: #141318; cursor: pointer; isolation: isolate; flex: none; }
.model-card .media { position: absolute; inset: 0; }
.model-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1), rgba(0, 0, 0, .72)); z-index: 1; pointer-events: none; }
.model-card .txt { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 2; }
.model-card .txt h3 { margin: 0; font-size: 20px; color: var(--accent); }
.model-card .txt p { margin: 3px 0 0; font-size: 12px; color: #d6cdf2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-card .change { position: absolute; top: 10px; right: 10px; z-index: 2; height: 28px; padding: 0 10px; border-radius: 8px; border: 0; background: rgba(15, 15, 17, .72);
  color: #fff; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; backdrop-filter: blur(8px); }
.model-card .change:hover { background: rgba(40, 40, 44, .9); }
.drop { position: relative; display: grid; place-items: center; align-content: center; text-align: center; gap: 6px; min-height: 132px; padding: 18px; border-radius: 14px; background: #151419;
  border: 1px dashed #2f2d36; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: #17180f; }
.drop.missing { border-color: var(--bad); animation: shake .35s; }
.drop .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #232129; color: #e4e4e8; font-size: 17px; }
.drop b { font-size: 13.5px; }
.drop small { color: var(--dim); font-size: 12px; }
.drop.has { padding: 0; min-height: 0; border-style: solid; border-color: #27252d; overflow: hidden; display: block; }
.drop.has img, .drop.has video { width: 100%; max-height: 240px; object-fit: contain; background: #0b0b0d; }
.drop.has audio { width: calc(100% - 16px); margin: 10px 8px; }
.drop .bar2 { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; }
.drop .fname { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); font-size: 11.5px; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .6);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: #151419; border: 1px solid #1d1c22; }
.field > .lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; color: #e4e4e8; }
.field > .lbl small { color: var(--faint); font-weight: 500; }
.field textarea { width: 100%; min-height: 96px; resize: vertical; border: 0; outline: none; background: transparent; color: var(--ink); font: 14px/1.5 var(--font); padding: 0; }
.field textarea.short { min-height: 56px; }
.field textarea::placeholder { color: #6e6e77; }
.field textarea.missing::placeholder { color: var(--bad); }
.field input[type="text"], .field input[type="number"] { width: 100%; background: #0f0f12; border: 1px solid #2b2932; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: inherit; }
.field .help { margin: 0; color: var(--dim); font-size: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 11px; background: #0f0f12; }
.seg button { flex: 1 1 auto; min-width: 0; min-height: 30px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: #a8a1bf; font-weight: 600; font-size: 12.5px; cursor: pointer; line-height: 1.25; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: #2b2932; color: var(--ink); }
.seg.modes button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg.modes svg { width: 15px; height: 15px; }
.side-scroll > .seg.modes { margin: 2px 0 4px; }
.cmp-row > .seg.modes { flex: none; padding: 2px; }
.cmp-row > .seg.modes button { min-height: 28px; padding: 4px 10px; }
.selrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border-radius: 11px; border: 0;
  background: #0f0f12; color: var(--ink); cursor: pointer; font-size: 13.5px; }
.selrow:hover { background: #18181d; }
.selrow .v { display: flex; align-items: center; gap: 6px; color: #d6cdf2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.togrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.togrow .t { display: grid; }
.togrow .t small { color: var(--dim); font-size: 12px; }
details.adv { border-radius: 14px; background: #151419; border: 1px solid #1d1c22; }
details.adv > summary { list-style: none; cursor: pointer; padding: 12px; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: space-between; }
details.adv > summary::-webkit-details-marker { display: none; }
details.adv[open] > summary .i-chev { transform: rotate(180deg); }
details.adv > .in { padding: 0 12px 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
details.adv > .in > .field { background: #111115; }
.side-foot { flex: none; padding: 12px 14px 14px; border-top: 1px solid #18181d; display: grid; gap: 8px; background: #0c0c0e; }
.side-foot .row { display: flex; gap: 8px; align-items: center; }
.side-foot .row .generate { flex: 1; min-width: 0; justify-content: center; padding: 0 14px; }
.side-note { margin: 0; font-size: 12px; color: var(--dim); text-align: center; }
.side-note.err { color: var(--bad); text-align: left; white-space: pre-wrap; }

/* workspace hero (empty history) */
.ws-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: center; padding: 22px; border-radius: var(--r-xl);
  background: radial-gradient(120% 140% at 0% 0%, #1a1d12 0%, #111115 60%); border: 1px solid #1c1b21; }
.ws-hero h1 { margin: 0; font-size: clamp(28px, 3.2vw, 46px); }
.ws-hero p { margin: 12px 0 0; color: #c0b9da; max-width: 50ch; }
.ws-hero .row { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.ws-hero .flow { display: flex; gap: 10px; align-items: center; justify-content: flex-end; min-width: 0; }
.ws-hero .flow .ins { display: grid; gap: 8px; flex: none; width: 26%; }
.ws-hero .flow .ins .media { border-radius: 10px; aspect-ratio: 1 / 1; }
.ws-hero .flow .arrow { color: var(--accent); font-size: 20px; flex: none; }
.ws-hero .flow .out { flex: 1; min-width: 0; border-radius: 14px; overflow: hidden; }
.ws-hero .flow .out .media { aspect-ratio: 16 / 10; }
.ws-hero .flow .out .media.audio { display: grid; place-items: center; }
.ws-hero .flow .out .media.audio > img { height: auto; object-fit: contain; padding: 0 12px; }

/* how it works */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.card { padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid #1d1c22; display: grid; gap: 10px; align-content: start; }
.card h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.card p { margin: 0; color: var(--dim); font-size: 13px; }
table.models { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.models td { padding: 7px 4px; border-top: 1px solid var(--line); vertical-align: top; }
table.models td:first-child { overflow-wrap: anywhere; }
table.models td.r { text-align: right; white-space: nowrap; color: var(--dim); }
.vbar { position: relative; height: 10px; border-radius: 6px; background: #232129; overflow: visible; }
.vbar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #7d4dff, var(--accent)); }
.vbar > i.whole { background: rgba(255, 255, 255, .14); }
.vbar > b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--pink); border-radius: 2px; }
.vbar > u { position: absolute; top: -6px; bottom: -6px; width: 1px; background: #565262; }
.fit { font-size: 12px; font-weight: 700; }
.fit.ok { color: var(--ok); } .fit.tight { color: var(--warn); } .fit.big { color: var(--violet); }

/* library and examples */
.ex-big { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; padding: 16px; border-radius: var(--r-xl); background: var(--panel); border: 1px solid #1d1c22; }
.ex-big .stage { border-radius: 14px; overflow: hidden; background: #0b0b0d; display: grid; place-items: center; min-height: 240px; }
.ex-big .stage img, .ex-big .stage video { width: 100%; max-height: 70vh; object-fit: contain; }
.ex-big .stage audio { width: 90%; }
.ex-big .stage .audio-box { width: 92%; display: grid; gap: 12px; padding: 20px 0; }
.ex-big .side2 { display: grid; gap: 14px; align-content: start; }
.ins-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ins-row figure { margin: 0; width: 92px; display: grid; gap: 4px; }
.ins-row .media { width: 92px; height: 92px; border-radius: 10px; }
.ins-row figcaption { font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dl.vals { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; }
dl.vals dt { color: var(--dim); }
dl.vals dd { margin: 0; overflow-wrap: anywhere; }
.statline { display: flex; gap: 6px; flex-wrap: wrap; }
.statline span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; border-radius: 8px; background: #201e25; color: #cdc5e8; font-size: 12px; font-weight: 600; }

/* vram map */
.vtable { display: grid; gap: 6px; }
.vrow { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 140px; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid #1c1b21; cursor: pointer; }
.vrow:hover { border-color: #34323d; }
.vrow .nm { display: grid; } .vrow .nm small { color: var(--dim); font-size: 12px; }
.vscale { position: relative; height: 18px; margin: 0 0 4px; font-size: 11px; color: var(--faint); }
.vscale span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.legend i { display: inline-block; width: 18px; height: 8px; border-radius: 4px; vertical-align: middle; margin-right: 6px; }

/* ------------------------------------------------------------------ viewer modal and compare */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(5, 5, 6, .9); backdrop-filter: blur(10px); display: grid; grid-template-columns: minmax(0, 1fr) 380px;
  animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
.modal .stage { position: relative; display: grid; place-items: center; padding: 56px 64px; min-width: 0; min-height: 0; }
.modal .stage img, .modal .stage video { max-width: 100%; max-height: calc(100vh - 112px); object-fit: contain; border-radius: 12px; }
.modal .stage .audio-box { width: min(720px, 100%); display: grid; gap: 14px; }
.modal .stage .audio-box img { width: 100%; border-radius: 12px; }
.modal .stage .audio-box audio { width: 100%; }
.modal .close { position: absolute; top: 14px; left: 14px; }
.modal .navb { position: absolute; top: 50%; transform: translateY(-50%); }
.modal .navb.prev { left: 14px; } .modal .navb.next { right: 14px; }
.modal .round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #1d1c22; color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 18px; }
.modal .round:hover { background: #2c2b34; }
.modal aside { background: #111115; border-left: 1px solid #1e1d24; padding: 18px; overflow-y: auto; display: grid; gap: 16px; align-content: start; }
.modal aside .approw { display: flex; align-items: center; gap: 10px; }
.modal aside .approw .media { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.modal aside .approw b { display: block; }
.modal aside .approw small { color: var(--dim); font-size: 12px; }
.modal aside .prompt { padding: 12px; border-radius: 12px; background: #18181d; border: 1px solid #232129; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.modal aside .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal aside .acts .btn { width: 100%; }
.modal aside .acts .btn.lime { grid-column: 1 / -1; height: 42px; }
.cmpx { position: fixed; inset: 0; z-index: 85; background: #070709; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; animation: fade .18s ease; }
.cmpx header { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #18181d; }
.cmpx header h2 { margin: 0; font-size: 18px; }
.cmpx header .grow { flex: 1; }
.cmpx .panes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; min-height: 0; }
.cmpx .pane { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; min-height: 0; border-radius: 16px; background: #0f0f12; border: 1px solid #1c1b21; padding: 10px; }
.cmpx .pane .lab { display: flex; align-items: center; gap: 8px; }
.cmpx .pane .lab input { background: transparent; border: 0; color: var(--ink); font: 700 14px var(--font); width: 100%; outline: none; }
.cmpx .pane .lab input:focus { box-shadow: 0 1px 0 var(--accent); }
.cmpx .pane .box { display: grid; place-items: center; min-height: 0; overflow: hidden; border-radius: 10px; background: #0a0a0c; }
.cmpx .pane .box img, .cmpx .pane .box video { max-width: 100%; max-height: 100%; object-fit: contain; }
.cmpx .pane .box audio { width: 90%; }
.cmpx .pane .info { font-size: 12px; color: var(--dim); display: flex; gap: 12px; flex-wrap: wrap; }
.cmpx .pane .drop { min-height: 100%; height: 100%; width: 100%; }
.cmpx .wipe { position: relative; margin: 10px; border-radius: 16px; overflow: hidden; background: #0a0a0c; min-height: 0; touch-action: none; cursor: ew-resize; user-select: none; }
.cmpx .wipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cmpx .wipe .handle { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); pointer-events: none; }
.cmpx .wipe .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.cmpx .wipe .tagl, .cmpx .wipe .tagr { position: absolute; top: 12px; padding: 4px 9px; border-radius: 7px; background: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 700; }
.cmpx .wipe .tagl { left: 12px; } .cmpx .wipe .tagr { right: 12px; }
.cmpx footer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid #18181d; }
.cmpx footer input[type="range"] { flex: 1; }
.cmpx footer .t { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--dim); min-width: 92px; text-align: right; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .promo { grid-template-columns: 1fr; }
  .ws.l-sidebar { grid-template-columns: 300px minmax(0, 1fr); }
  .hero-row { grid-auto-columns: minmax(300px, 44%); }
}
@media (max-width: 900px) {
  .nav-main .opt-hide { display: none; }
  .modal { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; overflow-y: auto; }
  .modal .stage { padding: 56px 12px 12px; }
  .modal .stage img, .modal .stage video { max-height: 60vh; }
  .modal aside { border-left: 0; border-top: 1px solid #1e1d24; }
  .ws-hero { grid-template-columns: 1fr; }
  .ws-hero .flow { justify-content: flex-start; }
  .ex-big { grid-template-columns: 1fr; }
  .vrow { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 760px) {
  :root { --bar: 52px; --top: 52px; }
  .topbar { gap: 8px; padding: 0 10px; }
  .logo .word { display: none; }
  .nav-right .cta, .nav-right .gpu .lbl-long { display: none; }
  .nav-main { display: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .ws-top .right { display: none; }
  .search { width: 100%; }
  .page { padding: 18px 16px 80px; }
  .hero-wrap { margin: 0 -16px; }
  .hero-row { grid-auto-columns: 84%; padding: 0 16px; scroll-padding: 0 16px; }
  .hero-nav { display: none; }
  .tiles6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how { grid-template-columns: 1fr; }
  .ws.l-sidebar { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid #18181d; }
  .side-scroll { overflow: visible; }
  .ws-main { padding: 12px 16px 30px; }
  .ws.l-composer .ws-main { padding-bottom: 260px; }
  .composer { bottom: 10px; width: calc(100% - 20px); border-radius: 18px; padding: 10px; }
  .generate { height: 42px; padding: 0 16px; }
  .cmp-row .grow { display: none; }
  .cmp-row .generate { margin-left: auto; }
  .cmpx .panes { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .app-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* gallery selects (the effects): a picker of cards and a wall on Explore, each card playing its lab example */
.pop.wide { max-width: min(640px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 100px)); }
.fx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; padding: 2px 6px 8px; }
.fx-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.fx-tile { display: grid; gap: 6px; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; min-width: 0; }
.fx-tile .media { aspect-ratio: 3 / 4; border-radius: var(--r); background: var(--panel-3); outline: 2px solid transparent; outline-offset: 2px;
  transition: outline-color .15s var(--ease); }
.fx-tile .media .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #3b3844; font-size: 26px; }
.fx-tile .lbl { font-size: 12.5px; font-weight: 600; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-tile:hover .lbl, .fx-tile:focus-visible .lbl, .fx-tile[aria-pressed="true"] .lbl { color: var(--ink); }
.fx-tile:hover .media { outline-color: var(--line-2); }
.fx-tile[aria-pressed="true"] .media { outline-color: var(--accent); }
.fx-wall .fx-tile .media { border-radius: var(--r-lg); }
.fx-wall .fx-tile .lbl { font-size: 13.5px; color: var(--ink); }
.fx-cell { position: relative; min-width: 0; }
.fx-cell > .fx-tile { width: 100%; }
.fx-cell > .flag, .m-item > .flag { position: absolute; top: 6px; right: 6px; z-index: 2; opacity: 0; transition: opacity .15s var(--ease); }
.fx-cell:hover > .flag, .fx-cell:focus-within > .flag, .m-item:hover > .flag, .m-item:focus-within > .flag, .flag[aria-pressed="true"] { opacity: 1; }
.mini.flag[aria-pressed="true"] { background: var(--pink); color: #2b0716; }
.btn.flag[aria-pressed="true"] { background: var(--pink); color: #2b0716; border-color: transparent; }
.fx-now { border-radius: var(--r); overflow: hidden; }
.fx-now .media { aspect-ratio: 4 / 3; }

/* hosted demo: the "Start here" row on Explore */
.start5 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 30px; }
.start-card { display: grid; gap: 4px; padding: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.start-card:hover, .start-card:focus-visible { border-color: var(--accent); }
.start-card .media { aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 6px; }
.start-card .media > img, .start-card .media > video { width: 100%; height: 100%; object-fit: cover; }
.start-card .nm { padding: 0 12px; font-weight: 600; font-size: 14.5px; }
.start-card .dim { padding: 0 12px; font-size: 12.5px; color: var(--dim); }

/* top-bar menus (menu.js): hover Image, Video or Audio for every app of that studio and the models behind them */
.mm { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0 auto; width: min(1240px, calc(100vw - 24px)); z-index: 45;
  max-height: calc(100vh - var(--top) - 22px); overflow: auto; overscroll-behavior: contain; background: #121216; border: 1px solid #27252d;
  border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .65); animation: rise .14s var(--ease); }
.mm[data-studio="audio"] { width: min(760px, calc(100vw - 24px)); }
.mm-inner { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 12px 22px; padding: 18px 18px 14px; }
.mm-audio { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mm h4 { display: flex; align-items: baseline; gap: 8px; margin: 0 8px 10px; font-size: 12.5px; font-weight: 500; color: var(--dim); }
.mm h4 .n { color: var(--faint); font-size: 12px; }
.mm h5 { margin: 6px 8px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.mm-cols { columns: 3 230px; column-gap: 14px; }
.mm-cols.one { columns: 1; }
.mm-group { break-inside: avoid; padding-bottom: 12px; }
.mm-models { border-left: 1px solid var(--line); padding-left: 18px; align-self: start; position: sticky; top: 0; }
.mm-item { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 6px 8px; border-radius: 10px; color: var(--ink); }
.mm-item:hover, .mm-item:focus-visible { background: #1e1d23; }
.mm-item[aria-current="page"] .nm { color: var(--accent); }
.mm-thumb { display: grid; place-items: center; width: 38px; height: 38px; flex: none; overflow: hidden; border-radius: 9px; background: #1a191f;
  box-shadow: inset 0 0 0 1px #28262f; color: var(--dim); font-size: 17px; }
.mm-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.mm-thumb.glyph { color: #d3cbef; }
.mm-txt { display: grid; gap: 1px; min-width: 0; }
.mm-item.model .mm-txt { flex: 1; }
.mm-txt b { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; font-weight: 600; }
.mm-txt .nm, .mm-txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-txt small { font-size: 12px; color: var(--dim); }
.mm .tag { height: 16px; padding: 0 5px; font-size: 9.5px; flex: none; }
.mm-txt b .n { margin-left: auto; padding-left: 6px; font-size: 11.5px; font-weight: 500; color: var(--faint); flex: none; }
@media (max-width: 1000px) {
  .mm-inner, .mm-audio { grid-template-columns: minmax(0, 1fr); }
  .mm-models { border-left: 0; border-top: 1px solid var(--line); padding: 14px 0 0; position: static; }
}
@media (max-width: 760px) { .mm { display: none; } }

/* the brush for painted inputs (paint.js, inpaint): the mask is drawn at the photo's own size, shown as a tint */
.drop.paint { overflow: hidden; }
.drop.paint > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; pointer-events: none; }
.drop.paint > :not(img) { position: relative; }
.drop.paint.off { opacity: .6; cursor: not-allowed; }
.drop.has canvas.mask-preview { display: block; width: 100%; max-height: 240px; object-fit: contain; background: #0b0b0d; }
.painter { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .78); animation: rise .14s var(--ease); }
.pt-box { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; width: min(1100px, 100%); height: min(860px, 100%); padding: 16px;
  background: #151419; border: 1px solid #2b2932; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.pt-box header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pt-box h3 { margin: 0 0 2px; font-size: 16px; }
.pt-box .help { margin: 0; color: var(--dim); font-size: 12.5px; }
.pt-stage { position: relative; display: grid; place-items: center; min-height: 0; overflow: hidden; border-radius: 12px; background: #0b0b0d; }
.pt-canvas { display: block; touch-action: none; cursor: none; }
.pt-cursor { position: absolute; border: 2px solid var(--accent); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.pt-box footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pt-size { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); }
.pt-size input { width: 140px; }

/* ===================================================================== Reece's additions (js/extras.js) */
.pop.xwide { max-width: min(520px, calc(100vw - 24px)); max-height: min(660px, calc(100vh - 80px)); }
.xstack { display: grid; gap: 14px; }
.xcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: grid; gap: 10px; min-width: 0; }
.xcard h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.xcard h4 { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.xcard .help, .page .help { color: var(--dim); font-size: 12.5px; margin: 0; }
.xcard .num { width: 24px; height: 24px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 800; }
.xrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.xrow.small { font-size: 12.5px; }
.xrow .grow, .xgroup .grow { flex: 1; }
.xbig { font-size: 15px; } .xbig b { font-size: 26px; font-family: var(--display); font-stretch: 112%; }
.xprog { display: grid; gap: 6px; }
.xbar { position: relative; height: 6px; border-radius: 6px; background: #27252d; overflow: hidden; }
.xbar.big { height: 12px; }
.xbar > i { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: linear-gradient(90deg, #7d4dff, var(--accent)); transition: width .6s var(--ease); }
.xpill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: #27252d; color: #c6bee0; }
.xpill.ok { background: rgba(143, 224, 124, .14); color: var(--ok); }
.xpill.busy { background: var(--accent-soft); color: var(--accent); }
.xpill.warn { background: rgba(255, 198, 92, .13); color: var(--warn); }
.xpill.bad { background: rgba(255, 107, 94, .14); color: var(--bad); }
.xpill.violet { background: rgba(180, 156, 255, .14); color: var(--violet); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #565262; flex: none; display: inline-block; }
.dot.ok { background: var(--ok); } .dot.busy { background: var(--accent); animation: pulse 1.1s infinite; } .dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); } .dot.violet { background: var(--violet); }
.xlegend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--dim); }
.xlegend span { display: inline-flex; align-items: center; gap: 6px; }
.xopts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.xopt { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; }
.xopt small { font-size: 12px; color: #c6bee0; word-break: break-all; } .xopt small.dim { color: var(--dim); word-break: normal; }
.xopt:hover { border-color: #464350; } .xopt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.xcard input[type="text"], .xcard input[type="password"], .xcard input[type="search"], .xcard select, .xcard textarea, .pop .xf input, .pop .xrow input[type="text"], .xrefside input {
  flex: 1; min-width: 180px; background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: inherit; }
.xcard textarea { width: 100%; resize: vertical; font: 13.5px/1.5 var(--font); }
.xcard select { flex: 0 0 auto; min-width: 140px; }
.xsteps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; }
.xsteps a, .xcard p a { color: var(--accent); }
.xlic { display: grid; gap: 6px; }
.xlicrow { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); font-size: 13px; }
.xmodels { display: grid; gap: 4px; }
.xgroup { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 13px; text-transform: none; }
.xgroup b { text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.xmodel { display: grid; grid-template-columns: 14px minmax(0, 1fr) 70px 190px 118px; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 11px; background: var(--bg-2); border: 1px solid transparent; }
.xmodel.ok { border-color: rgba(143, 224, 124, .18); }
.xmodel.busy { border-color: rgba(255, 79, 207, .3); }
.xmodel .nm { display: grid; gap: 3px; min-width: 0; }
.xmodel .nm b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xmodel .nm small { color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xmodel .err, .xqrow .err { color: var(--bad) !important; white-space: normal !important; }
.xmodel .sz { text-align: right; font-variant-numeric: tabular-nums; color: #c6bee0; font-size: 12.5px; }
.xmodel .xpill { justify-self: start; }
.xmodel .act { justify-self: end; }
.xmodel .act.ok { color: var(--ok); }
@media (max-width: 860px) { .xmodel { grid-template-columns: 14px minmax(0, 1fr) auto; } .xmodel .sz, .xmodel .xpill { display: none; } }

.proj-pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; max-width: 220px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--dim); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.proj-pill .v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-pill.on { color: var(--ink); border-color: #464350; }
.proj-pill:hover { border-color: #565262; }
.proj-pill svg { width: 16px; height: 16px; flex: none; }
.models-btn { position: relative; }
.models-btn.busy { color: var(--accent); }
.xbadge { position: absolute; top: -2px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 9.5px; font-weight: 800; line-height: 17px; text-align: center; pointer-events: none; }
.pop .xf, .xf { display: grid; gap: 4px; font-size: 12px; color: var(--dim); }
.pop .xf input { width: 100%; }
.xcheck { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #d2c9ed; cursor: pointer; }
.xcheck input { margin-top: 2px; accent-color: var(--accent); }

.xrefs { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .xrefs { grid-template-columns: 1fr; } }
.xrefside { display: grid; gap: 6px; position: sticky; top: calc(var(--top) + 12px); }
.xrefside input { min-width: 0; }
.xfolder { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: var(--panel); cursor: pointer; text-align: left; }
.xfolder.on { border-color: var(--accent); }
.xfolder img, .xfolder .ph { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex: none; display: grid; place-items: center; background: #232129; }
.xfolder .t { display: grid; min-width: 0; } .xfolder .t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .xfolder small { color: var(--dim); font-size: 11.5px; }
.xrefmain { display: grid; gap: 12px; min-width: 0; }
.xdrop { min-height: 110px; }
.xthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.xthumbs.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 10px; }
.xthumb { position: relative; display: grid; gap: 4px; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.xthumb img, .xthumb video, .xthumb .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #1b1a20; display: grid; place-items: center; }
.xthumb small { font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xthumb .x { position: absolute; top: 6px; right: 6px; opacity: 0; }
.xthumb:hover .x { opacity: 1; }
.xthumb.pick { cursor: pointer; } .xthumb.pick:hover img { outline: 2px solid var(--accent); }
.xchips { display: flex; flex-wrap: wrap; gap: 6px; }
.xchip { height: 28px; padding: 0 11px; border-radius: 999px; border: 0; background: #27252d; color: #d2c9ed; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.xchip.on { background: var(--accent); color: var(--accent-ink); }
.fromlib { margin-top: 4px; height: 28px; font-size: 12px; }
.btn.danger { color: var(--bad); }

.xplist { display: grid; gap: 8px; margin-top: 10px; }
.xprompt { display: grid; gap: 6px; padding: 10px; border-radius: 11px; background: #1b1a20; }
.xprompt b { font-size: 13px; }
.xprompt pre { margin: 0; white-space: pre-wrap; font: 11.5px/1.45 ui-monospace, Consolas, monospace; color: var(--dim); max-height: 110px; overflow: hidden; }
.xprompt .acts { display: inline-flex; gap: 6px; }
.xprompt .btn.small { height: 26px; padding: 0 9px; font-size: 12px; }
.xcardimg { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.plib.mini { width: auto; height: 24px; padding: 0 8px; gap: 5px; display: inline-flex; font-size: 11.5px; font-weight: 600; background: #27252d; }
.plib svg { width: 14px; height: 14px; }

.shot-in { height: 34px; width: 130px; border-radius: 11px; border: 1px solid #2b2932; background: #1b1a20; color: var(--ink); padding: 0 10px; font: 13px var(--font); }
.shot-in::placeholder { color: #6e6e77; }
.queue-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: #27252d; color: #e4e4e8; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.queue-btn:hover { background: #34323c; color: var(--accent); }
.side-foot .shotrow { margin-bottom: 8px; }
.side-foot .shotrow .shot-in { flex: 1; width: auto; }

.xqlist { gap: 6px; }
.xqrow { display: grid; grid-template-columns: 26px 64px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 11px; background: var(--bg-2); }
.xqrow .n { color: var(--faint); font-weight: 700; text-align: center; }
.xqrow .thumb { width: 64px; height: 40px; border-radius: 8px; overflow: hidden; background: #1b1a20; display: grid; place-items: center; color: var(--faint); }
.xqrow .thumb img, .xqrow .thumb video { width: 100%; height: 100%; object-fit: cover; }
.xqrow .nm { display: grid; gap: 2px; min-width: 0; } .xqrow .nm small { color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xqrow .acts { display: flex; gap: 4px; }
.xqrow .mini, .xclip .mini { background: #27252d; }

.xreview { display: grid; gap: 18px; }
.xshot { display: grid; gap: 8px; }
.xtakes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.xtake { display: grid; gap: 6px; padding: 6px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.xtake.in { border-color: var(--accent); }
.xtake > :first-child { border-radius: 10px; overflow: hidden; }
.xtake .mini { background: #27252d; }
.xtimeline { position: sticky; top: calc(var(--top) + 8px); z-index: 5; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); }
.xtimeline input[type="text"] { max-width: 280px; }
.xclips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.xclip { display: flex; align-items: center; gap: 6px; flex: none; padding: 6px 8px; border-radius: 10px; background: var(--bg-2); font-size: 12.5px; }
.xclip .n { color: var(--accent); font-weight: 800; }
.xclip .grow { width: 6px; }
.xclip .mini { width: 24px; height: 24px; }
.xtake .mini.lime, .xqrow .mini.lime, .xclip .mini.lime { background: var(--accent); color: var(--accent-ink); }

/* ===================================================================== round 2: prompt writer, studio, timeline */
.small { font-size: 12px; }
.err { color: var(--bad); font-size: 12.5px; margin: 0; }
.xcard.inner { background: var(--bg-2); }
.xcard > summary { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: baseline; }
.xcard > summary::-webkit-details-marker { display: none; }
.xcard > summary::before { content: "▸"; color: var(--faint); }
.xcard[open] > summary::before { content: "▾"; }
.xgrid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.xf.inline { display: inline-flex; align-items: center; gap: 6px; }
.xf input[type="number"], .xcard input[type="number"] { background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 8px; padding: 6px 8px; font: inherit; }
.xchip.small { height: 24px; padding: 0 9px; font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; }
.xchip.small button { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; display: inline-grid; }
.xchip.small svg { width: 12px; height: 12px; }

.xmodal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 24px; backdrop-filter: blur(3px); }
.xmodal-card { width: min(1180px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.xmodal-head { position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 14px 18px; border-bottom: 1px solid var(--line); }
.xmodal-head h3 { margin: 0; display: flex; gap: 8px; align-items: center; font-size: 16px; }
.xmodal-body { padding: 16px 18px 20px; display: grid; gap: 10px; }
.xmodal-body .xprompt pre { max-height: none; }
.xpw { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .xpw { grid-template-columns: 1fr; } }
.xpw-in, .xpw-out { display: grid; gap: 10px; }
.xpw textarea, .xpw input[type="text"], .xpw select { width: 100%; background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 10px; padding: 9px 11px; font: 13.5px/1.5 var(--font); }
.xpw .xrow input[type="text"] { flex: 1; width: auto; }
.xresult { min-height: 420px; font: 12.5px/1.55 ui-monospace, Consolas, monospace !important; resize: vertical; }
.xpics { display: flex; gap: 8px; flex-wrap: wrap; }
.xpics figure { margin: 0; width: 86px; }
.xpics img { width: 86px; height: 64px; object-fit: cover; border-radius: 8px; }
.xpics figcaption { font-size: 10.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.xprojects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.xproject { display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.xproject:hover { border-color: var(--accent); }
.xproject b { font-size: 16px; }
.xproject small { color: #c6bee0; }
.studio-head { margin: 4px 0 16px; gap: 14px; }
.studio .tabs { margin: 0; }
.xboardbar { position: sticky; top: calc(var(--top) + 6px); z-index: 6; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); padding: 10px 14px; }
.xplan { padding: 8px 0; border-top: 1px solid var(--line); } .xplan p { margin: 4px 0 0; color: var(--dim); font-size: 12.5px; }
.xsegs { display: grid; gap: 10px; }
.xseg { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.xseg.approved { border-color: rgba(143, 224, 124, .45); }
.xseg-side { display: grid; gap: 4px; align-content: start; justify-items: center; }
.xseg-side .n { font: 800 18px var(--display); color: var(--accent); }
.xseg-side .mini { background: #27252d; width: 28px; height: 28px; }
.xseg-main { display: grid; gap: 8px; min-width: 0; }
.xseg-main input.title { flex: 1; min-width: 160px; font-weight: 700; font-size: 14px; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); color: var(--ink); padding: 4px 2px; }
.xseg-main textarea { width: 100%; background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: 13px/1.5 var(--font); resize: vertical; }
.xseg-main textarea.beats { min-height: 44px; }
.xseg-main .xrow input[type="text"] { flex: 1; min-width: 180px; background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 8px; padding: 6px 9px; font: inherit; }
.xprompt-d > summary { cursor: pointer; font-size: 12.5px; color: #d2c9ed; display: flex; gap: 8px; align-items: center; }
.xprompt-d[open] > summary { margin-bottom: 8px; }
.xprompt-d textarea { font: 12px/1.5 ui-monospace, Consolas, monospace; min-height: 140px; }
.xcheck.approve { color: var(--ok); font-weight: 700; }
.xsegtakes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.xtakecard { flex: none; width: 188px; display: grid; gap: 4px; padding: 5px; border-radius: 11px; background: var(--bg-2); border: 1px solid transparent; }
.xtakecard.on { border-color: var(--accent); }
.xtakecard video, .xtakecard .ph { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; background: #111; object-fit: cover; display: grid; place-items: center; color: var(--dim); font-size: 11.5px; }
.xtakecard .xpill { height: 18px; font-size: 10px; padding: 0 6px; }
.xtakecard .mini { width: 24px; height: 24px; background: #27252d; }
.xtakecard .mini.lime { background: var(--accent); color: var(--accent-ink); }
.xthumb.main img { outline: 2px solid var(--accent); }
.xthumb .mini.star { position: absolute; top: 6px; left: 6px; width: 26px; height: 26px; }
.xthumb .ph.audio { display: grid; gap: 6px; padding: 8px; aspect-ratio: auto; min-height: 120px; align-content: center; }
.xthumb .ph.audio audio { width: 100%; height: 28px; }

/* timeline */
.tl { display: grid; gap: 10px; }
.tl-top { display: grid; grid-template-columns: var(--bin-w, 280px) 8px minmax(0, 1fr) 8px var(--insp-w, 300px); gap: 2px; height: var(--top-h, clamp(380px, 56vh, 980px)); }
@media (max-width: 1100px) { .tl-top { grid-template-columns: 1fr; height: auto; } .tl-split { display: none; } }
.tl-bin, .tl-insp { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; min-height: 0; }
.tl-insp { display: block; overflow: auto; }
.tl-insp > * + * { margin-top: 10px; }
.tl-items { overflow: auto; display: grid; gap: 6px; align-content: start; }
.tl-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px; border-radius: 10px; background: var(--bg-2); cursor: grab; }
.tl-item:hover { outline: 1px solid #464350; }
.tl-item video, .tl-item .ph { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: #111; display: grid; place-items: center; }
.tl-item b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-item small { color: var(--dim); font-size: 10.5px; }
.tl-item .mini { width: 26px; height: 26px; background: #27252d; }
.tl-preview { background: #000; border-radius: 14px; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; border: 1px solid var(--line); }
.tl-video { width: 100%; height: 100%; object-fit: contain; background: #000; min-height: 200px; }
.tl-transport { padding: 8px 10px; background: var(--panel); }
.tl-time { font: 600 13px ui-monospace, Consolas, monospace; color: #e4e4e8; }
.tl-bar { padding: 0 4px; }
.tl-bar input[type="range"] { width: 200px; }
.tl-scroll { position: relative; overflow-x: auto; overflow-y: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 0 8px; user-select: none; }
.tl-ruler { position: relative; height: 24px; border-bottom: 1px solid var(--line); cursor: text; min-width: 100%; }
.tl-ruler span { position: absolute; top: 4px; font: 10.5px ui-monospace, Consolas, monospace; color: var(--faint); padding-left: 3px; border-left: 1px solid #333; height: 18px; }
.tl-lanes { display: grid; gap: 4px; padding-top: 6px; min-width: 100%; }
.tl-lane { position: relative; height: var(--lane-h, 62px); background: rgba(255, 255, 255, .02); border-top: 1px solid rgba(255, 255, 255, .03); }
.tl-lane.audio { height: calc(var(--lane-h, 62px) * .65); }
.tl-lane.over { background: var(--accent-soft); }
.tl-name { position: sticky; left: 0; z-index: 3; display: inline-block; font: 700 10px var(--font); color: var(--faint); padding: 3px 6px; background: var(--panel); border-radius: 0 0 6px 0; }
.tl-clip { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; overflow: hidden; cursor: grab; background: #2a1546; border: 1px solid #8a4dff; display: flex; align-items: flex-end; touch-action: none; }
.tl-clip.audio { background: #1d2c3d; border-color: #35618a; align-items: center; }
.tl-clip.sel { outline: 2px solid var(--accent); z-index: 4; }
.tl-clip video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; pointer-events: none; }
.tl-clip .lbl { position: relative; z-index: 1; font-size: 10.5px; font-weight: 700; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; pointer-events: none; }
.tl-clip .h { position: absolute; top: 0; bottom: 0; width: 8px; z-index: 2; cursor: ew-resize; background: rgba(255, 79, 207, .0); }
.tl-clip .h:hover { background: rgba(255, 79, 207, .5); }
.tl-clip .h.l { left: 0; } .tl-clip .h.r { right: 0; }
.tl-head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--pink); z-index: 8; pointer-events: none; }
.tl-head::before { content: ""; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--pink); }

/* ------------------------------------------------------------------ DotDotDot Studio: badge + Studio button */
@keyframes ffShine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.spin { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--accent); animation: ffSpin .8s linear infinite; vertical-align: -2px; }
@keyframes ffSpin { to { transform: rotate(360deg); } }
.pick-list { display: grid; gap: 2px; max-height: 300px; overflow: auto; }
.xrow.wrap { flex-wrap: wrap; }
.ai-panel input[type="text"], .ai-panel input[type="number"], .ai-panel select, .ai-panel textarea, .asst textarea, .cc input[type="text"], .clip-name, .mk textarea {
  background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 9px; padding: 7px 9px; font: 13px/1.45 var(--font); min-width: 0; }
.ai-panel textarea, .mk textarea { width: 100%; resize: vertical; }
.ai-panel select { width: 100%; }
.ai-panel .xf.inline select, .ai-panel .xf.inline input { width: auto; }

/* ------------------------------------------------------------------ studio: bin tabs, AI panel, timeline extras */
.tl-bin.wide { grid-column: span 1; }
.tl-bin { grid-template-rows: auto auto minmax(0, 1fr); }
.tl-bin.wide { grid-template-rows: auto minmax(0, 1fr); }
.bin-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.bin-tabs button[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); }
.bin-h { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 6px 2px 0; }
.tl-item img { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: #111; }
.ai-panel { display: grid; gap: 10px; align-content: start; overflow: auto; padding-right: 2px; min-height: 0; }
.ai-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ai-mode { min-height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: #b7afcf; font-size: 12px; font-weight: 600; cursor: pointer; }
.ai-mode:hover { color: var(--ink); border-color: #464350; }
.ai-mode.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.ai-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; }
.ai-slot { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px dashed #3b3844; background: var(--bg-2); display: grid; place-items: center; align-content: center; gap: 2px; cursor: pointer; overflow: hidden; text-align: center; }
.ai-slots.audio .ai-slot { aspect-ratio: 2.2; }
.ai-slot:hover, .ai-slot.over { border-color: var(--accent); background: var(--accent-soft); }
.ai-slot.has { border-style: solid; border-color: #3b3844; cursor: default; }
.ai-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ai-slot small { position: relative; z-index: 1; font-size: 10px; color: #d6cdf2; padding: 1px 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-slot.has small { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); padding: 8px 4px 3px; }
.ai-slot .plus { font-size: 18px; color: var(--dim); }
.ai-slot .ph { font-size: 20px; color: var(--violet); }
.ai-slot .x { position: absolute; top: 3px; right: 3px; z-index: 2; width: 22px; height: 22px; background: rgba(0, 0, 0, .65); }
.ai-opts { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.generate.wide { width: 100%; }
.tl-screen { position: relative; min-height: 0; display: grid; place-items: center; background: #000; }
.tl-screen > * { grid-area: 1 / 1; }
.tl-still { width: 100%; height: 100%; object-fit: contain; }
.tl-ph { display: grid; place-items: center; gap: 6px; color: var(--dim); text-align: center; padding: 20px; font-size: 13px; }
.tl-ruler .tick { position: absolute; top: 4px; font: 10.5px ui-monospace, Consolas, monospace; color: var(--faint); padding-left: 3px; border-left: 1px solid #333; height: 18px; }
.tl-marker { position: absolute; top: 0; width: 3px; height: 24px; border-radius: 2px; z-index: 5; cursor: pointer; transform: translateX(-1px); }
.tl-range { position: absolute; top: 0; bottom: 0; background: rgba(180, 156, 255, .12); border-left: 1px solid var(--violet); border-right: 1px solid var(--violet); pointer-events: none; z-index: 2; }
.tl-clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; pointer-events: none; }
.tl-clip.pending { background: repeating-linear-gradient(135deg, #1f1e25 0 8px, #26242c 8px 16px); border-color: #4b4b55; border-style: dashed; }
.tl-clip.failed { background: #3a1716; border-color: var(--bad); }
.tl-clip .prog { position: absolute; left: 6px; right: 6px; top: 6px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .12); z-index: 1; pointer-events: none; }
.tl-clip .prog i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .4s; }
.tl-clip .prog em { position: absolute; top: 6px; left: 0; font: 600 10px var(--font); font-style: normal; color: #ddd; }
.tl-render { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.insp-ai { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg-2); }
.clip-name { flex: 1; font-weight: 600; }
.mk-list { display: grid; gap: 6px; }
.mk { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 6px; align-items: start; }
.mk-t { border: 0; border-radius: 7px; background: #2e1f12; color: var(--warn); font: 600 11px ui-monospace, Consolas, monospace; padding: 6px 4px; cursor: pointer; display: grid; gap: 2px; text-align: center; }
.mk-t small { font: 600 9.5px var(--font); color: #d8d0b0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-a { display: grid; gap: 4px; }
.xproject video, .xproject img.thumb, .xproject .ph { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; background: #111; margin-bottom: 6px; display: grid; place-items: center; color: var(--faint); font-size: 26px; }
.xproject { position: relative; }
.xproject > .mini { position: absolute; top: 22px; right: 22px; background: rgba(0, 0, 0, .6); }

/* ------------------------------------------------------------------ assistant */
.asst { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; height: calc(100vh - var(--top) - 40px); padding-top: 18px; padding-bottom: 18px; }
@media (max-width: 860px) { .asst { grid-template-columns: 1fr; height: auto; } .asst-side { order: 2; } }
.asst-side { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; align-content: start; gap: 8px; overflow: auto; }
.asst-side h4 { margin: 8px 2px 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.btn.wide { width: 100%; }
.asst-chats { display: grid; gap: 2px; }
.asst-chat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: 9px; }
.asst-chat:hover, .asst-chat.on { background: var(--panel-2); }
.asst-chat .t { border: 0; background: transparent; text-align: left; padding: 7px 8px; cursor: pointer; font-size: 13px; display: grid; gap: 1px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.asst-chat .t small { color: var(--faint); font-size: 11px; }
.asst-chat .mini { opacity: 0; } .asst-chat:hover .mini { opacity: 1; }
.asst-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; min-height: 0; }
.asst-head { display: grid; gap: 10px; }
.asst-presets { flex-wrap: wrap; }
.asst-log { overflow: auto; display: grid; align-content: start; gap: 12px; padding: 4px 4px 4px 0; min-height: 240px; }
.msg { max-width: 860px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.msg p { margin: 0 0 8px; } .msg p:last-child { margin-bottom: 0; }
.msg.user { justify-self: end; background: #2a1430; border: 1px solid #5c2a68; white-space: pre-wrap; }
.msg.ai { background: var(--panel); border: 1px solid var(--line); }
.msg.ai h3 { font-size: 15px; margin: 10px 0 6px; } .msg.ai h4 { font-size: 13.5px; margin: 8px 0 4px; }
.msg.ai ul, .msg.ai ol { margin: 0 0 8px; padding-left: 22px; } .msg.ai li { margin: 2px 0; }
.msg.ai code { background: #0c0c0f; padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.msg .who { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--violet); margin-bottom: 6px; }
.msg.busy p { animation: ffPulse 1.4s ease-in-out infinite; }
@keyframes ffPulse { 50% { opacity: .45; } }
.msg .code { position: relative; margin: 6px 0 10px; }
.msg .code pre { margin: 0; padding: 12px 40px 12px 12px; background: #0b0b0e; border: 1px solid #27252d; border-radius: 10px; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.55 ui-monospace, Consolas, monospace; color: #e6e6ea; max-height: 420px; overflow: auto; }
.msg .code .mini { position: absolute; top: 6px; right: 6px; }
.msg .xthumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.asst-acts { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.asst-empty { display: grid; gap: 10px; justify-items: start; padding: 30px 6px; }
.asst-empty h3 { font: 800 22px var(--display); font-stretch: 118%; text-transform: uppercase; margin: 0; }
.asst-starters { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; width: 100%; }
.asst-starter { text-align: left; cursor: pointer; font-size: 13.5px; color: #dcdce2; padding: 14px; }
.asst-starter:hover { border-color: var(--accent); }
.asst-input { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: grid; gap: 8px; }
.asst-input textarea { width: 100%; resize: none; border: 0; background: transparent; padding: 4px; font-size: 14px; }
.asst-input textarea:focus { outline: none; }
.asst-attach { display: flex; gap: 6px; flex-wrap: wrap; } .asst-attach:empty { display: none; }
.asst-pic { position: relative; } .asst-pic img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; }
.asst-pic .mini { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; }
.xthumb.pick.on { outline: 2px solid var(--accent); }

/* ------------------------------------------------------------------ character creator */
.cc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .cc-grid { grid-template-columns: 1fr; } }
.cc-left { display: grid; gap: 12px; position: sticky; top: calc(var(--top) + 12px); }
@media (max-width: 1000px) { .cc-left { position: static; } }
.cc-stage { display: grid; gap: 8px; }
.cc-view { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 85%, rgba(255, 79, 207, .12), transparent 60%), radial-gradient(ellipse at 50% 0%, #27262e, #0c0c0f 75%); border: 1px solid var(--line-2); }
.cc-view img { width: 100%; height: 100%; object-fit: contain; }
.cc-view::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: 7%; height: 9%; border-radius: 50%; background: radial-gradient(rgba(255, 79, 207, .18), transparent 70%); pointer-events: none; }
.cc-view:not(.empty)::after { display: none; }
.cc-sil { font-size: 140px; color: #2d2c35; }
.cc-sil.small { font-size: 34px; display: grid; place-items: center; width: 100%; aspect-ratio: 1; background: var(--bg-2); border-radius: 10px; }
.cc-badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 8px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); font: 700 11px var(--font); letter-spacing: .05em; text-transform: uppercase; }
.cc-busy { position: absolute; inset: auto 12px 12px auto; display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .7); font-size: 12.5px; }
.cc-prompt { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; color: var(--dim); }
.cc-prompt summary { cursor: pointer; font-weight: 600; color: #c6bee0; }
.cc-prompt p { margin: 8px 0 2px; line-height: 1.55; }
.cc-roster { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 10px; }
.cc-chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.cc-char { border: 1px solid transparent; background: transparent; padding: 0; cursor: pointer; display: grid; gap: 4px; text-align: center; border-radius: 10px; }
.cc-char img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--bg-2); }
.cc-char small { font-size: 11px; color: #c6bee0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-char:hover img, .cc-char.on img { outline: 2px solid var(--accent); }
.cc-right { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: grid; }
.cc-tabs { display: grid; grid-template-columns: repeat(7, 1fr); background: #101013; border-bottom: 1px solid var(--line); }
.cc-tab { border: 0; background: transparent; color: var(--dim); display: grid; justify-items: center; gap: 4px; padding: 12px 4px 10px; cursor: pointer; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; position: relative; }
.cc-tab svg { font-size: 19px; }
.cc-tab:hover { color: var(--ink); background: #161519; }
.cc-tab.on { color: var(--accent); background: var(--panel); }
.cc-tab.on::after { content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.cc-panel { padding: 16px; display: grid; gap: 14px; align-content: start; max-height: calc(100vh - var(--top) - 240px); min-height: 420px; overflow: auto; }
.cc-field { display: grid; gap: 7px; }
.cc-field > label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cc-field .xchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-field input[type="text"] { width: 100%; }
.cc-swatches { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.cc-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .08); cursor: pointer; transition: transform .12s; }
.cc-sw:hover { transform: scale(1.12); }
.cc-sw.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); transform: scale(1.08); }
.cc-swatches .dim { font-size: 12px; margin-left: 4px; }
.cc-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.cc-style { border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 12px; padding: 0 0 8px; cursor: pointer; overflow: hidden; display: grid; gap: 2px; text-align: left; }
.cc-style img, .cc-style .cc-ph { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: grid; place-items: center; background: linear-gradient(160deg, #1e1d23, #131216); color: var(--faint); font-size: 22px; }
.cc-style b { font-size: 12.5px; padding: 6px 8px 0; } .cc-style small { font-size: 11px; color: var(--dim); padding: 0 8px; }
.cc-style:hover { border-color: #55555e; }
.cc-style.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cc-layouts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cc-layout { border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 12px; padding: 10px; cursor: pointer; display: grid; gap: 8px; text-align: left; font-size: 12.5px; }
.cc-layout.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cc-lay { display: grid; gap: 4px; height: 54px; }
.cc-lay i { background: #2b2a33; border-radius: 4px; }
.cc-lay.turnaround { grid-template-columns: repeat(3, 1fr) 1.2fr; } .cc-lay.turnaround i:last-child { background: linear-gradient(#2b2a33 0 45%, transparent 45% 55%, #2b2a33 55%); }
.cc-lay.turn3 { grid-template-columns: repeat(4, 1fr); }
.cc-lay.portrait { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr 1fr; }
.cc-lay.action { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; } .cc-lay.action i:first-child { grid-row: span 2; } .cc-lay.action i:nth-child(4) { display: none; }
.cc-bar { display: flex; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: #101013; flex-wrap: wrap; }
.cc-bar input[type="text"] { flex: 1; min-width: 160px; height: 40px; font-size: 14px; font-weight: 600; }
.cc-bar .generate { flex: 0 0 auto; }
.cc-style { align-content: start; }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.cc-bar .generate { height: 40px; margin-left: auto; }

/* ------------------------------------------------------------------ DotDotDot Studio brand */
body { background: radial-gradient(1200px 600px at 100% -10%, rgba(125, 77, 255, .10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(255, 79, 139, .07), transparent 60%), var(--bg); background-attachment: fixed; }
.logo { gap: 10px; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 0 18px rgba(240, 63, 224, .35); }
.logo .word { font: 800 15.5px/1 var(--display); font-stretch: 112%; letter-spacing: .01em; }
.logo .sub { font: 700 10px/1 var(--display); font-stretch: 125%; letter-spacing: .28em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-left: -2px; }
.btn.lime, .generate, .btn.lime.cta { background: var(--grad); color: #fff; text-shadow: 0 1px 2px rgba(40, 0, 40, .35); }
.btn.lime:hover, .generate:hover { background: var(--grad); filter: brightness(1.12) saturate(1.1); box-shadow: 0 6px 22px rgba(240, 63, 224, .32); }
.generate .cost { color: #fff; }
.studio-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 16px 0 13px; border-radius: 11px; overflow: hidden; isolation: isolate;
  font: 800 12.5px/1 var(--display); font-stretch: 118%; letter-spacing: .1em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 2px rgba(30, 0, 40, .4);
  background: var(--grad); background-size: 160% 100%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 4px 20px rgba(240, 63, 224, .35); transition: transform .15s var(--ease), box-shadow .2s, background-position .6s; }
.studio-btn svg { font-size: 16px; }
.studio-btn .glow { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%); transform: translateX(-120%); animation: ffShine 5s ease-in-out infinite; }
.studio-btn:hover { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 6px 26px rgba(125, 77, 255, .45); }
.studio-btn[aria-current="page"] { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 6px 26px rgba(240, 63, 224, .45); }
@media (prefers-reduced-motion: reduce) { .studio-btn .glow { animation: none; } }
@media (max-width: 760px) { .studio-btn .lbl { display: none; } .studio-btn { padding: 0 10px; } }
.nav-main a[aria-current="page"] { color: #fff; background: var(--grad-soft); }
.vbar > i, .xbar > i, .tl-clip .prog i { background: var(--grad); }
.tl-clip.video, .tl-lane.video .tl-clip { background: linear-gradient(180deg, #2a1546, #1e1236); border-color: #8a4dff; }
.tl-clip.audio { background: linear-gradient(180deg, #11263f, #0d1c30); border-color: #2f8fff; }
.tl-head { background: #ffb340; } .tl-head::before { border-top-color: #ffb340; }
.cc-view { background: radial-gradient(ellipse at 50% 85%, rgba(240, 63, 224, .16), transparent 60%), radial-gradient(ellipse at 50% 0%, #241c33, #0a0810 75%); }
.cc-view::after { background: radial-gradient(rgba(240, 63, 224, .25), transparent 70%); }
.cc-tab.on::after { background: var(--grad); }
.msg .who { color: var(--violet); }
:focus-visible { outline-color: var(--accent); }

.tl-split { position: relative; border-radius: 4px; cursor: col-resize; touch-action: none; }
.tl-split::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3px; height: 42px; transform: translate(-50%, -50%); border-radius: 3px; background: #2e2a3a; transition: background .15s, height .15s; }
.tl-split:hover::after, .tl-split.on::after { background: var(--grad); height: 70px; }
.tl-split.h { height: 10px; margin: 2px 0; cursor: row-resize; }
.tl-split.h::after { width: 56px; height: 3px; }
.tl-split.h:hover::after, .tl-split.h.on::after { width: 110px; height: 3px; }
.tl-bar input[type="range"] { width: 140px; }

/* character creator: turntable loader */
.cc-view.busy > img, .cc-view.busy > .cc-sil { filter: blur(6px) brightness(.45); }
.cc-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; background: radial-gradient(ellipse at 50% 60%, rgba(125, 77, 255, .18), transparent 65%); }
.cc-turn { position: relative; width: 150px; height: 230px; perspective: 600px; margin-bottom: 8px; }
.cc-apose { width: 100%; height: 100%; fill: url(#ccg); filter: drop-shadow(0 0 18px rgba(240, 63, 224, .55)); animation: ccSpin 3.2s linear infinite; transform-origin: 50% 50%; }
.cc-floor { position: absolute; left: 10%; right: 10%; bottom: -8px; height: 26px; border-radius: 50%; border: 2px solid rgba(240, 63, 224, .5); box-shadow: 0 0 24px rgba(47, 184, 255, .45), inset 0 0 18px rgba(240, 63, 224, .35); animation: ccPulse 1.6s ease-in-out infinite; }
@keyframes ccSpin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
@keyframes ccPulse { 50% { opacity: .5; transform: scale(.92); } }
.cc-loading b { font: 800 18px var(--display); font-stretch: 112%; letter-spacing: .02em; }
.cc-loading small { color: var(--dim); font-size: 12.5px; }
.cc-pbar { width: 240px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 8px; }
.cc-pbar i { display: block; height: 100%; border-radius: 4px; background: var(--grad); transition: width .6s; }
.cc-pbar i.indet { width: 35%; animation: ccIndet 1.3s ease-in-out infinite; }
@keyframes ccIndet { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .cc-apose, .cc-floor, .cc-pbar i.indet { animation: none; } }
.custom-btn { font-style: italic; }
.custom-ed .xrow input { background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 8px; padding: 6px 8px; font: inherit; }
.ai-modes.two { grid-template-columns: repeat(2, 1fr); }

/* ------------------------------------------------------------------ canvas (node graph per shot) */
.cv { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: 54px minmax(0, 1fr); background: #06050b; outline: none; }
.cv-top { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid #1b1824; background: rgba(10, 8, 16, .92); backdrop-filter: blur(12px); }
.cv-title { display: grid; line-height: 1.1; }
.cv-title b { font: 800 15px var(--display); font-stretch: 112%; }
.cv-title small { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.cv-zoombox { display: flex; align-items: center; gap: 4px; padding: 3px; border-radius: 10px; background: #12101a; border: 1px solid #221e2d; }
.cv-zoombox .mini { width: 28px; height: 28px; font-size: 15px; }
.cv-zoom { min-width: 46px; text-align: center; font: 600 12px ui-monospace, Consolas, monospace; color: var(--dim); }
.cv-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 0; }
.cv-pal { border-right: 1px solid #1b1824; padding: 14px 10px; display: grid; align-content: start; gap: 6px; overflow: auto; background: #09080f; }
.cv-pal h4 { margin: 0 4px 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cv-pal-item { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; padding: 9px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; }
.cv-pal-item:hover { background: #13111c; border-color: #2a2538; }
.cv-pal-item .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; background: #1a1724; }
.cv-pal-item b { display: block; font-size: 13px; } .cv-pal-item small { display: block; font-size: 11px; color: var(--faint); line-height: 1.3; }
.cv-pal .help { margin: 10px 4px 0; font-size: 11.5px; }
.cv-stage { position: relative; overflow: hidden; cursor: grab; background-color: #07060c; background-image: radial-gradient(circle, #24202f 1.1px, transparent 1.2px); touch-action: none; }
.cv-stage.panning { cursor: grabbing; }
.cv-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cv-wires { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.cv-wire { fill: none; stroke-width: 2.4; stroke-linecap: round; opacity: .95; }
.cv-wire.glow { stroke-width: 9; opacity: .16; filter: blur(3px); }
.cv-wire.sel { stroke-width: 4; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .55)); }
.cv-wire.temp { stroke: #fff; stroke-dasharray: 6 6; opacity: .75; }
.cv-wire.busy:not(.glow) { stroke-dasharray: 7 6; animation: cvFlow .6s linear infinite; }
/* the travelling light along every wire */
.cv-shine { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 7 93; opacity: .85; filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 9px rgba(240, 63, 224, .9)); animation: cvShine 2.4s linear infinite; pointer-events: none; }
.cv-shine.fast { animation-duration: .9s; stroke-dasharray: 12 38; }
@keyframes cvShine { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes cvFlow { to { stroke-dashoffset: -13; } }
@media (prefers-reduced-motion: reduce) { .cv-shine { animation: none; opacity: 0; } }
.cv-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.cv-node { position: absolute; width: 290px; border-radius: 16px; background: linear-gradient(180deg, #171421, #110f19); border: 1px solid #2a2538; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); cursor: default; }
.cv-node.sel { border-color: #6d55c7; box-shadow: 0 0 0 1px #6d55c7, 0 14px 50px rgba(125, 77, 255, .25); }
.cv-node.dragging { opacity: .92; }
.cv-node.type-aivideo, .cv-node.type-output { width: 320px; }
.cv-head { display: flex; align-items: center; gap: 8px; padding: 10px 10px 9px 12px; border-bottom: 1px solid #221e2d; cursor: grab; border-radius: 16px 16px 0 0; }
.cv-head b { font-size: 13px; }
.cv-head .ic { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; color: #fff; }
.tone-violet .ic { background: linear-gradient(135deg, #9b7bff, #6a3ba8); } .tone-orange .ic { background: linear-gradient(135deg, #ffb340, #ff4f8b); }
.tone-pink .ic { background: linear-gradient(135deg, #ff4f8b, #b13cff); } .tone-cyan .ic { background: linear-gradient(135deg, #3ad7ff, #2f6bff); }
.tone-grad .ic { background: var(--grad); }
.cv-node.type-output { border-color: transparent; background: linear-gradient(#141120, #141120) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.cv-head .mini { width: 24px; height: 24px; opacity: .6; } .cv-head .mini:hover { opacity: 1; }
.cv-run { width: 28px; height: 28px; border-radius: 9px; border: 0; display: grid; place-items: center; background: var(--grad); color: #fff; cursor: pointer; font-size: 12px; }
.cv-run:hover { filter: brightness(1.15); }
.cv-st { font: 600 10.5px var(--font); color: var(--dim); }
.cv-st.rendering, .cv-st.queued { color: #ffb340; } .cv-st.done { color: var(--ok); }
.cv-ports { display: grid; gap: 2px; padding: 8px 0 2px; }
.cv-ports.out { padding: 4px 0 10px; }
.cv-prow { position: relative; display: flex; align-items: center; gap: 8px; height: 22px; font-size: 11.5px; color: #b6afc9; }
.cv-prow.in { padding-left: 14px; } .cv-prow.out { justify-content: flex-end; padding-right: 14px; }
.cv-port { position: absolute; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #110f19; box-shadow: 0 0 0 1.5px currentColor; background: currentColor; cursor: crosshair; }
.cv-port.in { left: -7px; } .cv-port.out { right: -7px; }
.cv-port:hover { transform: scale(1.3); }
.cv-port.t-text { color: #9b7bff; } .cv-port.t-image { color: #ffb340; } .cv-port.t-video { color: #f03fe0; } .cv-port.t-audio { color: #2fb8ff; } .cv-port.t-media { color: #ff6fd8; }
.cv.wiring .cv-port.in { animation: cvPulse 1s ease-in-out infinite; }
@keyframes cvPulse { 50% { transform: scale(1.35); } }
.cv-bd { padding: 6px 12px 10px; display: grid; gap: 8px; }
.cv-ta { width: 100%; resize: vertical; background: #0b0a11; border: 1px solid #262132; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: 12.5px/1.5 var(--font); }
.cv-f { display: grid; gap: 3px; font-size: 11px; color: var(--faint); }
.cv-f select, .cv-f input { background: #0b0a11; border: 1px solid #262132; color: var(--ink); border-radius: 8px; padding: 6px 8px; font: 12.5px var(--font); width: 100%; }
.cv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cv-mode { justify-self: start; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--grad-soft); color: #f2d9ff; }
.cv-media, .cv-res, .cv-out { width: 100%; min-height: 120px; border-radius: 12px; border: 1px dashed #332d43; background: #0b0a11; display: grid; place-items: center; overflow: hidden; padding: 0; cursor: pointer; color: var(--faint); }
.cv-media.has, .cv-res, .cv-out { border-style: solid; border-color: #221e2d; cursor: default; }
.cv-media.has { cursor: pointer; }
.cv-media img, .cv-res img, .cv-res video, .cv-out img, .cv-out video { width: 100%; max-height: 220px; object-fit: contain; background: #000; display: block; }
.cv-res audio { width: 92%; }
.cv-media .empty, .cv-res .empty, .cv-out .empty { display: grid; justify-items: center; gap: 4px; font-size: 18px; padding: 16px; text-align: center; }
.cv-media small, .cv-res small, .cv-out small { font-size: 11.5px; }
.cv-res > small.dim { padding: 4px 0 6px; font-size: 11px; }
.cv-media .aud { display: grid; justify-items: center; gap: 4px; font-size: 20px; color: #2fb8ff; }
.cv-anchor { position: fixed; width: 1px; height: 1px; }
@media (max-width: 800px) { .cv-body { grid-template-columns: 1fr; } .cv-pal { display: none; } }

/* canvas: resizable nodes, frames, lightbox */
.cv-node { display: flex; flex-direction: column; }
.cv-node.sized .cv-bd { flex: 1; min-height: 0; grid-template-rows: auto; align-content: stretch; }
.cv-node.sized .cv-media, .cv-node.sized .cv-res, .cv-node.sized .cv-out { flex: 1; min-height: 0; height: 100%; }
.cv-node.sized .cv-media img, .cv-node.sized .cv-res img, .cv-node.sized .cv-res video, .cv-node.sized .cv-out img, .cv-node.sized .cv-out video { max-height: none; height: 100%; }
.cv-node.sized .cv-ta { height: 100%; min-height: 80px; }
.cv-node.sized.type-text .cv-bd, .cv-node.sized.type-image .cv-bd, .cv-node.sized.type-audio .cv-bd { display: flex; flex-direction: column; }
.cv-node.sized.type-aiimage .cv-bd, .cv-node.sized.type-aivideo .cv-bd, .cv-node.sized.type-aimusic .cv-bd, .cv-node.sized.type-writer .cv-bd, .cv-node.sized.type-output .cv-bd { display: flex; flex-direction: column; }
.cv-resize { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; cursor: nwse-resize; border-radius: 0 0 14px 0; background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, .22) 60%, transparent 60%, transparent 70%, rgba(255, 255, 255, .22) 70%, rgba(255, 255, 255, .22) 80%, transparent 80%); opacity: .5; }
.cv-node:hover .cv-resize, .cv-group:hover .cv-resize { opacity: 1; }
.cv-groups { position: absolute; left: 0; top: 0; }
.cv-group { position: absolute; border-radius: 22px; border: 1.5px solid color-mix(in srgb, var(--gc) 55%, transparent); background: color-mix(in srgb, var(--gc) 9%, transparent); }
.cv-group.sel { box-shadow: 0 0 0 2px color-mix(in srgb, var(--gc) 70%, transparent); }
.cv-ghead { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; cursor: grab; border-radius: 22px 22px 0 0; background: color-mix(in srgb, var(--gc) 18%, transparent); }
.cv-gtitle { background: transparent; border: 0; color: #fff; font: 800 16px var(--display); font-stretch: 112%; letter-spacing: .01em; min-width: 60px; width: 60%; padding: 2px 4px; border-radius: 6px; }
.cv-gtitle:focus { outline: none; background: rgba(0, 0, 0, .25); }
span.cv-gtitle { display: inline-block; width: auto; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; user-select: none; }
.cv-gtitle.editing { background: rgba(0, 0, 0, .35); outline: 1px solid #6d55c7; cursor: text; }
.cv-gcols { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.cv-group:hover .cv-gcols { opacity: 1; }
.cv-gcol { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); cursor: pointer; padding: 0; }
.cv-gcol.on { border-color: #fff; }
.tone-frame .ic { background: linear-gradient(135deg, #3a3550, #26223a); }
.cv-lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(4, 3, 8, .94); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 40px 40px 80px; cursor: zoom-out; outline: none; }
.cv-lightbox img, .cv-lightbox video { max-width: 100%; max-height: calc(100vh - 140px); border-radius: 12px; box-shadow: 0 20px 80px rgba(0, 0, 0, .6); cursor: default; }
.cv-lb-bar { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.cv-res img, .cv-res video, .cv-media.has img, .cv-out img, .cv-out video { cursor: zoom-in; }

/* Lab */
.lab-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 6px 0 26px; }
.lab-tab { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.lab-tab:hover { border-color: transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; transform: translateY(-1px); }
.lab-tab .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--grad-soft); color: #fff; }
.lab-tab b { display: block; font-size: 14px; } .lab-tab small { color: var(--dim); font-size: 12px; }
.gpu-more { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.btn.cv-open { background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.btn.cv-open:hover { background: var(--grad); color: #fff; }

.export-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); gap: 12px; align-items: start; max-width: 1500px; }
.export-grid > .xcard:first-child, .export-grid > .xcard:last-child { grid-column: 1 / -1; }
.export-grid .xcard input[type="text"], .export-grid .xcard select { max-width: 560px; }

.lib-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.lib-tools:empty { display: none; }
.lib-search { display: flex; align-items: center; gap: 8px; min-width: min(420px, 100%); padding: 0 12px; height: 38px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); color: var(--dim); }
.lib-search input { flex: 1; background: transparent; border: 0; color: var(--ink); font: inherit; outline: none; }

.start-card { background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.start-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); margin: 12px 0; overflow: hidden; } .start-bar i { display: block; height: 100%; background: var(--grad); }
.start-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.start-step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
a.start-step:hover { border-color: #4a4160; }
.start-step .tick { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #221e2d; color: var(--dim); }
.start-step.ok .tick { background: var(--grad); color: #fff; } .start-step.ok b { color: var(--dim); text-decoration: line-through; }
.start-step b { display: block; font-size: 13px; } .start-step small { color: var(--faint); font-size: 11.5px; }

.lora-box { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.lora-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.lora-row .lbl { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); }
.lora-row select { width: 100%; }

.quit-screen { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 8px; background: radial-gradient(ellipse at 50% 40%, rgba(125, 77, 255, .18), transparent 60%), var(--bg); }
.quit-screen b { font: 800 26px var(--display); font-stretch: 112%; } .quit-screen small { color: var(--dim); }

/* Studio button sits right after the logo: the first thing in the bar */
.topbar .studio-btn { height: 36px; padding: 0 18px 0 14px; margin-right: 6px; font-size: 13px; border-radius: 12px; }
.topbar .studio-btn[aria-current="page"] { box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 6px 26px rgba(240, 63, 224, .45); }
.nav-main a[href="#/lab"] { margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line-2); border-radius: 0 9px 9px 0; }

/* camera & look picker */
.lk-box { width: min(1100px, 100%); padding: 18px; display: grid; gap: 14px; }
.lk-head { display: flex; align-items: center; gap: 10px; } .lk-head h3 { margin: 0; display: flex; gap: 8px; align-items: center; } .lk-head .help { margin: 4px 0 0; }
.lk-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 4px; border-radius: 14px; background: var(--bg-2); }
.lk-tab { border: 0; border-radius: 10px; padding: 9px 6px; background: transparent; color: var(--dim); font-weight: 700; font-size: 13px; cursor: pointer; display: grid; gap: 2px; }
.lk-tab small { font-weight: 500; font-size: 10.5px; color: #e7b8ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-tab.on { background: var(--panel-3); color: #fff; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: 56vh; overflow: auto; padding: 2px; }
.lk-card { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 14px 10px 12px; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #17141f, #111018); cursor: pointer; transition: transform .12s, border-color .15s; }
.lk-card:hover { transform: translateY(-2px); border-color: #4a4160; }
.lk-card.on { border-color: transparent; background: linear-gradient(#1b1626, #1b1626) padding-box, var(--grad) border-box; box-shadow: 0 8px 28px rgba(240, 63, 224, .25); }
.lk-card b { font-size: 13px; } .lk-card small { font-size: 11px; color: var(--faint); }
.lk-cam { width: 64px; height: 46px; border-radius: 10px; background: #221d2e; display: grid; place-items: center; font-size: 22px; color: #fff; position: relative; }
.lk-cam small { position: absolute; bottom: 2px; font-size: 8px !important; letter-spacing: .08em; text-transform: uppercase; color: var(--dim) !important; }
.lk-lens { width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #4a4268, #120f1a 70%); border: 3px solid #39324c; display: grid; place-items: center; position: relative; }
.lk-lens i { position: absolute; inset: 9px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); }
.lk-lens b { font: 800 12px var(--display); color: #fff; }
.lk-film { width: 70px; height: 46px; border-radius: 8px; position: relative; overflow: hidden; }
.lk-film i { position: absolute; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .55) 0 6px, transparent 6px 10px); } .lk-film i:first-child { top: 2px; } .lk-film i:last-child { bottom: 2px; }
.lk-frame { width: 70px; height: 44px; border-radius: 6px; border: 2px solid #4a4160; position: relative; overflow: hidden; background: #15121d; }
.lk-frame i { position: absolute; left: 50%; bottom: 0; width: calc(var(--s) * .45); height: var(--s); transform: translateX(-50%); border-radius: 40% 40% 0 0; background: var(--grad); }
.lk-frame.tilt { transform: rotate(-10deg); } .lk-frame.low i { bottom: -8%; } .lk-frame.high i { bottom: 18%; }
.lk-move { width: 50px; height: 50px; border-radius: 14px; background: var(--grad-soft); display: grid; place-items: center; font-size: 22px; color: #fff; }
.lk-sum { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); font-size: 13px; color: #d9cfee; }
.look-chip { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; color: var(--ink); }
.look-chip:hover { border-color: #4a4160; } .look-chip b { font-size: 12.5px; } .look-chip small { display: block; color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.look-chip > span { min-width: 0; }

/* next shot dialog */
.ns-card { width: min(760px, 100%); }
.ns-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ns-opt { text-align: left; display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; color: var(--ink); }
.ns-opt b { font-size: 14px; } .ns-opt small { color: var(--dim); font-size: 12px; }
.ns-opt.on { border-color: transparent; background: linear-gradient(#1b1626, #1b1626) padding-box, var(--grad) border-box; }
.ns .xthumb small { display: block; font-size: 10.5px; color: var(--dim); text-align: center; }
.ns textarea { width: 100%; background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: 13px/1.5 var(--font); resize: vertical; }

/* storyboard */
.sb { display: grid; gap: 14px; }
.sb-head { padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; align-items: start; }
.sb-card { border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #16131f, #110f18); border: 1px solid var(--line-2); display: grid; }
.sb-card:hover { border-color: #463d5c; }
.sb-thumb { position: relative; aspect-ratio: 16 / 9; background: #0a0910; display: grid; place-items: center; overflow: hidden; }
.sb-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.sb-thumb .ph { display: grid; justify-items: center; gap: 6px; color: var(--faint); font-size: 22px; } .sb-thumb .ph small { font-size: 12px; }
.sb-n { position: absolute; top: 10px; left: 10px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 9px; display: grid; place-items: center; font: 800 13px var(--display); background: rgba(0, 0, 0, .65); backdrop-filter: blur(6px); }
.sb-v { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 8px; font-size: 11px; background: rgba(0, 0, 0, .6); color: #e7d8ff; }
.sb-body { padding: 12px; display: grid; gap: 8px; }
.sb-title { background: transparent; border: 0; color: #fff; font: 800 15px var(--display); font-stretch: 110%; padding: 2px 0; }
.sb-title:focus { outline: none; border-bottom: 1px solid var(--line-2); }
.sb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sb-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: #d9d3e8; font-size: 12px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-chip:hover { border-color: #5a4f72; }
.sb-note, .sb-prompt textarea { width: 100%; resize: vertical; background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 10px; padding: 8px 10px; font: 13px/1.5 var(--font); }
.sb-prompt summary { cursor: pointer; font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.sb-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sb-add { min-height: 260px; border-radius: 18px; border: 1.5px dashed #3a3350; background: transparent; color: var(--dim); display: grid; place-content: center; justify-items: center; gap: 8px; font-size: 22px; cursor: pointer; }
.sb-add b { font-size: 14px; } .sb-add:hover { border-color: #f03fe0; color: #fff; background: var(--grad-soft); }
.sb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.sb-cardpick { border: 1px solid transparent; border-radius: 12px; padding: 4px; background: var(--bg-2); cursor: pointer; display: grid; gap: 4px; color: var(--ink); }
.sb-cardpick img, .sb-cardpick .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; display: grid; place-items: center; background: #1c1826; }
.sb-cardpick small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-cardpick.on { border-color: #f03fe0; box-shadow: 0 0 0 2px rgba(240, 63, 224, .3); }

/* timeline trim handles: wider, with a grip, and a live length tip */
.tl-clip .h { width: 10px; background: rgba(255, 255, 255, .0); }
.tl-clip .h::after { content: ""; position: absolute; top: 50%; left: 50%; width: 3px; height: 40%; transform: translate(-50%, -50%); border-radius: 3px; background: rgba(255, 255, 255, .55); opacity: 0; transition: opacity .12s; }
.tl-clip:hover .h::after, .tl-clip.sel .h::after { opacity: 1; }
.tl-clip .h:hover { background: rgba(255, 255, 255, .18); }
.tl-clip.trimming { outline: 2px solid #ffb340; z-index: 6; }
.tl-tip { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; background: #ffb340; color: #1a0e00; font: 700 11px ui-monospace, Consolas, monospace; white-space: nowrap; pointer-events: none; z-index: 9; }
.tl-tip:empty { display: none; }
.tl-lane { overflow: visible; }

.sb-chip.on { border-color: transparent; background: linear-gradient(#1b1626, #1b1626) padding-box, var(--grad) border-box; color: #fff; }
.sb-refs { display: flex; gap: 6px; }
.sb-ref { display: grid; gap: 2px; width: 64px; } .sb-ref img { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; } .sb-ref small { font-size: 10px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lk-film { width: 74px; height: 50px; display: grid; place-items: center; }
.lk-fic { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 15px; backdrop-filter: blur(2px); }

/* the film workflow: three steps under the title */
.studio-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 12px 0 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); padding: 5px; position: relative; }
.studio-steps .step { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--dim); cursor: pointer; text-align: left; position: relative; }
.studio-steps .step + .step::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; border-top: 2px solid #3a3350; border-right: 2px solid #3a3350; transform: translateY(-50%) rotate(45deg); }
.studio-steps .step:hover { background: #18151f; color: var(--ink); }
.studio-steps .step[aria-selected="true"] { background: linear-gradient(#1d1828, #1d1828) padding-box, var(--grad) border-box; border: 1px solid transparent; color: #fff; }
.studio-steps .num { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--display); background: #221e2d; color: var(--dim); }
.studio-steps .step[aria-selected="true"] .num { background: var(--grad); color: #fff; }
.studio-steps .txt { display: grid; gap: 1px; min-width: 0; } .studio-steps .txt b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.studio-steps .txt small { font-size: 11.5px; color: var(--faint); }
@media (max-width: 760px) { .studio-steps .txt small { display: none; } }
.nav-main a[href="#/assistant"], .nav-main a[href="#/library"] { margin-left: 0; }
.nav-main a[href="#/refs"] { margin-right: 6px; }
.nav-main a[href="#/assistant"] { padding-left: 14px; border-left: 1px solid var(--line-2); border-radius: 0 9px 9px 0; }

/* assistant (redesign) */
.as { display: grid; grid-template-columns: 270px minmax(0, 1fr) 300px; gap: 16px; height: calc(100vh - var(--top) - 36px); padding-top: 16px; padding-bottom: 16px; max-width: none; }
@media (max-width: 1200px) { .as { grid-template-columns: 240px minmax(0, 1fr); } .as-ctx { display: none; } }
@media (max-width: 820px) { .as { grid-template-columns: 1fr; height: auto; } .as-side { order: 2; } }
.as-side, .as-ctx { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; align-content: start; gap: 8px; overflow: auto; }
.as-side h4, .as-ctx h4 { margin: 10px 2px 2px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.as-modes { display: grid; gap: 4px; }
.as-mode { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.as-mode .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #1d1927; font-size: 16px; color: #cfc4e8; }
.as-mode b { display: block; font-size: 13px; } .as-mode small { display: block; font-size: 11px; color: var(--faint); line-height: 1.3; }
.as-mode:hover { background: #18151f; }
.as-mode.on { background: linear-gradient(#1c1727, #1c1727) padding-box, var(--grad) border-box; }
.as-mode.on .ic { background: var(--grad); color: #fff; }
.as-chats { display: grid; gap: 2px; }
.as-chat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-radius: 9px; }
.as-chat .t { border: 0; background: transparent; color: #cfcbd9; text-align: left; padding: 6px 8px; font-size: 12.5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-chat:hover, .as-chat.on { background: #1a1722; } .as-chat .mini { opacity: 0; width: 22px; height: 22px; } .as-chat:hover .mini { opacity: 1; }
.as-main { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; min-height: 0; }
.as-top { display: flex; align-items: center; gap: 12px; } .as-top h2 { font-size: 28px; margin: 0; }
.as-llm { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.as-llm a { color: #ff7ddc; } .as-llm .dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6680; } .as-llm .dot.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); } .as-llm .dot.wait { background: #ffb340; } .as-llm .dot.off { background: var(--bad); }
.as-log { overflow: auto; display: grid; align-content: start; gap: 16px; padding: 6px 4px 6px 0; }
.as-hero { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 9vh 10px 20px; }
.as-hero-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 28px; color: #fff; background: var(--grad); box-shadow: 0 10px 40px rgba(240, 63, 224, .35); }
.as-hero h3 { margin: 10px 0 0; font: 800 26px var(--display); font-stretch: 112%; } .as-hero p { margin: 0; color: var(--dim); }
.as-sugs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; width: min(820px, 100%); margin-top: 18px; }
.as-sug { text-align: left; padding: 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel); color: #dcd6ea; font-size: 13px; cursor: pointer; }
.as-sug:hover { border-color: transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; }
.as-msg { max-width: min(900px, 92%); font-size: 14px; line-height: 1.6; }
.as-msg.user { justify-self: end; padding: 11px 15px; border-radius: 18px 18px 4px 18px; background: linear-gradient(135deg, #3a1f4d, #23264f); white-space: pre-wrap; }
.as-msg.user p { margin: 0; }
.as-msg.ai { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.as-av { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 15px; }
.as-bd { padding-top: 5px; min-width: 0; } .as-bd p { margin: 0 0 10px; } .as-bd h3 { font-size: 16px; margin: 14px 0 6px; } .as-bd h4 { margin: 10px 0 4px; }
.as-bd ul, .as-bd ol { margin: 0 0 10px; padding-left: 22px; } .as-bd code { background: #0c0b12; padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.as-code { position: relative; margin: 6px 0 12px; } .as-code pre { margin: 0; padding: 14px 44px 14px 14px; background: #0b0a11; border: 1px solid #262132; border-radius: 12px; white-space: pre-wrap; word-break: break-word; font: 12.5px/1.6 ui-monospace, Consolas, monospace; max-height: 460px; overflow: auto; }
.as-code .mini { position: absolute; top: 8px; right: 8px; }
.as-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.as-pics { display: flex; gap: 6px; margin-bottom: 6px; } .as-pics img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.as-typing { display: inline-flex; gap: 4px; vertical-align: middle; } .as-typing i { width: 7px; height: 7px; border-radius: 50%; background: #cfc4e8; animation: asDot 1.2s infinite; } .as-typing i:nth-child(2) { animation-delay: .15s; } .as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.as-composer { background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 8px; display: grid; gap: 6px; }
.as-composer:focus-within { border-color: transparent; background: linear-gradient(var(--panel), var(--panel)) padding-box, var(--grad) border-box; }
.as-row { display: flex; align-items: flex-end; gap: 8px; }
.as-row textarea { flex: 1; resize: none; border: 0; background: transparent; color: var(--ink); font: 14px/1.5 var(--font); padding: 8px 4px; max-height: 220px; }
.as-row textarea:focus { outline: none; }
.as-send { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--grad); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 16px; }
.as-send:disabled { opacity: .5; }
.as-attach { display: flex; gap: 6px; flex-wrap: wrap; } .as-attach:empty { display: none; }
.as-pic { position: relative; } .as-pic img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; } .as-pic .mini { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; }
.as-ctx select { width: 100%; background: var(--bg-2); border: 1px solid #2b2932; color: var(--ink); border-radius: 10px; padding: 8px; font: inherit; }
.as-film { display: grid; gap: 4px; } .as-film small { color: var(--dim); font-size: 12px; } .as-film .btn { justify-self: start; margin-top: 4px; }
.as-cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.as-castc { border: 1px solid transparent; border-radius: 10px; padding: 3px; background: var(--bg-2); display: grid; gap: 3px; cursor: pointer; color: var(--ink); }
.as-castc img, .as-castc .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: #1c1826; }
.as-castc small { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-castc.on { border-color: #f03fe0; box-shadow: 0 0 0 2px rgba(240, 63, 224, .3); }
.sb-angles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.sb-angles .opt { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 7px 9px; border-radius: 10px; }
.sb-cardpick video { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 9px; background: #1c1826; }

/* ---------------- Storyboard tab (boards.js) */
.bd-list { display: grid; gap: 22px; }
.bd-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 460px); gap: 24px; align-items: end; padding: 26px; border-radius: 22px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(240, 63, 224, .16), transparent 60%), radial-gradient(120% 140% at 100% 100%, rgba(47, 184, 255, .14), transparent 60%), var(--panel); border: 1px solid var(--line-2); }
.bd-hero h2 { font-size: 46px; margin: 0 0 8px; }
.bd-hero p { margin: 0; color: var(--dim); max-width: 70ch; }
.bd-new { display: grid; gap: 8px; }
.bd-new input { padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); }
@media (max-width: 860px) { .bd-hero { grid-template-columns: 1fr; } }
.bd-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.bd-card { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel); display: grid; transition: transform .2s var(--ease), border-color .2s; }
.bd-card:hover { transform: translateY(-2px); border-color: #4a3f60; }
.bd-card-img { aspect-ratio: 16 / 9; background: #0c0b12; display: grid; place-items: center; overflow: hidden; }
.bd-card-img img { width: 100%; height: 100%; object-fit: cover; }
.bd-card-img .ph { font-size: 34px; color: var(--faint); }
.bd-card-txt { padding: 12px 14px; display: grid; gap: 2px; }
.bd-del { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; background: rgba(0, 0, 0, .6); }
.bd-card:hover .bd-del { opacity: 1; }
.bd-del.danger { color: var(--bad); opacity: 1; }
.bd-empty { grid-column: 1 / -1; display: grid; place-items: center; gap: 6px; padding: 60px; border: 1px dashed var(--line-2); border-radius: 18px; color: var(--dim); font-size: 15px; }
.bd-empty svg { font-size: 34px; }

.bd { max-width: none; display: grid; gap: 14px; }
.bd-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.bd-name { font: 800 22px/1 var(--display); font-stretch: 118%; text-transform: uppercase; background: transparent; border: 1px solid transparent; color: var(--ink); padding: 6px 8px; border-radius: 8px; min-width: 120px; max-width: 340px; }
.bd-name:hover, .bd-name:focus { border-color: var(--line-2); background: var(--bg-2); outline: none; }
.bd-count { font-size: 12px; }
.bd-sel { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.bd-sel select { padding: 6px 8px; border-radius: 9px; background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2); }
.bd-main { display: grid; grid-template-columns: 220px minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
@media (max-width: 1250px) { .bd-main { grid-template-columns: 190px minmax(0, 1fr); } .bd-insp { grid-column: 1 / -1; } }
@media (max-width: 760px) { .bd-main { grid-template-columns: 1fr; } }
.bd-lib, .bd-insp { position: sticky; top: calc(var(--top) + 12px); max-height: calc(100vh - var(--top) - 24px); overflow: auto; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.bd-lib h4 { margin: 4px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.bd-libgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bd-libitem { position: relative; display: grid; gap: 4px; padding: 4px; border-radius: 11px; border: 1px solid transparent; background: var(--bg-2); cursor: grab; text-align: left; }
.bd-libitem:hover { border-color: var(--line-2); }
.bd-libitem.on { border-color: #f03fe0; box-shadow: 0 0 0 2px rgba(240, 63, 224, .25); }
.bd-libitem img, .bd-libitem .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: grid; place-items: center; background: #1c1826; }
.bd-libitem small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-libitem .tick { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #f03fe0; color: #fff; font-size: 12px; }

.bd-center { display: grid; gap: 10px; min-width: 0; }
.bd-sheet { padding: 18px; border-radius: 18px; background: linear-gradient(180deg, #17151e, #121018); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8); }
.bd-sheet-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 2px 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--line-2); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.bd-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .bd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bd-panel { display: grid; gap: 7px; padding: 8px; border-radius: 6px; background: #1a1822; border: 1px solid #2c2936; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.bd-panel:hover { border-color: #463f57; }
.bd-panel.sel { border-color: transparent; box-shadow: 0 0 0 2px #f03fe0, 0 0 0 5px rgba(240, 63, 224, .15); }
.bd-panel.drop { box-shadow: 0 0 0 2px var(--cyan); }
.bd-ptop { display: flex; align-items: center; gap: 6px; }
.bd-num { flex: none; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; display: grid; place-items: center; font: 800 12px var(--display); background: var(--grad); color: #160616; }
.bd-ptitle { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ink); font-weight: 600; padding: 4px; border-radius: 6px; }
.bd-ptitle:focus { background: var(--bg-2); outline: none; }
.bd-secs { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: var(--dim); }
.bd-secs input { width: 46px; padding: 3px 4px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); text-align: right; }
.bd-pic { position: relative; border-radius: 3px; overflow: hidden; background: #0b0a10; border: 2px solid #0b0a10; display: grid; place-items: center; }
.bd-pic.empty { background: repeating-linear-gradient(135deg, #14121a 0 10px, #17151e 10px 20px); border-color: #2a2733; }
.bd-pic img { width: 100%; height: 100%; object-fit: cover; }
.bd-pic .ph, .bd-busy { display: grid; place-items: center; gap: 4px; color: var(--faint); font-size: 12px; }
.bd-pic .ph svg { font-size: 22px; }
.bd-busy { position: absolute; inset: 0; background: rgba(8, 7, 12, .65); color: var(--ink); }
.bd-pic-acts { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.bd-pic.empty .bd-pic-acts, .bd-panel:hover .bd-pic-acts, .bd-panel.sel .bd-pic-acts { opacity: 1; transform: none; }
.bd-takes { margin-left: auto; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .65); }
.bd-desc { width: 100%; resize: vertical; min-height: 58px; padding: 6px 8px; border-radius: 4px; border: 1px solid #2a2733; color: var(--ink); font-size: 13px; line-height: 21px;
  background: repeating-linear-gradient(180deg, transparent 0 20px, rgba(255, 255, 255, .06) 20px 21px), #13111a; background-attachment: local; }
.bd-desc:focus { outline: none; border-color: #5a4f72; }
.bd-pfoot { display: flex; align-items: center; gap: 4px; min-height: 26px; flex-wrap: wrap; }
.bd-ref { width: 26px; height: 26px; border-radius: 50%; overflow: hidden; border: 2px solid #2e2a3a; flex: none; }
.bd-ref.prev { border-radius: 5px; border-color: #2fb8ff; }
.bd-ref img { width: 100%; height: 100%; object-fit: cover; }
.bd-tag { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: var(--panel-3); color: var(--dim); }
.bd-add { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 220px; border-radius: 6px; border: 1px dashed #3a3548; background: transparent; color: var(--dim); cursor: pointer; }
.bd-add:hover { color: var(--ink); border-color: #f03fe0; }
.bd-pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.bd-pg { min-width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel); cursor: pointer; font-weight: 600; }
.bd-pg.on { background: var(--grad); color: #160616; border-color: transparent; }
.bd-insp .xf textarea, .bd-insp .xf select { width: 100%; }
.bd-big { border-radius: 8px; overflow: hidden; background: #0b0a10; display: grid; place-items: center; }
.bd-big img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.bd-big .ph { color: var(--faint); font-size: 30px; }
.bd-takestrip { display: flex; gap: 6px; overflow-x: auto; }
.bd-take { flex: none; width: 64px; aspect-ratio: 16 / 9; padding: 0; border-radius: 6px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #000; }
.bd-take.on { border-color: #f03fe0; }
.bd-take img { width: 100%; height: 100%; object-fit: cover; }
.bd-refrow { display: grid; gap: 8px; }
.bd-refs { display: flex; gap: 8px; flex-wrap: wrap; }
.bd-refbig { display: grid; gap: 3px; width: 74px; font-size: 10.5px; color: var(--dim); }
.bd-refbig img { width: 74px; height: 74px; object-fit: cover; border-radius: 9px; }
.bd-refbig small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-prompt summary { cursor: pointer; color: var(--dim); font-size: 12px; }
.bd-prompt textarea { width: 100%; margin-top: 6px; }
.bd-tips ol { margin: 6px 0; padding-left: 18px; color: var(--dim); display: grid; gap: 6px; }
.bd-light { position: fixed; inset: 0; z-index: 200; background: rgba(4, 3, 8, .92); display: grid; place-items: center; cursor: zoom-out; padding: 30px; }
.bd-light img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 30px 90px rgba(0, 0, 0, .7); }
.bd-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 6px 0; }
@media (max-width: 700px) { .bd-models { grid-template-columns: 1fr; } }
.bd-exlist { display: grid; gap: 4px; max-height: 300px; overflow: auto; margin: 6px 0; }
.bd-exrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 9px; background: var(--bg-2); font-size: 13px; }
.bd-exrow.busy { box-shadow: inset 0 0 0 1px #f03fe0; }
.bd-exrow.ok small { color: var(--ok); }

/* timeline: storyboard shots waiting to render */
.tl-clip.draft { border-style: solid; border-color: #2fb8ff; background: #121a24; }
.tl-clip.draft img { opacity: .7; }
.tl-ready { position: absolute; top: 4px; right: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; padding: 1px 6px; border-radius: 999px; background: #2fb8ff; color: #04121c; font-weight: 700; z-index: 1; }
.insp-ai.draft { box-shadow: inset 0 0 0 1px rgba(47, 184, 255, .35); }
.dr-pics { display: flex; gap: 6px; flex-wrap: wrap; }
.dr-pic { display: grid; gap: 2px; width: 70px; font-size: 10px; color: var(--dim); }
.dr-pic img { width: 70px; height: 46px; object-fit: cover; border-radius: 6px; }
.dr-pic small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ Round 1 design system (shows, home, VFX, palette)
   One spacing scale (4/8/12/16/24/32/48), one radius set, one elevation set; the gradient is for primary actions only. */
:root { --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --elev-1: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -16px rgba(0,0,0,.7); --elev-2: 0 1px 0 rgba(255,255,255,.05) inset, 0 24px 60px -30px rgba(0,0,0,.85);
  --card: linear-gradient(180deg, #17151d, #121017); --card-line: #26232e; --hover-line: #3e3650; }

/* ---- page entrance and staggered cards */
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes shimmerX { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes glowDrift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(4%, -6%) scale(1.08); } }
main > .page { animation: pageIn .42s var(--ease) both; }
.sh-card, .ep-card, .vfx-card, .hm-tile, .hm-card, .bd-card { animation: cardIn .5s var(--ease) both; animation-delay: var(--d, 0ms); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---- buttons: a touch more depth */
.btn { transition: background .18s, box-shadow .18s, transform .12s, color .18s; }
.btn.lime { background: var(--grad); background-size: 140% 100%; color: #170616; box-shadow: 0 8px 24px -12px rgba(240, 63, 224, .7); }
.btn.lime:hover { background: var(--grad); background-size: 140% 100%; background-position: 100% 0; box-shadow: 0 10px 30px -10px rgba(240, 63, 224, .85); filter: brightness(1.06); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--hover-line); }

/* ---- top bar */
.topbar { gap: 14px; background: rgba(9, 9, 11, .72); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.topbar .studio-btn { display: none; }
.nav-main { position: relative; gap: 0; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05); }
.nav-main a { position: relative; z-index: 1; padding: 6px 12px; border-radius: 9px; transition: color .2s; }
.nav-main a:hover { background: transparent; color: var(--ink); }
.nav-main a[aria-current="page"] { color: #fff; }
.nav-glide { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 0; border-radius: 9px; background: linear-gradient(180deg, #2a2534, #1e1a27);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 6px 16px -8px rgba(240, 63, 224, .45); transition: transform .38s var(--ease), width .38s var(--ease), opacity .2s; opacity: 0; }
.nav-glide::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-cast { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: #c7bfe1; font-size: 13.5px; font-weight: 500; cursor: pointer; flex: none; transition: color .2s, background .2s; }
.nav-cast:hover, .nav-cast[aria-current="page"] { color: var(--ink); background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .06); }
.nav-cast .i-chevD { font-size: 12px; opacity: .6; }
.cast-menu { display: grid; gap: 2px; padding: 6px; width: 290px; }
.cast-opt { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; transition: background .15s; }
.cast-opt:hover { background: #221f2a; }
.cast-opt b { display: block; font-size: 13.5px; } .cast-opt small { color: var(--dim); font-size: 12px; }
.cast-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: #ffd1f4; font-size: 16px; flex: none; }
.nav-search { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 11px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .03); color: var(--dim); font-size: 13px; cursor: pointer; transition: border-color .2s, color .2s; }
.nav-search:hover { color: var(--ink); border-color: var(--hover-line); }
.nav-search kbd, .pal kbd { font: 600 10.5px var(--font); padding: 2px 6px; border-radius: 6px; background: #221f2a; color: #b9b1cf; border: 1px solid #2f2b3a; }
.mode-sw { display: flex; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.mode-sw button { border: 0; background: transparent; color: var(--dim); font: 600 12px var(--font); padding: 5px 10px; border-radius: 7px; cursor: pointer; transition: all .2s; }
.mode-sw button[aria-pressed="true"] { background: #2a2534; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.nav-ai { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: 13px; color: #ffe0f7;
  background: linear-gradient(#141218, #141218) padding-box, var(--grad) border-box; border: 1px solid transparent; transition: box-shadow .2s; }
.nav-ai:hover, .nav-ai[aria-current="page"] { box-shadow: 0 0 22px -6px rgba(240, 63, 224, .7); }
@media (max-width: 1500px) { .nav-search span, .nav-search kbd { display: none; } .nav-search { padding: 0 9px; } }
@media (max-width: 1280px) { .nav-cast span { display: none; } .mode-sw { display: none; } }
@media (max-width: 1080px) { .nav-main, .nav-cast { display: none; } .icon-btn.menu-btn { display: inline-grid; } }

/* ---- page header, section titles */
.phead { display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 6px 0 26px; }
.phead-txt { flex: 1; min-width: 280px; }
.phead h1 { font-size: clamp(34px, 3.4vw, 52px); margin: 0 0 8px; background: linear-gradient(180deg, #fff, #c9c2dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.phead p { margin: 0; color: var(--dim); max-width: 72ch; font-size: 15px; }
.phead-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.sec-title { font: 700 13px var(--font); text-transform: uppercase; letter-spacing: .12em; color: #b3abc8; margin: 0 0 14px; }
.sec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-row .sec-title { margin-bottom: 14px; }
.more { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 13px; }
.more:hover { color: var(--ink); }

/* ---- empty states and skeletons */
.estate { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; gap: 8px; padding: 56px 24px; border-radius: 20px;
  background: radial-gradient(60% 80% at 50% 0%, rgba(240, 63, 224, .07), transparent 70%), var(--card); border: 1px dashed #332e3f; animation: fadeIn .4s both; }
.estate-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; color: #ffd1f4; background: var(--grad-soft); box-shadow: 0 12px 30px -14px rgba(240, 63, 224, .6); margin-bottom: 4px; }
.estate b { font-size: 17px; } .estate p { margin: 0; color: var(--dim); max-width: 52ch; }
.estate-acts { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; grid-column: 1 / -1; }
.sk { border-radius: 18px; background: linear-gradient(90deg, #15131b 0, #1e1b26 50%, #15131b 100%); background-size: 800px 100%; animation: shimmerX 1.4s linear infinite; }
.sk-card { height: 220px; } .sk-show { height: 300px; } .sk-wide { height: 150px; } .sk-hero { height: 320px; grid-column: 1 / -1; }

/* ---- toasts */
.toast-host { top: auto; bottom: 22px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 11px 14px 11px 16px; border-radius: 14px; background: rgba(28, 26, 34, .92); backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9); animation: popIn .32s var(--ease) both; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.toast-act { border: 0; background: #2d2838; color: #ffd1f4; font: 600 12.5px var(--font); padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.toast-act:hover { background: #3a3348; }

/* ---- modals open with a little lift */
.xmodal { animation: fadeIn .2s backwards; }
.xmodal .xmodal-card { animation: popIn .3s var(--ease) both; }
.xmodal.out { opacity: 0; transition: opacity .18s; }

/* ---- Simple / Pro */
html:not(.pro) .pro-only { display: none !important; }
html.pro .simple-only { display: none !important; }
.pro-hint { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 12px; border: 1px dashed #3a3448; background: transparent; color: var(--dim); font-size: 12.5px; cursor: pointer; }
.pro-hint:hover { color: var(--ink); border-color: #f03fe0; }

/* ---- Home */
.home { display: grid; gap: 34px; }
.hm-hero { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(28px, 4vw, 56px); background: #100e15; border: 1px solid #221e2b; isolation: isolate; }
.hm-hero-glow { position: absolute; inset: -40% -10% auto auto; width: 70%; aspect-ratio: 1; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55;
  background: radial-gradient(circle at 30% 30%, rgba(255, 179, 64, .55), transparent 55%), radial-gradient(circle at 70% 60%, rgba(240, 63, 224, .55), transparent 55%), radial-gradient(circle at 40% 80%, rgba(47, 184, 255, .45), transparent 55%);
  animation: glowDrift 14s ease-in-out infinite; }
.hm-kicker { margin: 0 0 6px; color: #d8c9ff; font-weight: 600; letter-spacing: .04em; }
.hm-hero h1 { font-size: clamp(38px, 4.6vw, 72px); margin: 0 0 28px; max-width: 14ch; }
.hm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) { .hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .hm-tiles { grid-template-columns: 1fr; } }
.hm-tile { position: relative; display: grid; gap: 4px; justify-items: start; text-align: left; padding: 18px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .08); color: var(--ink);
  background: rgba(20, 18, 26, .7); backdrop-filter: blur(10px); cursor: pointer; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; overflow: hidden; }
.hm-tile::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; z-index: -1; }
.hm-tile.t1::before { background: linear-gradient(135deg, rgba(255, 179, 64, .22), transparent 70%); }
.hm-tile.t2::before { background: linear-gradient(135deg, rgba(255, 79, 139, .22), transparent 70%); }
.hm-tile.t3::before { background: linear-gradient(135deg, rgba(125, 77, 255, .25), transparent 70%); }
.hm-tile.t4::before { background: linear-gradient(135deg, rgba(47, 184, 255, .22), transparent 70%); }
.hm-tile:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .16); box-shadow: 0 24px 50px -28px rgba(0, 0, 0, .9); }
.hm-tile:hover::before { opacity: 1; }
.hm-tile-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; margin-bottom: 8px; background: rgba(255, 255, 255, .06); }
.hm-tile.t1 .hm-tile-ic { color: #ffc56b; } .hm-tile.t2 .hm-tile-ic { color: #ff7aa8; } .hm-tile.t3 .hm-tile-ic { color: #b199ff; } .hm-tile.t4 .hm-tile-ic { color: #6fd0ff; }
.hm-tile b { font-size: 16px; } .hm-tile small { color: var(--dim); font-size: 12.5px; }
.hm-tile-go { position: absolute; right: 16px; top: 18px; opacity: 0; transform: translateX(-6px); transition: all .25s var(--ease); color: var(--dim); }
.hm-tile:hover .hm-tile-go { opacity: 1; transform: none; }
.hm-cont { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .hm-cont { grid-template-columns: 1fr; } }
.hm-card { display: grid; grid-template-columns: 44% 1fr; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); transition: border-color .2s, transform .25s var(--ease); min-height: 150px; }
.hm-card:hover { border-color: var(--hover-line); transform: translateY(-2px); }
.hm-card.big { grid-template-columns: 52% 1fr; }
.hm-media { position: relative; background: #0b0a10; overflow: hidden; }
.hm-media img, .hm-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.hm-card:hover .hm-media img, .hm-card:hover .hm-media video { transform: scale(1.04); }
.hm-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 28px; }
.hm-txt { display: grid; align-content: center; gap: 4px; padding: 16px 18px; min-width: 0; }
.hm-txt b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #c9b8ff; }
.hm-next { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: #ffd1f4; }
.hm-renders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.hm-idle { display: flex; align-items: center; gap: 10px; color: var(--dim); padding: 16px 18px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-line); }
.hm-idle svg { color: var(--ok); }
.hm-render { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-line); }
.hm-render.on { border-color: rgba(240, 63, 224, .35); box-shadow: 0 0 0 1px rgba(240, 63, 224, .12), 0 14px 30px -20px rgba(240, 63, 224, .6); }
.hm-render-prev { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; }
.hm-render-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #1f1c27; color: #ffd1f4; flex: none; }
.hm-render.on .hm-render-ic svg { animation: pulse 1.4s infinite; }
.hm-render-txt { flex: 1; min-width: 0; display: grid; gap: 3px; }
.hm-render-txt b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-bar { height: 4px; border-radius: 4px; background: #24212c; overflow: hidden; }
.hm-bar i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width .6s var(--ease); }
.hm-more { align-self: center; color: var(--dim); }

/* ---- Shows */
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.sh-card { display: grid; border-radius: 20px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); transition: transform .3s var(--ease), border-color .25s, box-shadow .3s; text-align: left; color: var(--ink); }
.sh-card:hover { transform: translateY(-4px); border-color: var(--hover-line); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .95); }
.sh-cover { position: relative; aspect-ratio: 16 / 9; background: #0b0a10; overflow: hidden; }
.sh-cover img, .sh-cover video { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.sh-card:hover .sh-cover img, .sh-card:hover .sh-cover video { transform: scale(1.05); }
.sh-cover::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent, rgba(8, 7, 12, .85)); }
.sh-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #3c3549; font-size: 40px; background: radial-gradient(circle at 30% 20%, rgba(240, 63, 224, .12), transparent 60%), #0e0c13; }
.sh-eps { position: absolute; z-index: 1; left: 14px; bottom: 12px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.sh-txt { display: grid; gap: 4px; padding: 14px 16px 16px; }
.sh-txt b { font-size: 17px; } .sh-txt p { margin: 0; color: var(--dim); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-new, .ep-new { display: grid; place-items: center; align-content: center; gap: 10px; min-height: 240px; border-style: dashed; background: transparent; cursor: pointer; color: var(--dim); }
.sh-new:hover, .ep-new:hover { color: var(--ink); border-color: #f03fe0; }
.sh-new-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; background: var(--grad-soft); color: #ffd1f4; transition: transform .3s var(--ease); }
.sh-new:hover .sh-new-ic, .ep-new:hover .sh-new-ic { transform: rotate(90deg) scale(1.05); }
.show { display: grid; gap: 34px; }
.sh-hero { position: relative; overflow: hidden; border-radius: 28px; border: 1px solid #241f2d; min-height: 300px; display: flex; align-items: flex-end; isolation: isolate; background: #0f0d14; }
.sh-hero-bg { position: absolute; inset: 0; z-index: -2; }
.sh-hero-bg img, .sh-hero-bg video { width: 100%; height: 100%; object-fit: cover; filter: blur(2px) saturate(1.1); opacity: .45; transform: scale(1.04); }
.sh-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10, 9, 14, .96) 0%, rgba(10, 9, 14, .75) 45%, rgba(10, 9, 14, .3) 100%), linear-gradient(0deg, rgba(10, 9, 14, .9), transparent 60%); }
.sh-hero-in { display: grid; gap: 10px; padding: clamp(24px, 3vw, 44px); width: 100%; max-width: 980px; }
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--dim); font-size: 13px; width: fit-content; }
.crumb:hover { color: var(--ink); }
.sh-name { font-size: clamp(34px, 4vw, 60px); background: transparent; border: 1px solid transparent; color: var(--ink); padding: 2px 6px; margin-left: -7px; border-radius: 10px; width: 100%; }
.sh-name:hover, .sh-name:focus { border-color: rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25); outline: none; }
.sh-line { resize: none; overflow: hidden; background: transparent; border: 1px solid transparent; color: #d9d2ea; font: 400 16px/1.5 var(--font); padding: 4px 6px; margin-left: -7px; border-radius: 10px; max-width: 70ch; }
.sh-line:hover, .sh-line:focus { border-color: rgba(255, 255, 255, .1); background: rgba(0, 0, 0, .25); outline: none; }
.sh-stats { display: flex; gap: 22px; flex-wrap: wrap; color: var(--dim); font-size: 13.5px; margin: 4px 0 8px; }
.sh-stats b { color: var(--ink); font-size: 18px; margin-right: 2px; }
.sh-sec { display: grid; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.ep-card { display: grid; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); transition: transform .3s var(--ease), border-color .25s; color: var(--ink); text-align: left; }
.ep-card:hover { transform: translateY(-3px); border-color: var(--hover-line); }
.ep-cover { position: relative; aspect-ratio: 16 / 9; background: #0b0a10; overflow: hidden; }
.ep-cover img, .ep-cover video { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.ep-card:hover .ep-cover img, .ep-card:hover .ep-cover video { transform: scale(1.05); }
.ep-no { position: absolute; left: 12px; top: 12px; font: 800 12px var(--display); font-stretch: 118%; letter-spacing: .06em; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); }
.ep-flag { position: absolute; right: 10px; bottom: 10px; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: #2fb8ff; color: #04121c; }
.ep-txt { display: grid; gap: 6px; padding: 12px 14px 14px; }
.ep-txt b { font-size: 15px; }
.ep-bar { height: 4px; border-radius: 4px; background: #24212c; overflow: hidden; }
.ep-bar i { display: block; height: 100%; background: var(--grad); }
.sb-list { display: grid; gap: 8px; }
.sb-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--card-line); transition: border-color .2s, transform .2s; }
.sb-row:hover { border-color: var(--hover-line); transform: translateX(3px); }
.sb-row b { flex: 1; } .sb-row-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: #ffd1f4; }
.ep-badge { font: 800 12px var(--display); font-stretch: 118%; letter-spacing: .06em; padding: 4px 8px; border-radius: 8px; background: var(--grad-soft); color: #ffd1f4; }

/* ---- VFX */
.vfx { display: grid; gap: 30px; }
.vfx .phead { margin-bottom: 0; }
.vfx-chips { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; top: calc(var(--top) + 8px); z-index: 5; }
.vfx-chip { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(20, 18, 26, .8); backdrop-filter: blur(10px); border: 1px solid var(--card-line); transition: border-color .2s, color .2s; color: #cfc7e4; }
.vfx-chip:hover { border-color: #f03fe0; color: #fff; }
.vfx-sec { scroll-margin-top: calc(var(--top) + 60px); }
.vfx-sec .sec-title { margin-bottom: 2px; }
.vfx-sec .sec-row { margin-bottom: 14px; }
.vfx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.vfx-card { display: grid; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); transition: transform .3s var(--ease), border-color .25s, box-shadow .3s; }
.vfx-card:hover { transform: translateY(-3px); border-color: var(--hover-line); box-shadow: 0 26px 50px -32px rgba(125, 77, 255, .6); }
.vfx-media { aspect-ratio: 16 / 9; background: #0b0a10; overflow: hidden; }
.vfx-media .media, .vfx-media video, .vfx-media img { width: 100%; height: 100%; object-fit: cover; }
.vfx-ph { width: 100%; height: 100%; display: grid; place-items: center; color: #3c3549; font-size: 32px; }
.vfx-txt { display: grid; gap: 4px; padding: 13px 15px 15px; }
.vfx-txt b { font-size: 15px; } .vfx-txt small { color: var(--dim); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vfx-go { display: inline-flex; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: #c9b8ff; margin-top: 4px; opacity: .7; transition: opacity .2s, gap .2s; }
.vfx-card:hover .vfx-go { opacity: 1; gap: 6px; }

/* ---- Library */
.lib-types { margin-right: 6px; }
.mini.fav.on { color: #ffcf5a; }

/* ---- command palette and shortcut sheet */
.pal-ov { position: fixed; inset: 0; z-index: 300; background: rgba(5, 4, 9, .6); backdrop-filter: blur(6px); display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; animation: fadeIn .15s backwards; }
.pal-ov.out { opacity: 0; transition: opacity .15s; }
.pal { width: min(680px, 100%); border-radius: 18px; overflow: hidden; background: rgba(22, 20, 28, .96); border: 1px solid #2f2a3b; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(240, 63, 224, .08); animation: popIn .22s var(--ease) both; }
.pal-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #2a2634; color: var(--dim); font-size: 18px; }
.pal-in { flex: 1; border: 0; background: transparent; color: var(--ink); font: 400 17px var(--font); outline: none; }
.pal-list { max-height: min(58vh, 520px); overflow: auto; padding: 6px; }
.pal-group { padding: 10px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-size: 14px; }
.pal-item.on { background: #27222f; }
.pal-item kbd { opacity: 0; } .pal-item.on kbd { opacity: 1; }
.pal-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: #1f1b27; color: #d9c9ff; flex: none; }
.pal-item.on .pal-ic { background: var(--grad-soft); color: #ffd1f4; }
.pal-txt { flex: 1; min-width: 0; display: grid; }
.pal-txt small { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-empty { padding: 28px; text-align: center; color: var(--dim); }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid #2a2634; color: var(--faint); font-size: 12px; }
.pal-foot span { display: inline-flex; align-items: center; gap: 4px; }
.pal.sheet { width: min(900px, 100%); }
.pal.sheet .pal-top { font-size: 15px; color: var(--ink); }
.sheet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 18px; }
@media (max-width: 760px) { .sheet-grid { grid-template-columns: 1fr; } }
.sheet-col h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: #c9b8ff; }
.sheet-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #221f2a; font-size: 13px; color: #d4cde6; }
.sheet-keys { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* ---- render tray */
.tray-host { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; justify-items: end; gap: 10px; }
.tray { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border-radius: 999px; border: 1px solid #332d40; background: rgba(22, 20, 28, .92); backdrop-filter: blur(14px);
  color: var(--ink); cursor: pointer; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .9), 0 0 24px -10px rgba(240, 63, 224, .6); animation: popIn .35s var(--ease) both; }
.tray:hover { border-color: #f03fe0; }
.tray-ring { --p: 0; position: relative; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 700 10.5px var(--font);
  background: conic-gradient(#f03fe0 calc(var(--p) * 1%), #2a2634 0); }
.tray-ring::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #17151d; }
.tray-ring span { position: relative; }
.tray-txt { display: grid; text-align: left; line-height: 1.2; } .tray-txt b { font-size: 12.5px; } .tray-txt small { color: var(--dim); font-size: 11px; }
.tray-panel { width: 340px; max-height: 50vh; overflow: auto; padding: 8px; border-radius: 16px; border: 1px solid #2f2a3b; background: rgba(22, 20, 28, .96); backdrop-filter: blur(14px); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .95); animation: popIn .25s var(--ease) both; }
.tray-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 10px; font-size: 13px; }
.tray-head a { color: #c9b8ff; font-size: 12.5px; }
.tray-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.tray-row.on { background: #1f1b27; }
.tray-row img { width: 54px; height: 34px; object-fit: cover; border-radius: 6px; }
.tray-row > div { flex: 1; min-width: 0; display: grid; gap: 4px; }
.tray-row b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tray-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #1f1b27; color: #ffd1f4; flex: none; }

/* ---- cards that already existed get the same surface */
.xcard { background: var(--card); border-color: var(--card-line); }

/* ================================================================ Canvas v2: premium node editor */
.cv { grid-template-rows: 58px minmax(0, 1fr); background: #050409; }
.cv-top { gap: 12px; padding: 0 14px; background: linear-gradient(180deg, rgba(14, 12, 20, .96), rgba(10, 9, 15, .92)); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.cv-back { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 10px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); color: var(--ink); font-weight: 600; cursor: pointer; transition: all .2s; }
.cv-back:hover { border-color: #f03fe0; background: rgba(240, 63, 224, .08); transform: translateX(-2px); }
.cv-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cv-crumb small { color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 30vw; }
.cv-crumb svg { color: var(--faint); font-size: 12px; }
.cv-crumb b { font: 800 16px var(--display); font-stretch: 112%; text-transform: uppercase; letter-spacing: .01em; }
.cv-mode-sw { margin-right: 4px; }
.cv-tb { min-width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: #cfc7e4; cursor: pointer; font-size: 15px; display: grid; place-items: center; }
.cv-tb:hover { background: #221e2d; color: #fff; }
.cv-render { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px 0 16px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--grad); background-size: 200% 100%; color: #170616; font: 800 13.5px var(--font); letter-spacing: .02em; box-shadow: 0 10px 30px -12px rgba(240, 63, 224, .9); transition: background-position .5s, transform .15s, box-shadow .3s; }
.cv-render:hover { background-position: 100% 0; box-shadow: 0 14px 40px -10px rgba(240, 63, 224, 1); }
.cv-render:active { transform: scale(.98); }
.cv-render-glow { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); }
.cv-render:hover .cv-render-glow, .cv-render.going .cv-render-glow { animation: cvSweep 1.4s ease-in-out infinite; }
@keyframes cvSweep { to { transform: translateX(120%); } }
.cv-render:disabled { opacity: .7; cursor: progress; }

.cv-body { grid-template-columns: 248px minmax(0, 1fr); }
.cv-pal { padding: 12px 10px; gap: 4px; background: linear-gradient(180deg, #0b0a11, #08070d); border-right: 1px solid rgba(255, 255, 255, .05); align-content: start; }
.cv-pal-q { width: 100%; padding: 9px 12px; border-radius: 11px; border: 1px solid #241f2e; background: #0f0d15; color: var(--ink); margin-bottom: 6px; }
.cv-pal-q:focus { outline: none; border-color: #6d55c7; }
.cv-pal-list { display: grid; gap: 3px; }
.cv-pal-cat { margin: 10px 6px 4px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cv-pal-item { grid-template-columns: 32px minmax(0, 1fr); padding: 7px 8px; border-radius: 11px; transition: background .15s, border-color .15s, transform .15s; cursor: grab; }
.cv-pal-item:hover { transform: translateX(2px); }
.cv-pal-item .ic { width: 32px; height: 32px; border-radius: 10px; font-size: 15px; }
.cv-pal-item .tx small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cv-pal-help { margin: 12px 6px 0; font-size: 11.5px; color: var(--faint); line-height: 1.5; }
.cat-in .ic { background: rgba(62, 197, 255, .12); color: #7fd8ff; } .cat-ai .ic { background: rgba(169, 139, 255, .14); color: #c4b0ff; }
.cat-render .ic { background: rgba(255, 95, 216, .13); color: #ff9ce6; } .cat-finish .ic { background: rgba(63, 211, 176, .12); color: #7fe8cf; }
.cat-out .ic { background: rgba(255, 194, 74, .14); color: #ffd27a; } .cat-util .ic { background: rgba(255, 255, 255, .06); color: #c9c2dc; }

/* stage: two dot layers with parallax and a soft vignette */
.cv-stage { background: #06050a; background-image: none; }
.cv-bg1, .cv-bg2 { position: absolute; inset: 0; pointer-events: none; }
.cv-bg1 { background-image: radial-gradient(circle, rgba(255, 255, 255, .11) 1px, transparent 1.3px); }
.cv-bg2 { background-image: radial-gradient(circle, rgba(169, 139, 255, .05) 1.5px, transparent 2px); background-size: 96px 96px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%); }
.cv-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%); }
.cv-marquee { position: absolute; z-index: 5; border: 1px solid rgba(169, 139, 255, .8); background: rgba(125, 77, 255, .12); border-radius: 6px; pointer-events: none; }
.cv-minimap { position: absolute; z-index: 6; right: 16px; bottom: 16px; width: 220px; height: 140px; border-radius: 14px; background: rgba(12, 10, 18, .82); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 16px 40px -20px #000; cursor: pointer; }

/* nodes: glass cards with a coloured top edge */
.cv-node { width: 300px; border-radius: 18px; background: linear-gradient(180deg, rgba(28, 25, 38, .92), rgba(17, 15, 25, .94)); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .07); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 24px 60px -28px rgba(0, 0, 0, .9); transition: box-shadow .25s, border-color .25s, transform .2s; }
.cv-node::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px; border-radius: 2px; opacity: .9; }
.cv-node.cat-in::before { background: linear-gradient(90deg, transparent, #3ec5ff, transparent); }
.cv-node.cat-ai::before { background: linear-gradient(90deg, transparent, #a98bff, transparent); }
.cv-node.cat-render::before { background: linear-gradient(90deg, transparent, #ff5fd8, transparent); }
.cv-node.cat-finish::before { background: linear-gradient(90deg, transparent, #3fd3b0, transparent); }
.cv-node.cat-util::before { background: linear-gradient(90deg, transparent, #8a8597, transparent); }
.cv-node.sel { border-color: rgba(169, 139, 255, .6); box-shadow: 0 0 0 1px rgba(169, 139, 255, .5), 0 0 40px -6px rgba(125, 77, 255, .55), 0 24px 60px -28px rgba(0, 0, 0, .9); }
.cv-node.busy { animation: cvBreath 2.2s ease-in-out infinite; }
@keyframes cvBreath { 0%, 100% { box-shadow: 0 0 0 1px rgba(255, 95, 216, .3), 0 0 24px -8px rgba(255, 95, 216, .5); } 50% { box-shadow: 0 0 0 1px rgba(255, 95, 216, .6), 0 0 44px -6px rgba(255, 95, 216, .8); } }
.cv-node.born { animation: cvBorn .38s cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes cvBorn { from { opacity: 0; transform: scale(.85) translateY(8px); } to { opacity: 1; transform: none; } }
.cv-node.dragging { transform: scale(1.015); box-shadow: 0 40px 80px -30px #000; z-index: 3; }
.cv-node.type-aivideo, .cv-node.type-output, .cv-node.type-rewriter, .cv-node.type-writer, .cv-node.type-takes, .cv-node.type-qc { width: 330px; }
.cv-node.type-note { background: linear-gradient(180deg, rgba(255, 210, 122, .14), rgba(255, 179, 64, .08)); border-color: rgba(255, 194, 74, .25); }
.cv-head { gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.cv-head .ic { width: 28px; height: 28px; border-radius: 9px; font-size: 14px; flex: none; position: relative; }
.cv-head .cv-title { display: block; flex: 1; min-width: 40px; background: transparent; border: 1px solid transparent; color: var(--ink); font: 700 13px var(--font); padding: 3px 5px; border-radius: 7px; text-overflow: ellipsis; }
.cv-head .cv-title:hover { border-color: rgba(255, 255, 255, .08); }
.cv-head .cv-title:focus { outline: none; background: rgba(0, 0, 0, .3); border-color: #6d55c7; cursor: text; }
.cv-head .grow { flex: 0; }
.cv-x { width: 24px; height: 24px; border-radius: 7px; border: 0; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.cv-node:hover .cv-x, .cv-group:hover .cv-x { opacity: 1; } .cv-x:hover { color: var(--bad); background: rgba(255, 107, 94, .12); }
.cv-run { width: 30px; height: 30px; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(240, 63, 224, .9); transition: transform .15s; }
.cv-run:hover { transform: scale(1.08); }
.cv-st { font: 700 10.5px var(--font); padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .05); white-space: nowrap; }
.cv-st:empty { display: none; }
.cv-st.rendering, .cv-st.queued { color: #ffd27a; background: rgba(255, 179, 64, .12); }
.cv-st.done { color: #9cf0a3; background: rgba(143, 224, 124, .1); }
.cv-st.failed { color: #ff8f86; background: rgba(255, 107, 94, .12); }
.cv-ring { --p: 0; position: absolute; inset: 0; border-radius: 9px; background: conic-gradient(#ff5fd8 calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); animation: cvSpin 1.6s linear infinite; }
.cv-ring::after { content: ""; position: absolute; inset: 3px; border-radius: 7px; background: #15121e; }
@keyframes cvSpin { to { filter: hue-rotate(60deg); } }
.cv-prow { height: 24px; font-size: 11.5px; color: #a49cbb; }
.cv-prow.on { color: #e9e3f7; }
.cv-port { width: 14px; height: 14px; border: 3px solid #120f1a; transition: transform .15s, box-shadow .15s; }
.cv-port.t-any { color: #c9c2dc; }
.cv-prow.on .cv-port { box-shadow: 0 0 0 1.5px currentColor, 0 0 10px currentColor; }
.cv.wiring .cv-port.in { animation: none; opacity: .35; }
.cv.wiring .cv-port.in.ok { opacity: 1; animation: cvPulse 1s ease-in-out infinite; transform: scale(1.25); }
.cv-reroute { width: 26px !important; height: 26px; border-radius: 50%; padding: 0; display: grid; place-items: center; background: #1b1724; cursor: grab; }
.cv-reroute::before { display: none; }
.cv-reroute .cv-prow { position: absolute; inset: 0; height: auto; padding: 0; }
.cv-reroute .cv-port.in { left: -4px; top: 6px; } .cv-reroute .cv-port.out { right: -4px; top: 6px; }
.cv-bd { padding: 8px 12px 12px; gap: 9px; }
.cv-ta { background: rgba(5, 4, 9, .6); border-color: rgba(255, 255, 255, .07); border-radius: 11px; transition: border-color .2s; }
.cv-ta:focus { outline: none; border-color: #6d55c7; }
.cv-result { border-color: rgba(169, 139, 255, .25); background: rgba(125, 77, 255, .06); }
.cv-f select, .cv-f input[type="text"], .cv-f input[type="number"] { background: rgba(5, 4, 9, .6); border-color: rgba(255, 255, 255, .07); border-radius: 9px; }
.cv-f input[type="range"] { padding: 0; accent-color: #f03fe0; }
.cv-mode { display: inline-flex; align-items: center; gap: 5px; }
.cv-hint { margin: 0; font-size: 11px; color: var(--faint); line-height: 1.45; }
.cv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .04); color: var(--ink); font: 600 12px var(--font); cursor: pointer; }
.cv-btn:hover:not(:disabled) { border-color: #f03fe0; }
.cv-btn:disabled { opacity: .45; cursor: not-allowed; }
.cv-media, .cv-res, .cv-out { border-radius: 13px; background: rgba(5, 4, 9, .6); border-color: rgba(255, 255, 255, .08); }
.cv-vers { position: absolute; right: 8px; bottom: 6px; font-size: 10.5px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #ddd; }
.cv-res { position: relative; }
.cv-pulse { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #ff5fd8 0 30%, transparent 32%); box-shadow: 0 0 0 0 rgba(255, 95, 216, .6); animation: cvPing 1.4s ease-out infinite; }
@keyframes cvPing { to { box-shadow: 0 0 0 18px rgba(255, 95, 216, 0); } }
.cv-look { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(5, 4, 9, .6); color: var(--ink); text-align: left; cursor: pointer; }
.cv-look:hover { border-color: #3ec5ff; }
.cv-look small { display: block; color: var(--dim); font-size: 11.5px; }
.cv-cast-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 210px; overflow: auto; }
.cv-cast-it { display: grid; gap: 3px; padding: 3px; border-radius: 10px; border: 1px solid transparent; background: rgba(5, 4, 9, .6); cursor: pointer; color: var(--ink); }
.cv-cast-it img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; }
.cv-cast-it small { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-cast-it.on { border-color: #3ec5ff; box-shadow: 0 0 0 2px rgba(62, 197, 255, .3); }
.cv-take-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cv-take { position: relative; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: #000; cursor: pointer; aspect-ratio: 16 / 9; }
.cv-take img, .cv-take video { width: 100%; height: 100%; object-fit: cover; }
.cv-take.on { border-color: #3fd3b0; box-shadow: 0 0 18px -4px rgba(63, 211, 176, .8); }
.cv-take-n { position: absolute; left: 6px; top: 6px; font: 700 10.5px var(--font); padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .65); }
.cv-takes, .cv-qc { display: grid; gap: 8px; }
.cv-takes .empty, .cv-qc .empty { display: grid; justify-items: center; gap: 4px; padding: 16px; color: var(--faint); border: 1px dashed rgba(255, 255, 255, .1); border-radius: 12px; }
.cv-qc-score { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: rgba(5, 4, 9, .6); }
.cv-qc-score > b { font: 800 26px var(--display); } .cv-qc-score > b.ok { color: #9cf0a3; } .cv-qc-score > b.bad { color: #ff8f86; }
.cv-qc-score > span { font-size: 12px; color: var(--dim); }
.cv-qc-bars { display: grid; gap: 5px; }
.cv-qc-bars div { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 6px; font-size: 11px; color: var(--dim); }
.cv-qc-bars i { height: 5px; border-radius: 5px; background: linear-gradient(90deg, #3fd3b0 var(--v), rgba(255, 255, 255, .08) var(--v)); }
.cv-qc-score ul { margin: 0; padding-left: 16px; font-size: 11.5px; color: #d9d2ea; }
.cv:not(.cv-pro) .cv-pro-only { display: none !important; }
.cv-wire { stroke-width: 2.6; }
.cv-wire.temp { stroke-dasharray: 5 7; opacity: .9; filter: drop-shadow(0 0 6px currentColor); }

/* quick add */
.cv-qa { position: fixed; z-index: 120; width: 320px; border-radius: 16px; background: rgba(20, 18, 27, .97); border: 1px solid #2f2a3b; box-shadow: 0 30px 80px -24px #000, 0 0 0 1px rgba(169, 139, 255, .1); overflow: hidden; animation: popIn .2s var(--ease) both; }
.cv-qa-in { width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid #2a2634; background: transparent; color: var(--ink); font: 14px var(--font); outline: none; }
.cv-qa-list { max-height: 320px; overflow: auto; padding: 5px; }
.cv-qa-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.cv-qa-item.on, .cv-qa-item:hover { background: #27222f; }
.cv-qa-item .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.cv-qa-item b { display: block; font-size: 13px; } .cv-qa-item small { display: block; font-size: 11px; color: var(--dim); }

/* starting layouts */
.cv-presets { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px; background: radial-gradient(ellipse at 50% 30%, rgba(125, 77, 255, .14), transparent 60%), rgba(5, 4, 9, .82); backdrop-filter: blur(8px); animation: fadeIn .25s both; overflow: auto; }
.cv-presets-in { width: min(980px, 100%); display: grid; gap: 10px; justify-items: center; text-align: center; }
.cv-presets h2 { font-size: clamp(28px, 3vw, 44px); margin: 0; }
.cv-presets p { margin: 0 0 12px; color: var(--dim); }
.cv-presets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; width: 100%; }
.cv-preset { display: grid; justify-items: start; gap: 4px; text-align: left; padding: 16px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .08); background: linear-gradient(180deg, rgba(28, 25, 38, .9), rgba(17, 15, 25, .9)); color: var(--ink); cursor: pointer;
  animation: cardIn .45s var(--ease) both; animation-delay: var(--d); transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.cv-preset:hover { transform: translateY(-3px); border-color: rgba(240, 63, 224, .5); box-shadow: 0 20px 40px -24px rgba(240, 63, 224, .7); }
.cv-preset-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--grad-soft); color: #ffd1f4; margin-bottom: 6px; }
.cv-preset b { font-size: 14.5px; } .cv-preset small { color: var(--dim); font-size: 12px; }

/* timeline: + Add, placeholders, media actions */
.add-btn { background: linear-gradient(#1a1722, #1a1722) padding-box, var(--grad) border-box; border: 1px solid transparent; font-weight: 700; }
.add-btn:hover { box-shadow: 0 0 20px -6px rgba(240, 63, 224, .7); }
.add-menu { display: grid; gap: 2px; padding: 6px; width: 300px; }
.add-h { padding: 6px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.add-opt { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s; }
.add-opt:hover { background: #221f2a; }
.add-opt b { display: block; font-size: 13.5px; } .add-opt small { display: block; font-size: 12px; color: var(--dim); }
.add-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; flex: none; background: var(--grad-soft); color: #ffd1f4; }
.add-opt.c1 .add-ic { color: #ff9ce6; } .add-opt.c2 .add-ic { color: #ffc56b; } .add-opt.c3 .add-ic { color: #7fd8ff; } .add-opt.c4 .add-ic { color: #7fe8cf; } .add-opt.c5 .add-ic { color: #c4b0ff; }
.add-sep { height: 1px; background: #26222f; margin: 4px 8px; }
.tl-clip.empty { background: repeating-linear-gradient(135deg, rgba(240, 63, 224, .06) 0 8px, rgba(240, 63, 224, .02) 8px 16px); border: 1.5px dashed rgba(240, 63, 224, .55); }
.tl-setup { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -60%); display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #ffd1f4; pointer-events: none; }
.insp-setup { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 18px 14px; border-radius: 14px; background: radial-gradient(80% 100% at 50% 0%, rgba(240, 63, 224, .1), transparent 70%), var(--bg-2); border: 1px dashed #3a3448; }
.insp-setup-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: var(--grad-soft); color: #ffd1f4; }
.insp-setup .help { margin: 0 0 4px; }
.insp-media { display: grid; gap: 4px; padding: 10px; border-radius: 12px; background: var(--bg-2); }
.insp-h { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin-bottom: 2px; }
.insp-act { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; text-align: left; font-size: 13px; }
.insp-act:hover { background: #1d1a25; border-color: #2f2a3b; }
.insp-act svg { color: #ff9ce6; }

/* ================================================================ Create / Write / Lab top bar */
.nav-main { align-items: center; }
.nav-cap { position: relative; z-index: 1; padding: 0 4px 0 10px; font: 700 9.5px var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.nav-cap.cap-create { color: #ff9ce6; } .nav-cap.cap-write { color: #7fd8ff; } .nav-cap.cap-lab { color: #ffd27a; } .nav-cap.cap-finish { color: #7fd8ff; }
.nav-div { width: 1px; height: 20px; background: rgba(255, 255, 255, .08); margin: 0 6px; flex: none; }
.nav-main .nav-cast { height: 30px; padding: 0 10px; font-size: 13.5px; position: relative; z-index: 1; }
@media (max-width: 1380px) { .nav-cap { display: none; } }

/* ================================================================ episode header tabs, save points */
.ep-tabs { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .06); }
.ep-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--dim); font: 600 13px var(--font); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.ep-tabs button[aria-selected="true"] { background: #2a2534; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.snap-list { display: grid; gap: 4px; max-height: 360px; overflow: auto; margin-top: 8px; }
.snap { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg-2); }
.snap > div { flex: 1; display: grid; } .snap b { font-size: 13px; } .snap small { font-size: 11.5px; }

/* ================================================================ the Add panel (left of the timeline) */
.tl-bin { display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.add-head { display: flex; align-items: baseline; gap: 8px; padding: 2px 4px; }
.add-head b { font: 800 20px var(--display); font-stretch: 112%; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.add-head small { color: var(--dim); }
.add-grp { display: grid; gap: 6px; transition: opacity .2s; }
.add-grp.off .add-tile { opacity: .45; }
.add-cap { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-tile { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .06); background: linear-gradient(180deg, rgba(28, 25, 38, .6), rgba(17, 15, 25, .6));
  color: var(--ink); text-align: left; cursor: pointer; transition: transform .18s var(--ease), border-color .2s, box-shadow .2s; }
.add-tile:hover:not(:disabled) { transform: translateX(3px); border-color: rgba(240, 63, 224, .45); box-shadow: 0 10px 26px -18px rgba(240, 63, 224, .8); }
.add-tile:disabled { cursor: not-allowed; }
.add-tile .add-ic { width: 34px; height: 34px; }
.add-tile.c1 .add-ic { color: #ff9ce6; } .add-tile.c2 .add-ic { color: #ffc56b; } .add-tile.c3 .add-ic { color: #7fd8ff; } .add-tile.c4 .add-ic { color: #7fe8cf; } .add-tile.c5 .add-ic { color: #c4b0ff; }
.add-tx { display: grid; min-width: 0; } .add-tx b { font-size: 13.5px; } .add-tx small { font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-note { margin: 2px 4px 0; font-size: 11.5px; color: var(--faint); }
.eta { margin-left: 4px; font-weight: 600; opacity: .75; font-size: 11px; }

/* ================================================================ library drawer */
.dw { position: fixed; top: calc(var(--top) + 10px); right: 10px; bottom: 10px; z-index: 120; width: min(400px, calc(100vw - 20px)); display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: 20px; background: rgba(20, 18, 27, .94); backdrop-filter: blur(18px); border: 1px solid #2f2a3b; box-shadow: -30px 0 80px -30px #000; animation: dwIn .32s var(--ease) both; }
.cv ~ .dw, .cv .dw { top: 68px; }
.dw.out { animation: dwOut .22s ease-in both; }
@keyframes dwIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes dwOut { to { opacity: 0; transform: translateX(40px); } }
.dw.dragging { opacity: .35; pointer-events: none; }
.dw-head { display: flex; align-items: center; gap: 8px; } .dw-head b { font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.dw-head kbd { font: 600 10.5px var(--font); padding: 2px 6px; border-radius: 6px; background: #221f2a; color: #b9b1cf; border: 1px solid #2f2b3a; }
.dw-q { padding: 9px 12px; border-radius: 11px; border: 1px solid #2a2634; background: #0f0d15; color: var(--ink); }
.dw-list { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-content: start; }
.dw-item { position: relative; display: grid; border-radius: 12px; overflow: hidden; background: #0c0a12; border: 1px solid #241f2e; cursor: grab; transition: border-color .2s, transform .2s; }
.dw-item:hover { border-color: #f03fe0; transform: translateY(-2px); }
.dw-item img, .dw-item video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.dw-aud { aspect-ratio: 16 / 10; display: grid; place-items: center; font-size: 22px; color: #7fd8ff; background: linear-gradient(135deg, rgba(62, 197, 255, .12), transparent); }
.dw-cap { padding: 6px 8px; display: grid; } .dw-cap b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dw-cap small { font-size: 10.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-add { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; border-radius: 9px; border: 0; background: var(--grad); color: #170616; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.dw-item:hover .dw-add { opacity: 1; }
.dw-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 40px 10px; color: var(--faint); font-size: 22px; }
.dw-empty small { font-size: 12.5px; }
.dw-help { margin: 0; font-size: 11.5px; color: var(--faint); }

/* ================================================================ shot board, batch, compare, audio */
.shot-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; padding: 12px; overflow: auto; max-height: 52vh; }
.sb-shot { display: grid; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); cursor: pointer; animation: cardIn .4s var(--ease) both; animation-delay: var(--d); transition: border-color .2s, transform .2s; }
.sb-shot:hover { transform: translateY(-2px); border-color: var(--hover-line); }
.sb-shot.sel { border-color: #f03fe0; box-shadow: 0 0 0 1px #f03fe0; } .sb-shot.multi { border-color: #3ec5ff; box-shadow: 0 0 0 1px #3ec5ff; }
.sb-shot-m { position: relative; aspect-ratio: 16 / 9; background: #0b0a10; display: grid; place-items: center; overflow: hidden; }
.sb-shot-m img, .sb-shot-m video { width: 100%; height: 100%; object-fit: cover; }
.sb-shot-m .ph { color: var(--faint); font-size: 26px; }
.sb-shot-n { position: absolute; left: 8px; top: 8px; font: 800 11px var(--display); padding: 3px 7px; border-radius: 7px; background: rgba(0, 0, 0, .6); }
.sb-shot-st { position: absolute; right: 8px; bottom: 8px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0, 0, 0, .65); }
.sb-shot-st.ready { background: #2fb8ff; color: #04121c; } .sb-shot-st.busy { background: #ffb340; color: #1d1203; } .sb-shot-st.bad { background: var(--bad); color: #fff; } .sb-shot-st.empty { background: rgba(240, 63, 224, .8); color: #fff; }
.sb-shot-tx { display: grid; gap: 3px; padding: 10px 12px 12px; } .sb-shot-tx b { font-size: 13.5px; } .sb-shot-tx p { margin: 2px 0 0; font-size: 11.5px; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-clip.multi { box-shadow: 0 0 0 2px #3ec5ff !important; }
.batch { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: var(--bg-2); }
.batch-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; flex-wrap: wrap; }
.batch-row select { padding: 6px 8px; border-radius: 8px; background: #0f0d15; border: 1px solid #2a2634; color: var(--ink); }
.insp-act.danger svg { color: var(--bad); }
.cmp-card { width: min(1100px, 100%); }
.cmp-head { margin-bottom: 8px; } .cmp-head select { padding: 6px 8px; border-radius: 8px; background: #0f0d15; border: 1px solid #2a2634; color: var(--ink); }
.cmp-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.cmp-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; cursor: ew-resize; margin-bottom: 10px; }
.cmp-a, .cmp-b { position: absolute; inset: 0; } .cmp-a > *, .cmp-b > * { width: 100%; height: 100%; object-fit: contain; }
.cmp-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 12px rgba(240, 63, 224, .9); transform: translateX(-1px); pointer-events: none; }
.cmp-line span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #111; }
.tl-wave { position: absolute; inset: 14px 0 4px; width: 100%; height: calc(100% - 18px); pointer-events: none; opacity: .8; }
.tl-fade { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.tl-fade.in { left: 0; background: linear-gradient(to top right, rgba(0, 0, 0, .55) 50%, transparent 50%); }
.tl-fade.out { right: 0; background: linear-gradient(to top left, rgba(0, 0, 0, .55) 50%, transparent 50%); }

/* ================================================================ Script */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.sc-card { display: grid; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); transition: transform .3s var(--ease), border-color .25s; animation: cardIn .45s var(--ease) both; animation-delay: var(--d); color: var(--ink); text-align: left; }
.sc-card:hover { transform: translateY(-3px); border-color: var(--hover-line); }
.sc-paper { height: 170px; padding: 18px 20px; background: linear-gradient(180deg, #f3efe6, #e7e1d3); color: #2b2620; font: 12px/1.6 "Courier New", Courier, monospace; overflow: hidden; position: relative; }
.sc-paper::after { content: ""; position: absolute; inset: auto 0 0; height: 50px; background: linear-gradient(transparent, #e7e1d3); }
.sc-paper p { margin: 0; }
.sc-txt { display: grid; gap: 3px; padding: 12px 14px 14px; } .sc-txt b { font-size: 15px; }
.sc-new { display: grid; place-items: center; align-content: center; gap: 10px; min-height: 230px; border-style: dashed; background: transparent; cursor: pointer; color: var(--dim); }
.sc-ed { display: grid; gap: 14px; max-width: none; }
.sc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.sc-name { font: 800 22px/1 var(--display); font-stretch: 118%; text-transform: uppercase; background: transparent; border: 1px solid transparent; color: var(--ink); padding: 6px 8px; border-radius: 8px; min-width: 120px; max-width: 420px; }
.sc-name:focus { outline: none; border-color: var(--line-2); background: var(--bg-2); }
.sc-stats { display: flex; gap: 14px; color: var(--dim); font-size: 12.5px; } .sc-stats b { color: var(--ink); }
.sc-main { display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 1200px) { .sc-main { grid-template-columns: minmax(0, 1fr) 300px; } .sc-side { display: none; } }
@media (max-width: 860px) { .sc-main { grid-template-columns: 1fr; } }
.sc-side, .sc-ai { position: sticky; top: calc(var(--top) + 12px); max-height: calc(100vh - var(--top) - 24px); overflow: auto; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; }
.sc-h { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.sc-scene { display: flex; gap: 8px; align-items: baseline; text-align: left; padding: 7px 8px; border-radius: 9px; border: 0; background: transparent; color: #d9d2ea; font: 600 11.5px/1.35 "Courier New", monospace; cursor: pointer; }
.sc-scene:hover { background: #1d1a25; }
.sc-n { font: 800 10px var(--font); color: #ff9ce6; flex: none; }
.sc-center { display: grid; gap: 8px; }
.sc-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-tool { padding: 6px 12px; border-radius: 9px; border: 1px solid #2a2634; background: var(--panel); color: var(--ink); font: 600 12px var(--font); cursor: pointer; }
.sc-tool:hover { border-color: #7fd8ff; }
.sc-paperwrap { padding: 28px clamp(16px, 4vw, 64px); border-radius: 18px; background: radial-gradient(120% 60% at 50% 0%, rgba(62, 197, 255, .06), transparent 60%), #0e0c13; border: 1px solid var(--line); }
.sc-page { display: block; width: min(820px, 100%); margin: 0 auto; min-height: 78vh; resize: vertical; padding: 56px clamp(20px, 6vw, 84px); border: 0; border-radius: 6px;
  background: linear-gradient(180deg, #f6f2ea, #ece6d9); color: #221d18; font: 14.5px/1.75 "Courier Prime", "Courier New", Courier, monospace; box-shadow: 0 30px 80px -30px #000, 0 0 0 1px rgba(0, 0, 0, .2); }
.sc-page:focus { outline: none; box-shadow: 0 30px 80px -30px #000, 0 0 0 2px rgba(62, 197, 255, .5); }
.sc-idea { padding: 9px 12px; border-radius: 10px; border: 1px solid #2a2634; background: #0f0d15; color: var(--ink); }
.sc-ai-acts { display: grid; gap: 5px; }
.sc-ai-act { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.sc-ai-act:hover { background: #1d1a25; border-color: #2f2a3b; }
.sc-ai-act b { display: block; font-size: 13px; } .sc-ai-act small { display: block; font-size: 11.5px; color: var(--dim); }
.sc-ai-act.busy { opacity: .6; }
.sc-thinking { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg-2); color: var(--dim); font-size: 12.5px; }
.sc-res { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid rgba(62, 197, 255, .25); }
.sc-res pre { margin: 0; max-height: 340px; overflow: auto; white-space: pre-wrap; font: 12px/1.6 "Courier New", monospace; color: #e6e0f3; }

/* ================================================================ canvas: feel like you're solving something */
.cv-aurora { position: absolute; inset: -20%; pointer-events: none; opacity: .5; filter: blur(70px);
  background: radial-gradient(35% 30% at 20% 30%, rgba(125, 77, 255, .22), transparent 70%), radial-gradient(30% 28% at 80% 70%, rgba(240, 63, 224, .18), transparent 70%), radial-gradient(28% 25% at 60% 15%, rgba(47, 184, 255, .14), transparent 70%);
  animation: auroraDrift 26s ease-in-out infinite alternate; }
@keyframes auroraDrift { 0% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(4%, -3%) rotate(8deg); } 100% { transform: translate(-3%, 4%) rotate(-6deg); } }
.cv-spot { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), rgba(169, 139, 255, .07), transparent 60%); }
.cv-chips { position: absolute; left: 0; top: 0; pointer-events: none; }
.cv-chip { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; font: 700 10.5px var(--font); color: #fff;
  background: rgba(20, 16, 28, .9); border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 0 14px rgba(240, 63, 224, .7); will-change: transform; }
.cv-chip.t { border-color: #a98bff; box-shadow: 0 0 14px rgba(169, 139, 255, .8); } .cv-chip.v { border-color: #ff5fd8; }
.cv-chip.img { padding: 2px; } .cv-chip.img img { width: 44px; height: 28px; object-fit: cover; border-radius: 999px; display: block; }
.cv-measure { position: absolute; width: 0; height: 0; overflow: hidden; }
.cv-wtip { position: absolute; z-index: 9; width: 320px; padding: 10px 12px; border-radius: 14px; background: rgba(20, 18, 27, .96); border: 1px solid #2f2a3b; box-shadow: 0 20px 50px -20px #000; pointer-events: none; display: grid; gap: 6px; animation: popIn .16s var(--ease) both; }
.cv-wtip-h { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); } .cv-wtip-h b { color: var(--ink); font-weight: 600; }
.cv-wtip p { margin: 0; font-size: 12px; line-height: 1.5; color: #ddd6ee; max-height: 160px; overflow: hidden; }
.cv-wtip img, .cv-wtip video { width: 100%; border-radius: 8px; max-height: 170px; object-fit: cover; }
.cv-narr { display: flex; align-items: center; gap: 8px; margin: 0 12px; padding: 6px 10px; border-radius: 10px; font-size: 11.5px; color: #ffe1f8; background: linear-gradient(90deg, rgba(255, 95, 216, .14), rgba(125, 77, 255, .08)); border: 1px solid rgba(255, 95, 216, .2); }
.cv-narr i { width: 8px; height: 8px; border-radius: 50%; background: #ff5fd8; box-shadow: 0 0 10px #ff5fd8; animation: pulse 1.1s infinite; flex: none; }
.cv-spec { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px 0; }
.cv-spec span { font: 600 10.5px var(--font); padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, .05); color: #cfc7e4; border: 1px solid rgba(255, 255, 255, .06); }
.cv-spec span:last-child { color: #ffd27a; }
.cv-ghosts { position: absolute; left: 0; top: 0; }
.cv-ghost { position: absolute; width: 260px; padding: 12px; border-radius: 16px; border: 1.5px dashed rgba(255, 255, 255, .22); background: rgba(20, 18, 27, .45); backdrop-filter: blur(6px); display: grid; gap: 8px;
  opacity: .62; transition: opacity .2s, transform .2s, border-color .2s; animation: ghostIn .6s var(--ease) both; }
.cv-ghost:hover { opacity: 1; transform: translateY(-2px); border-color: rgba(240, 63, 224, .6); }
@keyframes ghostIn { from { opacity: 0; transform: scale(.94); } to { opacity: .62; transform: none; } }
.cv-ghost-h { display: flex; align-items: center; gap: 8px; } .cv-ghost-h .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.cv-ghost p { margin: 0; font-size: 12px; color: var(--dim); line-height: 1.45; }
.cv-ghost .cv-x { opacity: 1; }
.cv-strip { position: absolute; z-index: 6; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 280px); display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 16px;
  background: rgba(14, 12, 20, .86); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 50px -24px #000; overflow-x: auto; scrollbar-width: none; animation: popIn .3s var(--ease) both; }
.cv-strip.live { border-color: rgba(255, 95, 216, .35); box-shadow: 0 0 30px -10px rgba(255, 95, 216, .6), 0 20px 50px -24px #000; }
.cv-strip-cap { font: 700 10px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 0 6px; flex: none; }
.cv-step { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, .04); color: var(--dim); font: 600 11.5px var(--font); cursor: pointer; white-space: nowrap; flex: none; }
.cv-step .dot { width: 8px; height: 8px; border-radius: 50%; background: #4b4558; }
.cv-step.done { color: #c9f5cf; } .cv-step.done .dot { background: #8fe07c; }
.cv-step.on { color: #fff; background: rgba(255, 95, 216, .16); } .cv-step.on .dot { background: #ff5fd8; box-shadow: 0 0 10px #ff5fd8; animation: pulse 1s infinite; }
.cv-step.wait .dot { background: #ffb340; }
.cv-strip-arrow { width: 14px; height: 2px; background: #3a3446; flex: none; border-radius: 2px; } .cv-strip-arrow.done { background: #8fe07c; }
.cv-strip-eta { font: 600 11.5px var(--font); color: #ffd27a; padding: 0 6px; flex: none; display: inline-flex; align-items: center; gap: 4px; } .cv-strip-eta.ok { color: #9cf0a3; }
.cv-focus { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; padding: 30px; background: rgba(4, 3, 8, .7); backdrop-filter: blur(6px); animation: fadeIn .2s both; }
.cv.focusing .cv-world { filter: blur(2px) saturate(.6); transition: filter .3s; }
.cv-focus-card { width: min(980px, 100%); max-height: calc(100% - 20px); overflow: auto; border-radius: 22px; background: linear-gradient(180deg, rgba(30, 27, 40, .98), rgba(18, 16, 26, .98)); border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 40px 100px -30px #000, 0 0 0 1px rgba(169, 139, 255, .12); animation: popIn .28s var(--ease) both; }
.cv-focus-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.cv-focus-head .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; }
.cv-focus-head b { display: block; font-size: 17px; } .cv-focus-head small { color: var(--dim); }
.cv-focus-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 0; }
.cv-focus-main { padding: 18px; } .cv-focus-main .cv-ta { min-height: 260px; font-size: 14px; }
.cv-focus-main .cv-media, .cv-focus-main .cv-res, .cv-focus-main .cv-out { min-height: 300px; } .cv-focus-main img, .cv-focus-main video { max-height: 460px !important; }
.cv-focus-side { padding: 18px; border-left: 1px solid rgba(255, 255, 255, .06); } .cv-focus-side h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); }
.cv-focus-side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; } .cv-focus-side li { display: grid; font-size: 12.5px; } .cv-focus-side li span { color: var(--dim); font-size: 12px; }
@media (max-width: 760px) { .cv-focus-body { grid-template-columns: 1fr; } .cv-focus-side { border-left: 0; } }
.cv-finish { position: absolute; inset: 0; z-index: 14; display: grid; place-items: center; padding: 30px; background: radial-gradient(ellipse at 50% 45%, rgba(240, 63, 224, .18), rgba(4, 3, 8, .85) 60%); animation: fadeIn .3s both; }
.cv-finish-in { position: relative; width: min(900px, 100%); display: grid; gap: 10px; justify-items: center; text-align: center; animation: finishIn .7s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes finishIn { from { opacity: 0; transform: scale(.85) translateY(20px); } to { opacity: 1; transform: none; } }
.cv-finish-in small { font: 700 11px var(--font); letter-spacing: .3em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cv-finish-in h2 { margin: 0; font-size: clamp(30px, 4vw, 52px); }
.cv-finish-in video, .cv-finish-in img { width: 100%; max-height: 56vh; object-fit: contain; border-radius: 16px; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 90px -20px rgba(240, 63, 224, .55); }
.cv-finish-burst { position: absolute; inset: -60px; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(255, 179, 64, .25), transparent 20%, rgba(240, 63, 224, .3), transparent 45%, rgba(47, 184, 255, .25), transparent 70%); filter: blur(30px); animation: burstSpin 6s linear infinite; }
@keyframes burstSpin { to { transform: rotate(360deg); } }
.cv.tidying .cv-node { transition: left .55s cubic-bezier(.2, .8, .2, 1), top .55s cubic-bezier(.2, .8, .2, 1); }
.cv-mine { width: 100%; display: grid; gap: 10px; justify-items: center; }
.cv-mine h4, .cv-presets-in > h4 { margin: 8px 0 0; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.cv-preset.mine { position: relative; } .cv-preset.mine .cv-preset-ic { color: #ffd27a; }
.cv-preset .cv-del { position: absolute; right: 8px; top: 8px; }
.cv-preset:hover .cv-del { opacity: 1; }

/* ================================================================ first-run tour */
.tour { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.tour-hole { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(4, 3, 8, .72), 0 0 0 2px #f03fe0, 0 0 40px rgba(240, 63, 224, .6); transition: all .45s var(--ease); pointer-events: none; }
.tour-card { position: fixed; width: min(360px, calc(100vw - 32px)); padding: 18px; border-radius: 18px; background: rgba(22, 20, 28, .98); border: 1px solid #2f2a3b; box-shadow: 0 30px 80px -24px #000; pointer-events: auto; transition: all .45s var(--ease); display: grid; gap: 8px; }
.tour-card small { font: 700 10.5px var(--font); letter-spacing: .2em; text-transform: uppercase; color: #ff9ce6; }
.tour-card b { font-size: 17px; } .tour-card p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.tour-dots { display: flex; gap: 5px; } .tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: #3a3446; } .tour-dots i.on { background: #f03fe0; width: 18px; border-radius: 6px; }
.sb-shot-m .ph { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, rgba(240, 63, 224, .08), transparent 60%); padding: 0; border: 0; }
.tl-setup { left: auto; right: 8px; top: auto; bottom: 6px; transform: none; }
.add-tile { padding: 7px 9px; } .add-tile .add-ic { width: 30px; height: 30px; font-size: 14px; }
.tl-bin { gap: 10px; }

/* ================================================================== round 4: model picker, per-model nodes, shot card */
.pk-ov { position: fixed; inset: 0; z-index: 320; display: flex; padding: 16px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; background: radial-gradient(1200px 600px at 50% 0%, rgba(125, 77, 255, .16), transparent 60%), rgba(5, 4, 9, .66);
  backdrop-filter: blur(10px) saturate(1.2); animation: fadeIn .18s backwards; }
.pk-ov.out { pointer-events: none; }
.pk { position: relative; width: min(760px, 100%); flex: none; margin: auto; overflow: visible; padding: 26px 26px 20px; border-radius: var(--r-xl); background: var(--card); border: 1px solid var(--card-line);
  box-shadow: var(--elev-2), 0 0 0 1px rgba(255, 255, 255, .02); animation: pkIn .42s var(--ease) backwards; }
.pk::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: var(--grad); opacity: .35; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
@keyframes pkIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.pk-head { position: relative; margin-bottom: 18px; }
.pk-head small { color: var(--dim); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.pk-head h2 { margin: 6px 0 0; font-size: 30px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pk-x { position: absolute; top: -6px; right: -6px; }
.pk-step { display: flex; align-items: center; gap: 9px; margin: 16px 0 10px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.pk-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; background: var(--grad); color: #170616; }
.pk-tasks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.pk-task { position: relative; display: grid; gap: 4px; justify-items: start; text-align: left; padding: 13px 12px 12px; border-radius: var(--r); border: 1px solid var(--card-line); background: rgba(255, 255, 255, .02);
  color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s, transform .25s var(--ease), box-shadow .25s; animation: cardIn .45s var(--ease) backwards; }
.pk-task:nth-child(2) { animation-delay: 40ms; } .pk-task:nth-child(3) { animation-delay: 80ms; } .pk-task:nth-child(4) { animation-delay: 120ms; } .pk-task:nth-child(5) { animation-delay: 160ms; }
.pk-task:hover { border-color: var(--hover-line); transform: translateY(-2px); }
.pk-task.on { border-color: transparent; background: linear-gradient(var(--panel-2), var(--panel-2)) padding-box, var(--grad) border-box; box-shadow: 0 14px 34px -18px rgba(240, 63, 224, .8); }
.pk-task b { font-size: 13px; } .pk-task small { color: var(--dim); font-size: 11.5px; line-height: 1.3; }
.pk-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-soft); color: #ffd1f4; font-size: 15px; margin-bottom: 4px; transition: transform .3s var(--ease); }
.pk-task.on .pk-ic { background: var(--grad); color: #170616; transform: scale(1.06) rotate(-4deg); }
.pk-models { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pk-model { display: flex; align-items: center; gap: 11px; text-align: left; padding: 12px 13px; border-radius: var(--r); border: 1px solid var(--card-line); background: rgba(255, 255, 255, .02); color: var(--ink);
  cursor: pointer; transition: border-color .2s, background .2s; }
.pk-models.swap .pk-model { animation: pkSwap .28s var(--ease) backwards; }
.pk-models.swap .pk-model:nth-child(2) { animation-delay: 40ms; } .pk-models.swap .pk-model:nth-child(3) { animation-delay: 80ms; }
@keyframes pkSwap { from { opacity: 0; transform: translateY(6px); } }
.pk-model b { display: block; font-size: 13px; } .pk-model small { color: var(--dim); font-size: 11.5px; }
.pk-model:hover:not(:disabled) { border-color: var(--hover-line); }
.pk-model.on { border-color: rgba(255, 79, 207, .55); background: rgba(255, 79, 207, .07); }
.pk-model:disabled { opacity: .45; cursor: not-allowed; }
.pk-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; position: relative; transition: border-color .2s; }
.pk-model.on .pk-radio { border-color: var(--accent); }
.pk-model.on .pk-radio::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--grad); animation: pkDot .3s var(--ease) both; }
@keyframes pkDot { from { transform: scale(0); } to { transform: scale(1); } }
.pk-foot { display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pk-foot small { font-size: 12px; }
.pk-ov::-webkit-scrollbar { display: none; }
.pk-task, .pk-model { min-width: 0; }
@media (max-width: 700px) { .pk { padding: 20px 16px 16px; } .pk-head h2 { font-size: 24px; } .pk-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pk-models { grid-template-columns: minmax(0, 1fr); } }
@media (max-height: 720px) { .pk { padding: 18px 22px 14px; } .pk-head { margin-bottom: 10px; } .pk-head h2 { font-size: 24px; } .pk-step { margin: 10px 0 8px; }
  .pk-task { padding: 9px 10px; } .pk-ic { width: 26px; height: 26px; margin-bottom: 2px; } .pk-model { padding: 9px 11px; } .pk-foot { margin-top: 14px; padding-top: 12px; } }

/* canvas: video / image / audio model nodes get their own colour */
.cv-node.grp-video::before { background: linear-gradient(90deg, transparent, #ff5fd8, transparent); }
.cv-node.grp-image::before { background: linear-gradient(90deg, transparent, #ffb340, transparent); }
.cv-node.grp-audio::before { background: linear-gradient(90deg, transparent, #3ec5ff, transparent); }
.cv-pal-item.cat-render[draggable] .ic { transition: transform .2s var(--ease); }
.cv-mode.bad { background: rgba(255, 107, 94, .14); color: #ffb2aa; }

/* inspector shot card */
.sc { display: grid; gap: 10px; padding: 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--elev-1); animation: cardIn .35s var(--ease) both; }
.sc-head { display: flex; align-items: center; gap: 10px; }
.sc-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255, 95, 216, .14); color: #ff9ce6; }
.sc-ic.i { background: rgba(255, 179, 64, .14); color: #ffd08a; } .sc-ic.a { background: rgba(62, 197, 255, .14); color: #9fe2ff; }
.sc-ttl { flex: 1; min-width: 0; } .sc-ttl b { display: block; font-size: 13.5px; } .sc-ttl small { color: var(--dim); font-size: 11.5px; }
.sc-open { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--card-line); background: rgba(255, 255, 255, .03); color: var(--dim); cursor: pointer; display: grid; place-items: center; transition: color .2s, border-color .2s; }
.sc-open:hover { color: var(--ink); border-color: var(--hover-line); }
.sc-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sc-chip { display: grid; gap: 2px; text-align: left; padding: 7px 9px; border-radius: 9px; border: 1px solid transparent; background: rgba(255, 255, 255, .035); color: var(--ink); cursor: pointer; min-width: 0; transition: background .2s, border-color .2s; }
.sc-chip:hover { background: rgba(255, 255, 255, .06); }
.sc-chip.on { border-color: rgba(255, 79, 207, .45); background: rgba(255, 79, 207, .07); }
.sc-chip small { display: flex; align-items: center; gap: 5px; color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.sc-chip small svg { width: 11px; height: 11px; }
.sc-chip b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-help { margin: -2px 2px 0; font-size: 12px; color: var(--dim); animation: fadeIn .2s both; }
.sc-sec { display: grid; gap: 6px; }
.sc-row { display: flex; align-items: center; gap: 8px; }
.sc-cap { color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.sc-refs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.sc-ref { margin: 0; flex: none; width: 58px; display: grid; gap: 3px; }
.sc-ref img, .sc-ref > span { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; background: var(--panel-3); border: 1px solid var(--card-line); display: grid; place-items: center; color: var(--dim); }
.sc-ref figcaption { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.sc-link { border: 0; background: none; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.sc-link:hover { background: var(--accent-soft); }
.sc-prompt p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #d8d3e4; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sc-prompt.open p { display: block; max-height: 260px; overflow: auto; }

/* round 4b: calm progress instead of packets on the wires */
.cv-prog { display: grid; gap: 6px; padding: 8px 10px 7px; }
.cv-pbar { position: relative; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.cv-pbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: inherit; background: var(--grad); background-size: 200% 100%; transition: width .9s linear; animation: pbarShine 2.4s linear infinite; }
.cv-pbar.indet i { width: 35% !important; transition: none; animation: pbarIndet 1.6s var(--ease) infinite; }
@keyframes pbarShine { from { background-position: 0 0; } to { background-position: -200% 0; } }
@keyframes pbarIndet { from { left: -35%; } to { left: 100%; } }
.cv-prog-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cv-prog-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f3dcf6; }
.cv-prog-row b { flex: none; font-weight: 600; font-size: 11px; color: #ffd27a; font-variant-numeric: tabular-nums; }
.cv-step small { font-weight: 600; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.cv-step.on small { color: #ffd27a; } .cv-step.done small { color: #8fe07c; }
.cv-strip { flex-wrap: nowrap; }
.cv-strip-bar { position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.cv-strip-bar i { display: block; height: 100%; background: var(--grad); transition: width .9s linear; }
.cv-strip-eta { font-variant-numeric: tabular-nums; }
.cv-result-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: -4px; }
.cv-result-h small { color: #c9b8ff; font-size: 11px; font-weight: 700; }
.cv-link { border: 0; background: none; color: var(--accent); font: 600 11.5px var(--font); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.cv-link:hover { background: var(--accent-soft); }
.cv-result.has { border-color: rgba(169, 139, 255, .5); background: rgba(125, 77, 255, .1); min-height: 150px; }
.cv-chips { display: none; }
.cv-timing { display: grid; gap: 4px; padding: 8px 10px; border-radius: 11px; background: rgba(255, 179, 64, .05); border: 1px solid rgba(255, 179, 64, .16); }
.cv-timing-hint { display: flex; align-items: center; gap: 5px; color: #ffd9a0; font-size: 11px; }
.cv-timing-hint svg { width: 12px; height: 12px; }
.cv-head .cv-title { white-space: nowrap; overflow: hidden; cursor: grab; user-select: none; }
.cv-head .cv-title:hover { border-color: transparent; }
.cv-head .cv-title.editing { cursor: text; user-select: text; background: rgba(0, 0, 0, .35); border-color: #6d55c7; outline: none; }
.cv-node.needs { border-color: rgba(255, 179, 64, .55); box-shadow: 0 0 0 1px rgba(255, 179, 64, .25), 0 10px 40px rgba(0, 0, 0, .5); }
.cv-cast-ask { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 6px 9px; border-radius: 9px; font-size: 11.5px; font-weight: 700; color: #ffd9a0; background: rgba(255, 179, 64, .1); animation: pulseSoft 1.8s ease-in-out infinite; }
.cv-cast-ask svg { width: 13px; height: 13px; }
@keyframes pulseSoft { 50% { background: rgba(255, 179, 64, .2); } }

/* canvas: full screen again; the app's right-hand buttons sit in its header at exactly the same spot */
.cv { grid-template-rows: var(--bar) minmax(0, 1fr); }
.cv-top { height: var(--bar); padding-right: 18px; }
.cv-top .nav-right { margin-left: 4px; }
body.cv-open .tray-host { display: none; }
.cv-q-btn { position: relative; margin-right: 6px; }
.cv-q-btn.on { color: #fff; background: rgba(255, 255, 255, .08); }
.cv-q-btn.busy svg { color: #ff8be3; animation: pulse 1.4s infinite; }
.cv-q-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--grad); color: #170616; font: 800 10px/16px var(--font); text-align: center; }
.cv-q { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; border-left: 1px solid rgba(255, 255, 255, .05); background: linear-gradient(180deg, #0b0a11, #08070d); }
.cv-q[hidden] { display: none; }
.cv-q-head { display: flex; align-items: center; gap: 6px; padding: 12px 12px 10px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.cv-q-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.cv-q-list { overflow: auto; padding: 10px; display: grid; align-content: start; gap: 8px; }
.cv-q-cap { margin: 8px 2px 0; font: 700 10px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cv-q-empty { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; color: #9cf0a3; font-size: 12px; background: rgba(143, 224, 124, .06); }
.cv-q-it { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; animation: cardIn .35s var(--ease) backwards; }
.cv-q-it.running { border-color: rgba(255, 95, 216, .35); background: rgba(255, 95, 216, .06); grid-template-columns: minmax(0, 1fr) auto; }
.cv-q-it.running .cv-q-pic { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.cv-q-it.running .cv-q-txt { grid-column: 1; }
.cv-q-it.mine .cv-q-txt b::after { content: " · this film"; color: var(--faint); font-weight: 500; }
.cv-q-it.failed small { color: #ffb2aa; }
.cv-q-pic { position: relative; width: 64px; height: 40px; border-radius: 8px; overflow: hidden; background: #050409; display: grid; place-items: center; color: var(--dim); }
.cv-q-pic img, .cv-q-pic video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-q-pic.live img { animation: liveIn .6s ease-out; }
@keyframes liveIn { from { filter: blur(6px) brightness(1.3); } }
.cv-q-live { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font: 800 9px var(--font); letter-spacing: .1em; }
.cv-q-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff4f6d; box-shadow: 0 0 8px #ff4f6d; animation: pulse 1s infinite; }
.cv-q-txt { min-width: 0; display: grid; gap: 3px; }
.cv-q-txt b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-q-txt small { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cv-live { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #050409; }
.cv-live img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .4s; }
.cv-live b { position: absolute; right: 8px; bottom: 6px; font: 800 12px var(--font); color: #fff; text-shadow: 0 1px 6px #000; font-variant-numeric: tabular-nums; }

/* top-right render queue dropdown */
.q-btn { position: relative; }
.q-btn.busy svg { color: #ff8be3; animation: pulse 1.4s infinite; }
.pop.qd-pop { z-index: 400; padding: 0; width: 380px; max-width: calc(100vw - 24px); }
.qd { display: grid; grid-template-rows: auto minmax(0, 1fr); max-height: min(640px, calc(100vh - 90px)); }
.qd-head { display: flex; align-items: center; gap: 6px; padding: 12px 14px 10px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.qd-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.qd-link { color: var(--accent); font-size: 12px; font-weight: 600; }
.qd-list { overflow: auto; padding: 10px; display: grid; align-content: start; gap: 8px; }
.qd-cap { margin: 8px 2px 0; font: 700 10px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.qd-empty { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; color: #9cf0a3; font-size: 12px; background: rgba(143, 224, 124, .06); }
.qd-it { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid transparent; }
.qd-it.running { border-color: rgba(255, 95, 216, .35); background: rgba(255, 95, 216, .06); grid-template-columns: minmax(0, 1fr) auto; }
.qd-it.running .qd-pic { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.qd-it.failed small { color: #ffb2aa; }
.qd-pic { position: relative; width: 64px; height: 40px; border-radius: 8px; overflow: hidden; background: #050409; display: grid; place-items: center; color: var(--dim); }
.qd-pic img, .qd-pic video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qd-live { position: absolute; left: 6px; top: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font: 800 9px var(--font); letter-spacing: .1em; }
.qd-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff4f6d; box-shadow: 0 0 8px #ff4f6d; animation: pulse 1s infinite; }
.qd-txt { min-width: 0; display: grid; gap: 3px; }
.qd-txt b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qd-txt small { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.qd-bar { height: 4px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.qd-bar i { display: block; height: 100%; background: var(--grad); transition: width .9s linear; }
.qd-x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .05); color: var(--dim); cursor: pointer; display: grid; place-items: center; }
.qd-x:hover { color: #fff; background: rgba(255, 107, 94, .25); }
.cv-live video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* stop button on a working node */
.cv-run.stop { background: rgba(255, 107, 94, .18) !important; color: #ffb2aa; box-shadow: 0 0 0 1px rgba(255, 107, 94, .5); animation: none; }
.cv-run.stop:hover { background: rgba(255, 107, 94, .35) !important; color: #fff; }
.cv-top > .grow { flex: 1; }

/* A/B compare (Compare node + full screen) */
.cv-node.type-compare { width: 460px; }
.cv-cmp { min-height: 120px; }
.cv-node.sized.type-compare .cv-bd { display: flex; flex-direction: column; }
.cv-node.sized.type-compare .cv-cmp { flex: 1; min-height: 0; display: flex; }
.cmp { --ar: 16 / 9; display: grid; gap: 8px; width: 100%; outline: none; }
.cmp-view { position: relative; display: grid; gap: 6px; border-radius: 12px; overflow: hidden; background: #050409; user-select: none; }
.cmp.side .cmp-view { grid-template-columns: 1fr 1fr; background: transparent; }
.cmp-pane { position: relative; aspect-ratio: var(--ar); background: #000; border-radius: 10px; overflow: hidden; }
.cmp-pane > img, .cmp-pane > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.cmp.wipe .cmp-view { grid-template-columns: 1fr; aspect-ratio: var(--ar); cursor: ew-resize; }
.cmp.wipe .cmp-pane { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.cmp-tag { position: absolute; top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; max-width: 70%; pointer-events: none; z-index: 2; }
.cmp-tag b { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: #3ec5ff; color: #04131a; }
.cmp-pane.b .cmp-tag b { background: #ff5fd8; color: #1c0418; }
.cmp-tag small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp-pane.a .cmp-tag { left: 8px; } .cmp-pane.b .cmp-tag { right: 8px; }
.cmp.side .cmp-pane.b .cmp-tag { left: 8px; right: auto; }
.cmp-handle { display: none; }
.cmp.wipe .cmp-handle { display: block; position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .7); z-index: 3; pointer-events: none; }
.cmp-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #111; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); }
.cmp-handle svg { width: 15px; height: 15px; }
.cmp-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--dim); font-size: 11px; }
.cmp-bar { display: flex; align-items: center; gap: 8px; }
.cmp-btn { height: 28px; min-width: 28px; padding: 0 6px; border-radius: 8px; border: 0; background: rgba(255, 255, 255, .06); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.cmp-btn:hover { background: rgba(255, 255, 255, .12); }
.cmp-btn small { font-size: 10px; font-weight: 800; }
.cmp-scrub { flex: 1; min-width: 60px; accent-color: #ff5fd8; }
.cmp-time { font: 600 11px var(--font); color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp-bar .grow { flex: 0 0 4px; }
.cmp-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: rgba(255, 255, 255, .05); }
.cmp-seg button { border: 0; background: none; color: var(--dim); font: 600 11px var(--font); padding: 4px 8px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.cmp-seg button[aria-pressed="true"] { background: rgba(255, 255, 255, .12); color: #fff; }
.cmp-ov { position: fixed; inset: 0; z-index: 330; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; padding: 16px 24px 24px; background: rgba(4, 3, 8, .96); animation: fadeIn .18s backwards; }
.cmp-ov-head { display: flex; align-items: center; gap: 12px; }
.cmp-ov-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.cmp-ov-head small { color: var(--dim); }
.cmp.big { align-content: center; justify-items: center; max-height: 100%; }
.cmp.big .cmp-view { width: min(100%, calc((100vh - 150px) * var(--ar))); }
.cmp.big.side .cmp-view { width: min(100%, calc((100vh - 150px) * var(--ar) * 2)); }
.cmp.big .cmp-bar { width: min(100%, 1100px); }

/* show setup + delete */
.sh-setup { padding: 18px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--elev-1); }
.sh-setup .sec-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.sh-setup .sec-title { margin: 0; }
.sh-setup .help { margin: 4px 0 0; }
.sh-setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; margin-top: 16px; }
.sh-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.sh-cap { color: var(--faint); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.sh-field select, .sh-field input { height: 36px; }
.sh-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .04); }
.sh-seg button { border: 0; background: none; color: var(--dim); font: 600 12.5px var(--font); padding: 6px 11px; border-radius: 8px; cursor: pointer; transition: background .2s, color .2s; }
.sh-seg button[aria-pressed="true"] { background: var(--grad); color: #170616; }
.sh-look { justify-content: flex-start; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sh-cast-field { margin-top: 18px; }
.sh-cast-grp { display: grid; gap: 6px; margin-top: 8px; }
.sh-cast { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-cast-it { position: relative; width: 92px; display: grid; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--card-line); background: rgba(255, 255, 255, .02); color: var(--ink); cursor: pointer; transition: border-color .2s, transform .2s var(--ease); }
.sh-cast-it:hover { transform: translateY(-2px); border-color: var(--hover-line); }
.sh-cast-it img, .sh-cast-it > span { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 9px; background: var(--panel-3); display: grid; place-items: center; }
.sh-cast-it small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--dim); }
.sh-cast-it i { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #170616; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s var(--ease); }
.sh-cast-it i svg { width: 12px; height: 12px; }
.sh-cast-it.on { border-color: rgba(255, 79, 207, .7); box-shadow: 0 8px 24px -14px rgba(240, 63, 224, .8); }
.sh-cast-it.on small { color: var(--ink); }
.sh-cast-it.on i { opacity: 1; transform: none; }
.sh-cover { position: relative; }
.sh-del { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.sh-card:hover .sh-del, .sh-del:focus-visible { opacity: 1; }
.sh-del:hover { background: rgba(255, 107, 94, .85); }
.dl-opts { display: grid; gap: 8px; }
.dl-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; border: 1px solid var(--card-line); cursor: pointer; transition: border-color .2s, background .2s; }
.dl-opt.on { border-color: rgba(255, 107, 94, .6); background: rgba(255, 107, 94, .06); }
.dl-opt input { margin-top: 3px; accent-color: #ff6b5e; }
.dl-opt b { display: block; font-size: 13.5px; } .dl-opt small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.dl-opt select { margin-top: 8px; height: 34px; }
.btn.danger-fill { background: #e5484d; color: #fff; }
.btn.danger-fill:hover { background: #ff5d62; }
.cv-cast-more { margin-top: 6px; }

/* Camera & look: example pictures on the cards */
.lk-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); max-height: 60vh; }
.lk-card { padding: 8px 8px 12px; align-content: start; }
.lk-ex { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover; display: block; background: #0b0a11; }
.lk-ph { position: relative; display: grid; place-items: center; overflow: hidden; }
.lk-ph.busy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%); animation: lkShine 1.4s linear infinite; }
@keyframes lkShine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.lk-mk { position: absolute; bottom: 6px; right: 8px; font-size: 10px !important; color: #ffd27a !important; }
.lk-card.has-ex { transition: transform .15s, border-color .15s, box-shadow .2s; }
.lk-card.has-ex:hover .lk-ex { filter: brightness(1.08); }
.lk-make { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(255, 179, 64, .06); border: 1px solid rgba(255, 179, 64, .18); }
.lk-make:empty { display: none; }
.lk-make small { color: #ffd9a0; font-size: 12px; flex: 1; min-width: 200px; }
/* until the clips exist, the move icons move the way the camera does */
.lk-move svg { animation: lkMove 1.8s ease-in-out infinite; }
.lk-move.m-static svg { animation: none; }
.lk-move.m-push svg { --lk: scale(1.35); } .lk-move.m-pull svg { --lk: scale(.65); }
.lk-move.m-track svg { --lk: translateX(14px); } .lk-move.m-pan svg { --lk: translateX(-12px); } .lk-move.m-whip svg { --lk: translateX(22px); animation-duration: .7s; }
.lk-move.m-crane svg { --lk: translateY(-14px); } .lk-move.m-fpv svg { --lk: translate(16px, -10px) scale(1.2); animation-duration: 1s; }
.lk-move.m-orbit svg { --lk: rotate(180deg); } .lk-move.m-hand svg { --lk: translate(2px, -2px) rotate(4deg); animation-duration: .35s; }
@keyframes lkMove { 50% { transform: var(--lk, none); } }
.sh-note { display: flex; gap: 8px; align-items: flex-start; color: var(--dim); padding-top: 20px; }
.sh-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.sh-note small { font-size: 12px; line-height: 1.45; }
.qd-bar.indet { position: relative; } .qd-bar.indet i { position: absolute; top: 0; bottom: 0; animation: pbarIndet 1.6s var(--ease) infinite; }
.gpu.ai .dot { background: #a98bff !important; box-shadow: 0 0 10px #a98bff; }

/* ---------------------------------------------------------------- sketch pad (first / last frame design) */
.sk-ov { position: fixed; inset: 0; z-index: 400; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: rgba(6, 6, 9, .96); backdrop-filter: blur(6px);
  animation: sk-in .26s cubic-bezier(.2, .7, .2, 1); }
@keyframes sk-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
.sk-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.sk-head b { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.sk-head .grow { flex: 1; }
.sk-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.sk-tool { display: grid; justify-items: center; gap: 2px; min-width: 52px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--dim); cursor: pointer; font-size: 18px;
  transition: background .15s, color .15s, border-color .15s, transform .15s; }
.sk-tool small { font-size: 10.5px; font-weight: 600; }
.sk-tool:hover { background: var(--panel-2); color: var(--ink); }
.sk-tool:active { transform: scale(.95); }
.sk-tool.on { background: var(--grad-soft); color: var(--ink); border-color: rgba(240, 63, 224, .45); }
.sk-sep { width: 1px; height: 30px; background: var(--line-2); margin: 0 6px; }
.sk-col { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #2f2d36; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.sk-col:hover { transform: scale(1.12); }
.sk-col.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #f03fe0; }
.sk-size { min-width: 32px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--dim); font-weight: 700; cursor: pointer; }
.sk-size.on { background: #2b2932; color: var(--ink); border-color: #4a4558; }
.sk-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; min-height: 0; }
.sk-stage { display: grid; place-items: center; padding: 22px; min-height: 0; min-width: 0; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(125, 77, 255, .08), transparent 60%); }
.sk-frame { width: min(100%, calc((100vh - 190px) * var(--ar, 1.78))); height: auto; display: grid; border-radius: 6px; overflow: hidden;
  box-shadow: 0 0 0 1px #2f2d36, 0 24px 70px rgba(0, 0, 0, .6); background: #fff; }
.sk-cv { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.sk-side { border-left: 1px solid var(--line); padding: 14px; overflow: auto; display: grid; align-content: start; gap: 8px; }
.sk-cap { color: var(--faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.sk-tpl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sk-tpl button { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s; }
.sk-tpl button:hover { border-color: #7d4dff; background: var(--panel-2); transform: translateY(-1px); }
.sk-tpl b { font-size: 12.5px; } .sk-tpl small { color: var(--dim); font-size: 10.5px; line-height: 1.3; }
.sk-chk { display: flex; gap: 8px; align-items: flex-start; padding: 6px 4px; cursor: pointer; }
.sk-chk span { display: grid; gap: 1px; } .sk-chk b { font-size: 12.5px; } .sk-chk small { color: var(--dim); font-size: 11px; }
.sk-side input[type="range"] { width: 100%; }
.sk-tip { font-size: 11.5px; color: var(--dim); margin: 6px 0 0; }
@media (max-width: 860px) { .sk-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; } .sk-side { border-left: 0; border-top: 1px solid var(--line); max-height: 34vh; } .sk-frame { width: min(100%, calc((66vh - 190px) * var(--ar, 1.78))); } }

/* the new canvas nodes */
.cv-media.cv-sketch { min-height: 0; background: #f4f2ee; border-color: #3a3448; }
.cv-media.cv-sketch:not(.has) { background: #0b0a11; }
.cv-media.cv-sketch img { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #fff; cursor: pointer; }
.cv-media.cv-sketch:hover { border-color: #7d4dff; box-shadow: 0 0 0 1px rgba(125, 77, 255, .4), 0 0 22px -6px rgba(125, 77, 255, .7); }
.cv-media.cv-sketch .dim { color: var(--faint); font-size: 10.5px; }
.cv-seg { width: 100%; }
.cv-seg button { min-height: 26px; padding: 4px 6px; font-size: 11.5px; }
.cv-tog { align-self: end; display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--dim);
  font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .18s; }
.cv-tog:hover { color: var(--ink); border-color: #4a4558; }
.cv-tog.on { color: #1c0418; background: linear-gradient(100deg, #ffb340, #ff4f8b); border-color: transparent; box-shadow: 0 0 16px -4px rgba(255, 79, 139, .8); }
.cv-pickhint { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #3fd3b0; }
.cv-take img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-area { display: grid; gap: 6px; }
.cv-area-pv { position: relative; border-radius: 10px; overflow: hidden; background: #000; }
.cv-area-pv img { width: 100%; display: block; max-height: 160px; object-fit: contain; }
.cv-area-pv img.m { position: absolute; inset: 0; height: 100%; mix-blend-mode: screen; opacity: .55; filter: sepia(1) saturate(8) hue-rotate(-50deg); }
.cv-hint.err { color: #ff8a8a; }
.cv-render-eta { margin-left: 4px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .28); font-size: 11px; font-weight: 700; white-space: nowrap; }
.cv-render-eta[hidden] { display: none; }
.cv-render .lbl { white-space: nowrap; }
.cv-crumb b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 22vw; }
.cv-crumb small { max-width: 18vw; }
.cv-render { flex: none; white-space: nowrap; }
.cv-rw-pics { line-height: 1.35; }
.tl-joinimg { width: 100%; height: 100%; object-fit: contain; pointer-events: none; z-index: 1; }
.tl-joinsvg { position: absolute; width: 0; height: 0; }
.tl-nav { padding-inline: 7px; }
.tl-frame { font: 600 11.5px ui-monospace, Consolas, monospace; color: var(--dim); padding: 3px 8px; border-radius: 999px; background: #0f0f12; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tl-frame.edge { color: #1c0418; background: linear-gradient(100deg, #ffb340, #ff4f8b); }
.btn.on { box-shadow: inset 0 0 0 1px #3fd3b0; color: #3fd3b0; }
.cv-rw-see { display: grid; gap: 4px; }
.cv-rw-warn { display: grid; gap: 3px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 179, 64, .1); border: 1px solid rgba(255, 179, 64, .35); }
.cv-rw-warn small { color: #ffd08a; font-size: 11px; line-height: 1.35; }
.cv-rw-warn .cv-link { justify-self: start; }

/* ---------------------------------------------------------------- clip inspector (right of the timeline) */
.tl-insp > .ins-sec + .ins-sec { margin-top: 6px; }
.ins-top { display: grid; gap: 6px; }
.ins-top .clip-name { width: 100%; font-weight: 700; font-size: 14px; }
.ins-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.ins-meta span { font-size: 11px; font-weight: 600; color: var(--dim); padding: 2px 8px; border-radius: 999px; background: #121117; border: 1px solid var(--line); }
.ins-meta .st { color: #ffd08a; border-color: rgba(255, 179, 64, .35); }
.ins-meta .st.busy { color: #ff9ce6; border-color: rgba(255, 79, 207, .4); animation: insPulse 1.6s ease-in-out infinite; }
@keyframes insPulse { 50% { opacity: .55; } }
.ins-main { display: flex; gap: 6px; flex-wrap: wrap; }
.ins-main .btn.lime { flex: 1; justify-content: center; }
.ins-sec { border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); overflow: hidden; }
.ins-sh { width: 100%; display: flex; align-items: center; gap: 7px; padding: 9px 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; text-align: left; }
.ins-sh:hover { background: rgba(255, 255, 255, .025); }
.ins-sh svg { width: 13px; height: 13px; color: var(--faint); transition: transform .2s var(--ease, ease); flex: none; }
.ins-sec.open > .ins-sh svg { transform: rotate(90deg); color: #ff9ce6; }
.ins-sh b { font-size: 12.5px; }
.ins-sh small { margin-left: auto; color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.ins-body { display: none; gap: 6px; padding: 0 8px 10px; }
.ins-sec.open > .ins-body { display: grid; animation: insIn .22s ease-out; }
@keyframes insIn { from { opacity: 0; transform: translateY(-4px); } }
.ins-act { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.ins-act:hover { background: #1d1a25; border-color: #2f2a3b; }
.ins-act:disabled { opacity: .45; cursor: default; }
.ins-act .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: rgba(255, 79, 207, .1); color: #ff9ce6; }
.ins-act .tx { display: grid; gap: 1px; min-width: 0; }
.ins-act .tx b { font-size: 12.5px; }
.ins-act .tx small { font-size: 11px; color: var(--dim); line-height: 1.3; }
.ins-act.on .ic { background: rgba(63, 211, 176, .14); color: #3fd3b0; }
.ins-act.on .tx b { color: #3fd3b0; }
.ins-foot { display: flex; gap: 6px; align-items: center; padding-top: 4px; border-top: 1px solid var(--line); }
.ins-keys { font-size: 11px; margin: 0; }
.sc.compact { gap: 8px; }
.sc.compact .sc-head { display: none; }
.sc.compact .sc-chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.sc.compact .sc-chip { padding: 5px 7px; }
.sc.compact .sc-chip small { font-size: 9.5px; }
.sc.compact .sc-chip small svg { display: none; }
.sc.compact .sc-chip b { font-size: 11.5px; }
.sc.compact .sc-ref, .sc.compact .sc-ref img, .sc.compact .sc-ref > span { width: 46px; }
.sc.compact .sc-ref img, .sc.compact .sc-ref > span { height: 46px; }
.sc.compact { background: none; border: 0; padding: 0; box-shadow: none; }
.ins-act { padding: 6px 6px; }
.ins-act .tx small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ins-act:hover .tx small { -webkit-line-clamp: 3; }
.cv-ext-first { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 10px; background: #0b0a11; border: 1px dashed #332d43; color: var(--faint); }
.cv-ext-first img { width: 72px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; }
.cv-ext-first small { font-size: 11px; line-height: 1.3; }

/* ---------------------------------------------------------------- coming soon (VFX) */
.nav-main .nav-soon { position: relative; display: flex; align-items: center; padding: 7px 26px 7px 10px; border-radius: 9px; color: #8a83a0; font-weight: 500; font-size: 13.5px; white-space: nowrap; cursor: pointer; overflow: hidden; }
.nav-main .nav-soon:hover { color: var(--ink); background: #141318; }
.nav-main .nav-soon[aria-current="page"] { color: var(--accent); }
.soon-ribbon { position: absolute; top: 4px; right: -19px; transform: rotate(40deg); padding: 0 18px; font: 800 6.5px/1.5 var(--font); letter-spacing: .12em; text-transform: uppercase; font-style: normal;
  color: #1c0418; background: linear-gradient(100deg, #ffb340, #ff4f8b); box-shadow: 0 2px 8px rgba(255, 79, 139, .45); pointer-events: none; }
.hm-tile.soon { position: relative; overflow: hidden; opacity: .6; }
.hm-tile.soon:hover { transform: none; }
.hm-tile .soon-ribbon { top: 16px; right: -34px; font-size: 9px; padding: 3px 40px; }

/* ---------------------------------------------------------------- timeline: a clip being extended, the clips' own sound */
.tl-ghost { position: absolute; top: 4px; bottom: 4px; border-radius: 7px; border: 1px dashed rgba(240, 63, 224, .7); display: flex; align-items: center; justify-content: center; overflow: hidden; pointer-events: none;
  background: repeating-linear-gradient(135deg, rgba(240, 63, 224, .16) 0 10px, rgba(125, 77, 255, .1) 10px 20px); background-size: 28px 28px; animation: tlGhost 1.1s linear infinite; }
@keyframes tlGhost { to { background-position: 28px 0; } }
.tl-ghost span { display: inline-flex; align-items: center; gap: 4px; font: 700 11px var(--font); color: #ffc6f3; text-shadow: 0 1px 2px #000; white-space: nowrap; animation: insPulse 1.6s ease-in-out infinite; }
.tl-lane.vsound { height: 26px; background: rgba(62, 197, 255, .025); }
.tl-snd { position: absolute; top: 3px; bottom: 3px; border-radius: 6px; display: flex; align-items: center; gap: 6px; padding: 0 4px; overflow: hidden; cursor: pointer;
  background: #16232f; border: 1px solid #2c5574; }
.tl-snd.sel { border-color: #7fd8ff; box-shadow: 0 0 0 1px rgba(127, 216, 255, .4); }
.tl-snd.muted { background: #1a1a1f; border-color: #3a3a44; }
.tl-mute { display: grid; place-items: center; width: 20px; height: 18px; flex: none; border: 0; border-radius: 4px; background: rgba(0, 0, 0, .35); color: #9fe2ff; cursor: pointer; font-size: 11px; }
.tl-snd.muted .tl-mute { color: #ff8a8a; }
.tl-snd-bar { flex: 1; height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, #3ec5ff 0 2px, transparent 2px 4px); }

/* ---------------------------------------------------------------- shot info */
.si { display: grid; gap: 1px; }
.si-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; padding: 5px 2px; border-bottom: 1px solid rgba(255, 255, 255, .04); align-items: baseline; }
.si-row > span { color: var(--faint); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.si-row > b { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.si-row > b small { color: var(--dim); font-weight: 500; font-size: 11.5px; }
.si .sc-sec { margin-top: 8px; display: grid; gap: 6px; }
.si .sc-ref, .si .sc-ref img { width: 46px; } .si .sc-ref img { height: 46px; }

.soon-ov { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; background: rgba(6, 6, 9, .72); backdrop-filter: blur(6px); animation: sk-in .2s ease-out; }
.soon-box { width: min(360px, calc(100vw - 32px)); display: grid; gap: 10px; justify-items: start; padding: 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.soon-box h3 { margin: 0; font-size: 18px; }
.soon-box .xrow { width: 100%; }
.soon-pw { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font-size: 14px; }
.soon-msg { color: var(--dim); font-size: 12.5px; }
.soon-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--grad-soft); color: #ffd1f4; }
.soon-page { display: grid; place-items: center; min-height: 60vh; }
.soon-card { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 40px 28px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); max-width: 520px; }
.soon-tag { color: #ffb340; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 11px; }
.soon-card h1 { margin: 0; }

/* ------------------------------------------------------------------ VFX: comps list */
.vfx-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.vfx-projects .sk.vfx-pcard { aspect-ratio: 16 / 12; border-radius: 18px; }
.vfx-pcard { display: grid; border-radius: 18px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); transition: transform .3s var(--ease), border-color .25s, box-shadow .3s;
  animation: cardIn .5s var(--ease) both; animation-delay: var(--d, 0ms); }
.vfx-pcard:hover { transform: translateY(-3px); border-color: var(--hover-line); box-shadow: 0 26px 50px -32px rgba(255, 79, 207, .55); }
.vfx-pmedia { position: relative; aspect-ratio: 16 / 9; background: #0b0a10; overflow: hidden; }
.vfx-pmedia video, .vfx-pmedia img { width: 100%; height: 100%; object-fit: cover; }
.vfx-pmedia .tag { position: absolute; left: 10px; bottom: 10px; gap: 4px; height: 22px; }
.vfx-del { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .2s, background .2s; }
.vfx-pcard:hover .vfx-del { opacity: 1; }
.vfx-del.armed { opacity: 1; background: var(--bad); }
.vfx-ptxt { display: grid; gap: 3px; padding: 12px 14px 14px; } .vfx-ptxt b { font-size: 15px; } .vfx-ptxt small { font-size: 12px; }
.vfx-pnew { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; padding: 46px 20px; border-radius: 18px; border: 1px dashed var(--line-2); background: transparent; cursor: pointer; transition: border-color .2s, background .2s; }
.vfx-pnew:hover { border-color: var(--accent); background: var(--accent-soft); }
.vfx-sub { margin-top: 18px; } .vfx-sub h3 { font-size: 14px; margin: 0 0 10px; font-weight: 650; }

/* ------------------------------------------------------------------ VFX: the comp (Nuke layout) */
.vfx-ed { height: calc(100vh - var(--top)); display: flex; flex-direction: column; overflow: hidden; background: #08080a; animation: fadeIn .3s var(--ease) both; }
.vfx-loading { margin: auto; display: flex; gap: 10px; align-items: center; color: var(--dim); }
.vfx-loading .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #2c2933; border-top-color: var(--accent); animation: ffSpin .8s linear infinite; }
.vfx-bar { flex: none; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: #0f0e12; border-bottom: 1px solid #1c1a21; }
.vfx-back, .vfx-ib { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: #c7bfe1; cursor: pointer; font-size: 16px; }
.vfx-back:hover, .vfx-ib:hover { background: #1b1a21; color: #fff; }
.vfx-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font: 800 10.5px/1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  background: var(--grad); color: #160616; }
.vfx-title { background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--ink); font: 650 15px var(--font); padding: 5px 8px; width: min(320px, 28vw); }
.vfx-title:hover { border-color: #26242d; } .vfx-title:focus { border-color: var(--accent); outline: 0; background: #121116; }
.vfx-from { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; color: #d9cff5; background: #18161d; border: 1px solid #2a2731; }
.vfx-from:hover { border-color: var(--accent); }
.vfx-saved { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--faint); }
.vfx-render.busy { background: #2a2731; color: #fff; animation: ffPulse 1.4s ease-in-out infinite; }
.vfx-main { flex: 1; min-height: 0; display: grid; }
.vfx-left { display: grid; min-height: 0; min-width: 0; }
.vfx-pane { position: relative; min-height: 0; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #0d0c10; }
.vfx-split { background: #08080a; position: relative; z-index: 2; }
.vfx-split::after { content: ""; position: absolute; inset: 0; margin: auto; background: transparent; transition: background .2s; }
.vfx-split.v { cursor: col-resize; } .vfx-split.v::after { width: 2px; }
.vfx-split.h { cursor: row-resize; } .vfx-split.h::after { height: 2px; }
.vfx-split:hover::after, .vfx-split.on::after { background: var(--accent); }

/* the Viewer */
.vv-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid #1a1920; overflow-x: auto; scrollbar-width: none; font-size: 12px; background: #0f0e12; }
.vv-bar::-webkit-scrollbar { display: none; }
.vv-ins { display: flex; gap: 3px; }
.vv-in { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid #2a2731; background: #15141a; color: #bdb5d6; cursor: pointer; font: 700 12px var(--font); max-width: 150px; }
.vv-in small { font-weight: 500; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vv-in.on { border-color: var(--accent); color: #fff; background: var(--accent-soft); } .vv-in.on small { color: #e7c9df; }
.vv-hint { color: var(--faint); padding: 0 4px; white-space: nowrap; }
.vv-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 7px; border: 0; background: transparent; color: #bdb5d6; cursor: pointer; font: 600 12px var(--font); white-space: nowrap; }
.vv-btn:hover { background: #1b1a21; color: #fff; } .vv-btn.on { background: var(--accent-soft); color: var(--accent); }
.vv-sel { height: 26px; border-radius: 7px; border: 1px solid #2a2731; background: #15141a; color: #d8d0ee; font: 500 12px var(--font); padding: 0 6px; }
.vv-sep { width: 1px; height: 18px; background: #26242d; flex: none; }
.vv-rng { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); white-space: nowrap; }
.vv-rng input { width: 74px; } .vv-rng b { font-weight: 600; color: #d8d0ee; font-variant-numeric: tabular-nums; min-width: 32px; }
.vv-stage { position: relative; flex: 1; min-height: 0; background: #070709; cursor: grab; touch-action: none; }
.vv-stage:active { cursor: grabbing; }
.vv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vv-tl, .vv-tr, .vv-bl { position: absolute; pointer-events: none; font-size: 11.5px; color: #d8d0ee; }
.vv-tl { left: 10px; top: 8px; } .vv-tr { right: 10px; top: 8px; color: var(--dim); } .vv-bl { left: 10px; bottom: 8px; color: var(--dim); font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; font-size: 11px; }
.vv-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; } .vv-name i { width: 8px; height: 8px; border-radius: 2px; } .vv-name small { color: var(--dim); font-weight: 500; }
.vv-name:empty { display: none; }
.vv-msg { position: absolute; inset: 0; margin: auto; height: fit-content; width: fit-content; max-width: 80%; text-align: center; padding: 10px 16px; border-radius: 12px; background: rgba(18, 17, 22, .86);
  border: 1px solid #26242d; color: var(--dim); font-size: 13px; pointer-events: none; animation: fadeIn .25s var(--ease); }
.vv-wipe { position: absolute; top: 0; bottom: 0; width: 18px; margin-left: -9px; cursor: ew-resize; }
.vv-wipe i { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 79, 207, .25), 0 2px 8px rgba(0, 0, 0, .6); }
.vt { flex: none; height: 42px; display: flex; align-items: center; gap: 3px; padding: 0 8px; border-top: 1px solid #1a1920; background: #0f0e12; }
.vt-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 0; background: transparent; color: #bdb5d6; cursor: pointer; font-size: 15px; flex: none; }
.vt-btn:hover { background: #1b1a21; color: #fff; } .vt-btn.on { color: var(--accent); }
.vt-btn.play { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin: 0 2px; }
.vt-btn.play:hover { background: #ff7ddc; color: var(--accent-ink); }
.vt-frame { width: 62px; height: 26px; margin: 0 6px; border-radius: 7px; border: 1px solid #2a2731; background: #15141a; color: #fff; font: 650 12px var(--font); text-align: center; font-variant-numeric: tabular-nums; }
.vt-ruler { flex: 1; height: 32px; min-width: 60px; cursor: pointer; }
.vt-range { font-size: 11px; color: var(--faint); white-space: nowrap; padding: 0 6px; font-variant-numeric: tabular-nums; }

/* the Node Graph */
.vg { flex: 1; min-height: 0; display: flex; position: relative; }
.vg-tools { flex: none; width: 42px; display: flex; flex-direction: column; gap: 3px; padding: 7px 6px; border-right: 1px solid #1a1920; background: #0f0e12; }
.vg-tool { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--c, #bdb5d6); cursor: pointer; font-size: 15px; transition: background .15s, transform .15s; }
.vg-tool:hover { background: #1b1a21; transform: scale(1.06); }
.vg-stage { position: relative; flex: 1; overflow: hidden; outline: 0; background-color: #0c0b0f; touch-action: none;
  background-image: radial-gradient(circle, #24222b 1px, transparent 1.3px); }
.vg-stage.dropping { box-shadow: inset 0 0 0 2px var(--accent); background-color: #140c13; }
.vg-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vg-wires { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.vg-wire { fill: none; stroke: #6f6a80; stroke-width: 1.6; }
.vg-wire.hot { stroke: #f1e9ff; } .vg-wire.mask { stroke: #5aa7a0; stroke-dasharray: 4 3; } .vg-wire.view { stroke: #b2479b; }
.vg-wire.stub { opacity: .75; } .vg-wire.ghost { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; animation: cvFlow .6s linear infinite; }
.vg-hit { fill: none; stroke: transparent; stroke-width: 12; pointer-events: stroke; cursor: copy; }
.vg-arrow { fill: #8e889f; } .vg-arrow.hot { fill: #fff; } .vg-arrow.mask { fill: #5aa7a0; }
.vg-plabel { font: 600 9.5px var(--font); fill: #8e889f; } .vg-plabel.mask { fill: #5aa7a0; } .vg-plabel.view { fill: #d673bf; }
.vg-grab { fill: transparent; pointer-events: all; cursor: crosshair; transition: fill .15s; } .vg-grab:hover { fill: rgba(255, 79, 207, .35); }
.vg-node { position: absolute; left: 0; top: 0; width: 116px; height: 28px; border-radius: 7px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 92%, #fff), color-mix(in srgb, var(--c) 78%, #000)); color: #0c0b10; font: 650 11.5px/1.05 var(--font);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 4px 12px -4px rgba(0, 0, 0, .7); cursor: default; user-select: none; transition: box-shadow .15s, filter .15s; }
.vg-node:hover { filter: brightness(1.08); }
.vg-node .vg-name { display: grid; justify-items: center; max-width: 106px; pointer-events: none; }
.vg-node .vg-name, .vg-node .vg-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-node .vg-name small { font-size: 9.5px; font-weight: 600; opacity: .7; }
.vg-node.sel { box-shadow: 0 0 0 2px #fff, 0 0 18px 2px rgba(255, 79, 207, .45); }
.vg-node.drop { box-shadow: 0 0 0 2px var(--accent), 0 0 18px 2px rgba(255, 79, 207, .6); }
.vg-node.off { filter: saturate(.2) brightness(.6); }
.vg-node.off::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(to top right, transparent calc(50% - 1px), #ff5b5b calc(50% - 1px), #ff5b5b calc(50% + 1px), transparent calc(50% + 1px)); pointer-events: none; }
.vg-node.err { box-shadow: 0 0 0 2px var(--bad); }
.vg-node.viewing::after { content: ""; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #0c0b0f; }
.vg-node.t-read { height: 82px; justify-content: flex-end; padding-bottom: 5px; }
.vg-thumb { position: absolute; left: 3px; right: 3px; top: 3px; height: 54px; border-radius: 5px; overflow: hidden; background: #000; pointer-events: none; }
.vg-thumb video, .vg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vg-node.t-viewer { border-radius: 14px; background: linear-gradient(180deg, #2c2833, #1c1a22); color: #fff; box-shadow: 0 0 0 1px #6c3d63 inset, 0 4px 12px -4px rgba(0, 0, 0, .7); }
.vg-node.t-viewer.sel { box-shadow: 0 0 0 2px #fff, 0 0 18px 2px rgba(255, 79, 207, .45); }
.vg-node.dot { width: 14px; height: 14px; border-radius: 50%; background: #c9c3db; }
.vg-node.t-backdrop { align-items: flex-start; justify-content: flex-start; padding: 7px 11px; border-radius: 10px; color: #fff; font: 700 14px var(--font);
  background: color-mix(in srgb, var(--c) 28%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent); }
.vg-node.t-backdrop .vg-name { justify-items: start; max-width: 100%; }
.vg-node.t-backdrop.sel { box-shadow: inset 0 0 0 2px #fff; }
.vg-out { position: absolute; left: 50%; bottom: -6px; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #fff; border: 2px solid #0c0b0f; opacity: 0; cursor: crosshair; transition: opacity .15s, transform .15s; }
.vg-node:hover .vg-out, .vg-node.sel .vg-out { opacity: 1; } .vg-out:hover { transform: scale(1.3); background: var(--accent); }
.vg-resize { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; cursor: nwse-resize; border-right: 2px solid rgba(255, 255, 255, .5); border-bottom: 2px solid rgba(255, 255, 255, .5); border-radius: 0 0 6px 0; }
.vg-errb { position: absolute; top: -8px; right: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bad); color: #fff; font: 800 11px/16px var(--font); text-align: center; font-style: normal; }
.vg-box { position: absolute; border: 1px dashed var(--accent); background: rgba(255, 79, 207, .08); pointer-events: none; }
.vg-tab { position: absolute; z-index: 6; width: 300px; max-height: 340px; display: flex; flex-direction: column; border-radius: 13px; background: rgba(24, 22, 29, .97); backdrop-filter: blur(12px);
  border: 1px solid #312e39; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85); overflow: hidden; }
.vg-tab-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #2a2731; color: var(--dim); }
.vg-tab-in { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font: 500 14px var(--font); }
.vg-tab-list { overflow: auto; padding: 5px; }
.vg-tab-it { display: grid; grid-template-columns: 10px 1fr auto; column-gap: 10px; align-items: center; width: 100%; padding: 7px 9px; border-radius: 8px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.vg-tab-it i { width: 10px; height: 10px; border-radius: 3px; grid-row: span 2; }
.vg-tab-it b { font-size: 13px; } .vg-tab-it small { grid-column: 2; color: var(--faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-tab-it em { grid-row: 1; grid-column: 3; font-style: normal; font-size: 10px; color: var(--accent); }
.vg-tab-it:hover, .vg-tab-it.on { background: #2a2731; }
.vg-catpop .vg-cat { min-width: 250px; } .vg-cat h4 { margin: 4px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.vg-cat .opt { display: flex; gap: 10px; align-items: center; } .vg-cat .opt span { display: grid; text-align: left; } .vg-cat .opt small { color: var(--faint); font-size: 11px; }
.vg-dotc { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.vg-empty { position: absolute; inset: 0 0 0 42px; display: grid; place-items: center; pointer-events: none; }
.vg-empty-card { pointer-events: auto; display: grid; justify-items: center; gap: 8px; padding: 22px 26px; border-radius: 18px; background: rgba(20, 19, 25, .92); border: 1px solid #2a2731; text-align: center;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); animation: popIn .4s var(--ease) both; }
.vg-empty-card .xrow { margin-top: 6px; }

/* the Properties bin */
.vp { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #0d0c10; }
.vp-head { flex: none; height: 40px; display: flex; align-items: center; gap: 6px; padding: 0 8px 0 12px; border-bottom: 1px solid #1a1920; background: #0f0e12; font-size: 13px; }
.vp-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #23212a; color: var(--dim); font: 700 10.5px/18px var(--font); text-align: center; }
.vp-count:empty { display: none; }
.vp-max { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 13px; }
.vp-max input { width: 40px; height: 24px; border-radius: 6px; border: 1px solid #2a2731; background: #15141a; color: #fff; font: 600 11.5px var(--font); text-align: center; }
.vp-ib { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 3px; border-radius: 7px; border: 0; background: transparent; color: #a9a1c3; cursor: pointer; font-size: 14px; }
.vp-ib:hover { background: #1f1d25; color: #fff; } .vp-ib.on { color: var(--accent); } .vp-ib.danger:hover { color: var(--bad); } .vp-ib.txt { font: 700 10.5px var(--font); }
.vp-list { flex: 1; min-height: 0; overflow: auto; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.vp-empty { margin: auto; display: grid; justify-items: center; gap: 6px; padding: 30px; text-align: center; color: var(--faint); font-size: 22px; }
.vp-empty b { font-size: 14px; color: var(--dim); } .vp-empty small { font-size: 12px; max-width: 230px; }
.vp-panel { flex: none; border-radius: 12px; background: #141318; border: 1px solid #211f27; border-left: 3px solid var(--c); overflow: hidden; animation: popIn .28s var(--ease) both; }
.vp-panel.off { opacity: .7; }
.vp-ph { display: flex; align-items: center; gap: 3px; padding: 5px 5px 5px 3px; background: #18171d; border-bottom: 1px solid #211f27; }
.vp-twirl { display: grid; place-items: center; width: 22px; height: 22px; border: 0; background: transparent; color: var(--faint); cursor: pointer; border-radius: 6px; }
.vp-twirl svg { transition: transform .2s var(--ease); } .vp-twirl.open svg { transform: rotate(90deg); }
.vp-chip { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; margin: 0 3px; }
.vp-name { width: 128px; min-width: 0; background: transparent; border: 1px solid transparent; border-radius: 6px; color: #fff; font: 700 13px var(--font); padding: 3px 5px; }
.vp-name:hover { border-color: #2a2731; } .vp-name:focus { border-color: var(--accent); outline: 0; background: #0f0e12; }
.vp-title { font-size: 13px; padding: 3px 5px; }
.vp-type { color: var(--faint); font-size: 11px; }
.vp-body { display: flex; flex-direction: column; gap: 3px; padding: 8px 10px 11px; }
.vp-help { margin: 0 0 4px; color: var(--faint); font-size: 11.5px; }
.vp-err { display: flex; gap: 6px; align-items: center; margin: 0 0 4px; color: var(--bad); font-size: 12px; }
.vp-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 28px; }
.vp-lab { font-size: 12px; color: #a49cbd; user-select: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; }
.vp-ctl { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--faint); }
.vp-ctl input[type="range"] { flex: 1; min-width: 40px; }
.vp-ctl select, .vp-ctl input[type="text"], .vp-row > .vp-ctl > input[type="number"]:not(.vp-num) { flex: 1; min-width: 0; height: 26px; border-radius: 7px; border: 1px solid #2a2731; background: #0f0e12; color: #eee8ff; font: 500 12px var(--font); padding: 0 7px; }
.vp-num { width: 64px; flex: none; height: 24px; border-radius: 6px; border: 1px solid #2a2731; background: #0f0e12; color: #fff; font: 600 11.5px var(--font); padding: 0 5px; font-variant-numeric: tabular-nums; }
.vp-num:focus, .vp-ctl select:focus, .vp-ctl input[type="text"]:focus { border-color: var(--accent); outline: 0; }
.vp-chan { flex: none; height: 20px; padding: 0 6px; border-radius: 5px; border: 1px solid #2a2731; background: #15141a; color: var(--faint); font: 700 10px var(--font); cursor: pointer; }
.vp-chan.on, .vp-chan:hover { color: var(--accent); border-color: rgba(255, 79, 207, .5); }
.vp-sw { width: 26px; height: 22px; padding: 0; border: 1px solid #2a2731; border-radius: 6px; background: none; cursor: pointer; flex: none; }
.vp-group { display: grid; gap: 2px; padding: 3px 0 4px; }
.vp-group > .vp-row:not(:first-child) .vp-lab { padding-left: 12px; color: var(--faint); }
.vp-check input { accent-color: var(--accent); width: 15px; height: 15px; flex: none; } .vp-check .vp-ctl small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp-src { display: grid; gap: 8px; padding: 2px 0 6px; }
.vp-srcinfo { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; }
.vp-srcinfo > div:last-child { display: grid; gap: 2px; min-width: 0; } .vp-srcinfo b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vp-srcinfo small { font-size: 11px; }
.vp-srcthumb { aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: #000; } .vp-srcthumb video, .vp-srcthumb img { width: 100%; height: 100%; object-fit: cover; }
.vp-render { display: grid; gap: 8px; padding: 6px 0 2px; }
.vp-render .xrow { align-items: center; gap: 10px; } .vp-rst { font-size: 11.5px; }
.vp-prog { height: 4px; border-radius: 4px; background: #211f27; overflow: hidden; opacity: 0; transition: opacity .2s; } .vp-prog.on { opacity: 1; }
.vp-prog i { display: block; height: 100%; background: var(--grad); transition: width .2s; }
.vp-renders h4 { margin: 6px 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.vp-rrow { display: flex; align-items: center; gap: 8px; padding: 4px; border-radius: 8px; } .vp-rrow:hover { background: #1a1920; }
.vp-rrow .grow { display: grid; min-width: 0; } .vp-rrow b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .vp-rrow small { font-size: 10.5px; }
.vp-rthumb { position: relative; flex: none; width: 64px; height: 36px; border-radius: 6px; overflow: hidden; border: 0; padding: 0; background: #000; cursor: pointer; color: #fff; }
.vp-rthumb video { width: 100%; height: 100%; object-fit: cover; } .vp-rthumb svg { position: absolute; inset: 0; margin: auto; opacity: 0; transition: opacity .2s; } .vp-rthumb:hover svg { opacity: 1; }
.vfx-lib { width: 460px; } .vfx-lib h4 { margin: 12px 0 6px; }
.vfx-keys { width: 380px; } .vfx-keylist { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin-top: 10px; font-size: 12.5px; }
.vfx-keylist kbd { font: 600 11px var(--font); color: #fff; background: #23212a; border: 1px solid #312e39; border-radius: 6px; padding: 2px 7px; white-space: nowrap; justify-self: start; }

/* ------------------------------------------------------------------ VFX round 16 */
.vfx-main > .vg-tools { width: auto; border-right: 1px solid #1a1920; padding-top: 10px; }
.vg-empty { inset: 0; }
.vg-tool.on { background: #1f1d25; box-shadow: inset 2px 0 0 var(--c); }
.vg-fly { position: fixed; z-index: 60; min-width: 250px; max-width: 300px; padding: 6px; border-radius: 13px; background: rgba(24, 22, 29, .97); backdrop-filter: blur(12px);
  border: 1px solid #312e39; border-left: 3px solid var(--c); box-shadow: 0 26px 50px -18px rgba(0, 0, 0, .85); }
.vg-fly h4 { margin: 4px 8px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--c); }
.vg-fly-it { display: flex; gap: 10px; align-items: center; width: 100%; padding: 7px 8px; border-radius: 8px; border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--ink); }
.vg-fly-it:hover { background: #2a2731; }
.vg-fly-it i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.vg-fly-it span { display: grid; min-width: 0; } .vg-fly-it b { font-size: 13px; } .vg-fly-it small { color: var(--faint); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg-fly-it.na, .vg-tab-it.na { opacity: .42; cursor: not-allowed; }
.vg-wire.insert { stroke: var(--accent); stroke-width: 3; filter: drop-shadow(0 0 4px rgba(255, 79, 207, .8)); }
.vg-hitin { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: grab; }
.vg-stage.panning { cursor: grabbing; }
.vfx-from { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font: 600 12.5px var(--font); color: #efe8ff; background: #18161d; border: 1px solid #2a2731; cursor: pointer; transition: border-color .2s, background .2s; }
.vfx-from small { color: var(--dim); font-weight: 500; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vfx-from:hover { border-color: var(--accent); background: #1e1822; }
.vfx-from.na { color: #6d6780; background: transparent; border-style: dashed; cursor: help; }
.vfx-from.na:hover { border-color: #4a4555; background: transparent; }
.vfx-hint { display: grid; gap: 6px; } .vfx-hint .help { margin: 0; } .vfx-hint .xrow { margin-top: 6px; }
.vp-livest { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; background: #101014; border: 1px solid #23212a; font-size: 15px; }
.vp-livest span { display: grid; min-width: 0; } .vp-livest b { font-size: 12.5px; } .vp-livest small { font-size: 11px; }
.vp-livest.s-up-to-date { border-color: rgba(143, 224, 124, .35); color: var(--ok); }
.vp-livest.s-changed { border-color: rgba(255, 179, 64, .45); color: var(--warn); }
.vp-livest.s-not-sent-yet { color: var(--accent); }
.vg-node.t-totimeline { background: linear-gradient(100deg, #ffb340, #ff4f8b 45%, #b54dff); color: #16060f; }

/* Library folders and picking */
.lib-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; margin-bottom: 18px; }
.lib-folder { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--card-line); background: var(--card); color: var(--ink);
  text-align: left; cursor: pointer; transition: border-color .2s, transform .25s var(--ease); animation: cardIn .45s var(--ease) both; animation-delay: var(--d, 0ms); }
.lib-folder:hover { border-color: var(--hover-line); transform: translateY(-2px); }
.lib-fthumb { aspect-ratio: 16 / 10; border-radius: 9px; overflow: hidden; background: #0b0a10; display: grid; place-items: center; color: #4a4356; font-size: 22px; }
.lib-fthumb video, .lib-fthumb img { width: 100%; height: 100%; object-fit: cover; }
.lib-ftxt { display: grid; gap: 3px; min-width: 0; } .lib-ftxt b { display: flex; gap: 6px; align-items: center; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lib-ftxt small { font-size: 11.5px; }
.lib-folderhead { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.lib-folderhead .sec-title { display: flex; gap: 8px; align-items: center; margin: 0; }
.lib-every { margin: 4px 0 10px; font-size: 13px; color: var(--dim); font-weight: 650; }
.lib-pickbar { position: sticky; top: calc(var(--top) + 8px); z-index: 6; display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; margin-bottom: 12px; border-radius: 12px;
  background: rgba(24, 22, 29, .94); backdrop-filter: blur(10px); border: 1px solid #312e39; animation: popIn .25s var(--ease) both; }
.lib-pickbar .btn.danger { background: var(--bad); color: #1a0503; } .lib-pickbar .btn.danger:disabled { opacity: .4; } .lib-folderhead .btn.ghost.danger { color: var(--bad); box-shadow: inset 0 0 0 1px rgba(255, 107, 94, .45); }
.btn.armed { background: var(--bad) !important; color: #1a0503 !important; }
.selecting .rcard { cursor: pointer; }
.selecting .rcard::after { content: ""; position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; border-radius: 7px; border: 2px solid rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .35); z-index: 3; pointer-events: none; }
.selecting .rcard.picked { box-shadow: 0 0 0 2px var(--accent); }
.selecting .rcard.picked::after { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c0418' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 16px no-repeat; border-color: var(--accent); }
.vp-live .help { font-size: 11.5px; margin: 0; }
.vp-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 74px; }

/* the canvas sits under the app bar like every page; full screen (the button in its header) covers the bar too */
.cv { top: var(--top); }
.cv.cv-full .cv-body { grid-template-columns: 0 minmax(0, 1fr); } .cv.cv-full .cv-pal { visibility: hidden; padding: 0; border: 0; }
.cv-fullbtn.on { color: var(--accent); background: var(--accent-soft); }

/* ------------------------------------------------------------------ round 17: canvas toolbar, pipes, episodes */
.cv-body { grid-template-columns: 76px minmax(0, 1fr); }
.cv-pal.cv-tools { padding: 10px 7px; gap: 4px; overflow: visible; }
.cv-tools .cv-pal-list { display: grid; gap: 4px; }
.cv-tool { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 8px 2px 7px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: #cfc7e4; cursor: pointer; transition: background .15s, border-color .15s; }
.cv-tool .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 16px; background: #17141f; transition: transform .2s var(--ease); }
.cv-tool small { font-size: 10px; font-weight: 600; color: var(--faint); text-align: center; line-height: 1.15; }
.cv-tool:hover, .cv-tool.on { background: #13111c; border-color: #2a2538; } .cv-tool:hover .ic, .cv-tool.on .ic { transform: scale(1.06); }
.cv-tool.on small { color: var(--ink); }
.cv-tool.cat-in .ic { color: #3ec5ff; } .cv-tool.cat-ai .ic { color: #a98bff; } .cv-tool.cat-video .ic { color: #ff5fd8; } .cv-tool.cat-image .ic { color: #ffb340; }
.cv-tool.cat-audio .ic { color: #3ec5ff; } .cv-tool.cat-finish .ic { color: #3fd3b0; } .cv-tool.cat-out .ic { color: #ffc24a; } .cv-tool.cat-util .ic { color: #8a8597; }
.cv-fly { position: fixed; z-index: 80; width: 300px; max-height: min(560px, calc(100vh - 20px)); overflow: auto; padding: 8px; border-radius: 16px; background: rgba(20, 18, 27, .97);
  backdrop-filter: blur(14px); border: 1px solid #2c2838; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); display: grid; gap: 2px; }
.cv-fly h4 { margin: 4px 8px 6px; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.cv-fly .cv-pal-item { grid-template-columns: 32px minmax(0, 1fr); padding: 7px 8px; border-radius: 11px; cursor: grab; }
.cv-fly .cv-pal-item .ic { width: 32px; height: 32px; font-size: 15px; }
.cv-fly .cv-pal-item .tx small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cv-wire.insert { stroke-width: 5 !important; filter: drop-shadow(0 0 6px rgba(255, 79, 207, .9)); }
.ep-card:hover .ep-del, .ep-del:focus-visible, .ep-del.armed { opacity: 1; }
.ep-del.armed { background: var(--bad); }
/* ------------------------------------------------------------------ graphics card tiers, creator modes */
.tier-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.tier-opt { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.tier-opt:hover { border-color: #4a4555; transform: translateY(-1px); }
.tier-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.tier-opt b { font: 800 20px/1 var(--display); letter-spacing: .02em; } .tier-opt em { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent); }
.tier-opt small { color: var(--dim); font-size: 11.5px; line-height: 1.35; }
.tier-files { display: grid; gap: 6px; margin: 4px 0; }
.tier-file { display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: center; font-size: 12.5px; }
.cc-tabs { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
.cc-modes { grid-column: 1 / -1; margin: 8px; display: flex; }
.cc-modes button { flex: 1; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.cc-write { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); font: 14px/1.5 var(--font); resize: vertical; }
.cc-write:focus { outline: none; border-color: var(--accent); }
/* ------------------------------------------------------------------ Chinese UI */
:root:lang(zh-CN) { --font: "Inter Variable", "Inter", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  --display: "Archivo Variable", "Archivo", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif; }
:root:lang(zh-CN) .display { letter-spacing: .02em; }
.i18n-banner { position: fixed; left: 14px; bottom: 14px; z-index: 90; max-width: 420px; padding: 9px 14px; border-radius: 12px; font-size: 12.5px; color: var(--ink);
  background: rgba(24, 22, 29, .94); border: 1px solid #312e39; backdrop-filter: blur(10px); box-shadow: 0 16px 40px -18px rgba(0, 0, 0, .8); pointer-events: none; animation: popIn .3s var(--ease) both; }

/* ---------------------------------------------------------------- sign-in and licence (license.js) */
body.lic-locked { overflow: hidden; }
.lic-gate { position: fixed; inset: 0; z-index: 700; display: grid; place-items: center; padding: 24px 16px; overflow: auto; background: #070609;
  transition: opacity .5s var(--ease), filter .5s var(--ease); }
.lic-gate.leaving { opacity: 0; filter: blur(8px); }
.lic-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.lic-aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .32; mix-blend-mode: screen; animation: lic-drift 22s ease-in-out infinite alternate; }
.lic-aurora i:nth-child(1) { background: #ff4fcf; left: -18vmax; top: -22vmax; }
.lic-aurora i:nth-child(2) { background: #6a4bff; right: -20vmax; bottom: -24vmax; animation-duration: 28s; animation-delay: -6s; }
.lic-aurora i:nth-child(3) { background: #ff8a4f; left: 30%; top: 55%; width: 34vmax; height: 34vmax; opacity: .16; animation-duration: 34s; }
@keyframes lic-drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(6vmax, 4vmax) scale(1.12); } 100% { transform: translate(-4vmax, 7vmax) scale(.94); } }
.lic-card { position: relative; width: min(420px, 100%); padding: 30px 30px 26px; border-radius: 22px; background: rgba(21, 20, 25, .78);
  backdrop-filter: blur(22px) saturate(140%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05); }
.lic-card.in { animation: lic-in .55s var(--ease) both; }
@keyframes lic-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.lic-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.lic-brand .mark { width: 28px; height: 28px; }
.lic-brand .word { font-family: var(--display); font-weight: 800; font-stretch: 118%; text-transform: uppercase; letter-spacing: -.01em; font-size: 17px; }
.lic-brand .sub { color: var(--dim); font-size: 13px; font-weight: 600; }
.lic-form { display: flex; flex-direction: column; gap: 12px; }
.lic-form > * { animation: lic-in .5s var(--ease) both; }
.lic-form > *:nth-child(2) { animation-delay: .04s; } .lic-form > *:nth-child(3) { animation-delay: .08s; } .lic-form > *:nth-child(4) { animation-delay: .12s; }
.lic-form > *:nth-child(5) { animation-delay: .16s; } .lic-form > *:nth-child(6) { animation-delay: .2s; } .lic-form > *:nth-child(n+7) { animation-delay: .24s; }
.lic-form h1 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.02em; }
.lic-sub { margin: -4px 0 4px; color: var(--dim); font-size: 13.5px; line-height: 1.45; }
.lic-field { display: flex; flex-direction: column; gap: 6px; }
.lic-field > span { font-size: 12px; font-weight: 600; color: var(--dim); letter-spacing: .02em; }
.lic-field small { color: var(--faint); font-size: 12px; }
.lic-field input, .lic-key { width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(9, 9, 11, .6); color: var(--ink);
  font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s; }
.lic-key { height: auto; padding: 12px 14px; resize: none; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; line-height: 1.5; word-break: break-all; }
.lic-field input:focus, .lic-key:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: rgba(9, 9, 11, .85); }
.lic-key.has { border-color: rgba(255, 79, 207, .5); }
.lic-check { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--dim); cursor: pointer; user-select: none; }
.lic-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.lic-err { min-height: 0; color: #ff8f9c; font-size: 13px; line-height: 1.4; }
.lic-err:empty { display: none; }
.lic-err.shake { animation: lic-shake .4s var(--ease); }
@keyframes lic-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.lic-go { position: relative; height: 46px; margin-top: 4px; border-radius: 12px; font-size: 15px; overflow: hidden; }
.lic-go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-100%); }
.lic-go:hover::after { transform: translateX(100%); transition: transform .8s var(--ease); }
.lic-go .lic-spin { display: none; width: 16px; height: 16px; margin-left: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.lic-go.busy .lic-spin { display: inline-block; }
.lic-go:disabled { opacity: .85; cursor: progress; }
@keyframes spin { to { transform: rotate(360deg); } }
.lic-link { align-self: center; border: 0; background: none; color: var(--dim); font: inherit; font-size: 13px; cursor: pointer; padding: 4px 8px; }
.lic-link:hover { color: var(--ink); }
.lic-photo-wrap { display: flex; justify-content: center; margin: 2px 0 4px; }
.lic-photo { position: relative; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--faint);
  background: radial-gradient(circle at 30% 25%, #2a2731, #16151a); box-shadow: 0 0 0 1px var(--line-2), 0 10px 30px rgba(0, 0, 0, .4); transition: transform .25s var(--ease), box-shadow .25s; }
.lic-photo:hover { transform: scale(1.04); box-shadow: 0 0 0 2px var(--accent), 0 12px 34px rgba(255, 79, 207, .2); }
.lic-photo > .i-user { width: 40px; height: 40px; }
.lic-photo img, .lic-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lic-photo.pop-in img { animation: lic-pop .45s var(--ease); }
@keyframes lic-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.lic-photo-add { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 3px #151419; }
.lic-photo-add .i { width: 15px; height: 15px; }
.lic-avatar { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, #ff4fcf, #6a4bff); color: #fff; font-size: 13px; }
.lic-avatar.big { width: 64px; height: 64px; font-size: 26px; align-self: center; }
.lic-step-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.lic-step-ic .i { width: 26px; height: 26px; }
.lic-pc { padding: 12px 14px; border-radius: 14px; background: rgba(255, 79, 207, .07); box-shadow: inset 0 0 0 1px rgba(255, 79, 207, .22); }
.lic-pc small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.lic-pc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lic-pc code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 19px; letter-spacing: .08em; color: var(--ink); user-select: all; }
.lic-copy.ok { color: #7dffb0; }
.lic-done { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 0 18px; font-size: 18px; }
.lic-tick { width: 76px; height: 76px; }
.lic-tick circle { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: lic-draw .5s var(--ease) forwards; }
.lic-tick path { fill: none; stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: lic-draw .35s .4s var(--ease) forwards; }
@keyframes lic-draw { to { stroke-dashoffset: 0; } }
.lic-modal { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 7, .62); backdrop-filter: blur(6px);
  animation: lic-fade .25s var(--ease); }
.lic-modal.leaving { opacity: 0; transition: opacity .2s; }
@keyframes lic-fade { from { opacity: 0; } }
.lic-x { position: absolute; top: 14px; right: 14px; }
/* the chip at the top right */
.acct { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px 0 2px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--ink); cursor: pointer; font: inherit; transition: background .2s, border-color .2s, transform .15s; }
.acct:hover { background: var(--panel-2); }
.acct:active { transform: scale(.97); }
.acct-ring { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p, 1) * 360deg), var(--panel-3) 0); transition: background .4s; }
.acct-ring .lic-avatar { box-shadow: 0 0 0 2px var(--panel); }
.acct.acct-soon .acct-ring { background: conic-gradient(#ffc46b calc(var(--p, 1) * 360deg), var(--panel-3) 0); }
.acct.acct-out .acct-ring, .acct.acct-clock .acct-ring { background: #ff6378; }
.acct-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; max-width: 130px; }
.acct-txt b { font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-txt small { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acct.acct-soon { border-color: rgba(255, 190, 80, .5); }
.acct.acct-soon small { color: #ffc46b; }
.acct.acct-out, .acct.acct-clock { border-color: rgba(255, 99, 120, .6); animation: lic-pulse 2.4s ease-in-out infinite; }
.acct.acct-out small, .acct.acct-clock small { color: #ff8f9c; }
@keyframes lic-pulse { 50% { box-shadow: 0 0 0 5px rgba(255, 99, 120, .12); } }
.acct-popover { padding: 10px; }
.acct-pop { display: flex; flex-direction: column; gap: 10px; }
.acct-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 2px; }
.acct-head b { display: block; font-size: 15px; }
.acct-head small { color: var(--dim); font-size: 12px; }
.acct-ph { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%; }
.acct-ph .lic-avatar.big { width: 52px; height: 52px; font-size: 21px; }
.acct-ph .lic-photo-add { width: 22px; height: 22px; right: -4px; bottom: -4px; opacity: 0; transform: scale(.6); transition: .2s var(--ease); box-shadow: 0 0 0 2px var(--panel); }
.acct-ph:hover .lic-photo-add { opacity: 1; transform: none; }
.acct-ph .lic-photo-add .i { width: 12px; height: 12px; }
.acct-time { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.acct-time small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.acct-time strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.acct-time span { font-size: 12px; color: var(--dim); }
.acct-time.acct-out strong, .acct-time.acct-clock strong { color: #ff8f9c; }
.acct-time.acct-soon strong { color: #ffc46b; }
.acct-bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.acct-bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #6a4bff, var(--accent)); animation: lic-grow .8s var(--ease) both; transform-origin: left; }
@keyframes lic-grow { from { transform: scaleX(0); } }
.acct-acts { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 6px; }
.lic-banner { position: fixed; left: 50%; bottom: 22px; z-index: 90; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; max-width: calc(100vw - 32px);
  border-radius: 14px; background: #2a1219; color: #ffd5db; font-size: 13.5px; box-shadow: 0 0 0 1px rgba(255, 99, 120, .4), 0 16px 40px rgba(0, 0, 0, .5);
  transform: translateX(-50%); animation: lic-up .45s var(--ease); transition: opacity .3s, transform .3s; }
.lic-banner.out { opacity: 0; transform: translate(-50%, 12px); }
.lic-banner > .i { color: #ff8f9c; flex: none; }
@keyframes lic-up { from { opacity: 0; transform: translate(-50%, 16px); } }
@media (max-width: 1680px) { .acct-txt { display: none; } .acct { padding: 0 2px; border-color: transparent; background: transparent; } }
@media (max-width: 720px) { .lic-card { padding: 24px 20px; } }
@media (prefers-reduced-motion: reduce) { .lic-aurora i, .acct.acct-out { animation: none; } .lic-card.in, .lic-form > * { animation-duration: .01s; } }
.qd-paused { display: flex; align-items: center; gap: 10px; margin: 4px 4px 8px; padding: 10px 10px 10px 12px; border-radius: 12px; background: rgba(255, 190, 80, .09);
  box-shadow: inset 0 0 0 1px rgba(255, 190, 80, .35); color: #ffd99a; animation: rise .25s var(--ease); }
.qd-paused > span { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.qd-paused small { color: var(--dim); font-size: 12px; }

/* ---------------------------------------------------------------- VFX keyframes and the curve editor (round 22) */
.vp-key { flex: none; width: 13px; height: 13px; margin-right: 6px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; vertical-align: -2px; }
.vp-key::before { content: ""; position: absolute; inset: 2px; transform: rotate(45deg); border-radius: 2px; box-shadow: inset 0 0 0 1.5px #5d586a; transition: background .15s, box-shadow .15s, transform .2s var(--ease); }
.vp-row:hover .vp-key::before { box-shadow: inset 0 0 0 1.5px #a59fb8; }
.vp-key.anim::before { box-shadow: inset 0 0 0 1.5px #ffc46b; }
.vp-key.on::before { background: #ffc46b; box-shadow: 0 0 0 3px rgba(255, 196, 107, .18); transform: rotate(45deg) scale(1.1); }
.vp-key:active::before { transform: rotate(45deg) scale(.8); }
.vp-animated .vp-num { color: #ffd08a; box-shadow: inset 0 0 0 1px rgba(255, 196, 107, .35); }
.vg-anim { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; transform: rotate(45deg); border-radius: 1px; background: #ffc46b; box-shadow: 0 0 0 2px rgba(255, 196, 107, .2); pointer-events: none; }
.ce-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(5, 5, 7, .55); backdrop-filter: blur(4px); animation: lic-fade .2s var(--ease); }
.ce-modal.leaving { opacity: 0; transition: opacity .18s; }
.ce-box { width: min(1040px, 100%); border-radius: 18px; background: var(--panel); box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; animation: lic-in .35s var(--ease); }
.ce-head-row { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ce-head-row b { font-size: 14px; }
.ce-chips, .ce-int { display: inline-flex; gap: 4px; }
.ce-svg { display: block; width: 100%; height: auto; aspect-ratio: 960 / 380; background: #0d0c10; cursor: crosshair; touch-action: none; }
.ce-grid { stroke: #1f1d25; stroke-width: 1; }
.ce-grid.zero { stroke: #3a3644; }
.ce-lbl { fill: #6f6a80; font: 11px Inter Variable, system-ui; }
.ce-head { stroke: #ff4fcf; stroke-width: 1.5; }
.ce-curve { fill: none; stroke-width: 2; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(0, 0, 0, .6)); }
.ce-key { stroke: #0d0c10; stroke-width: 2; cursor: grab; transition: r .12s; }
.ce-key:hover { r: 7; }
.ce-key.sel { stroke: #fff; stroke-width: 2.5; }
.ce-key.step { rx: 0; }
.ce-foot { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; font-size: 12px; color: var(--dim); border-top: 1px solid var(--line); flex-wrap: wrap; }
.ce-info { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- Roto / Paint / Tracker on the Viewer (rounds 24-26) */
.vv-ov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.vv-stage.drawing { cursor: crosshair; }
.vv-stage.drawing:active { cursor: crosshair; }
.vv-tools { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 12px;
  background: rgba(18, 17, 22, .92); backdrop-filter: blur(10px); box-shadow: 0 0 0 1px var(--line-2), 0 10px 30px rgba(0, 0, 0, .45); animation: rise .25s var(--ease); max-width: calc(100% - 20px); flex-wrap: wrap; cursor: default; }
.vv-tools .vv-btn { height: 28px; }
.vv-tname { font-size: 12px; padding: 0 8px 0 4px; color: #e8c75a; }
.vv-thint { font-size: 11px; color: var(--faint); padding: 0 6px; white-space: nowrap; }
.ov-shape { fill: rgba(232, 199, 90, .07); stroke: #e8c75a; stroke-width: 1.5; }
.ov-shape.sel { fill: rgba(232, 199, 90, .14); stroke: #ffe08a; stroke-width: 2; }
.ov-shape.sub { stroke-dasharray: 6 4; }
.ov-shape.hid { opacity: .3; }
.ov-pt { fill: #15141a; stroke: #e8c75a; stroke-width: 1.5; }
.ov-pt.sel { fill: #ffe08a; }
.ov-pt.dim { opacity: .55; }
.ov-pt.first { fill: #e8c75a; }
.ov-draft { fill: none; stroke: #ffe08a; stroke-width: 1.5; stroke-dasharray: 5 4; }
.ov-brush { fill: none; stroke: rgba(255, 255, 255, .9); stroke-width: 1.2; filter: drop-shadow(0 0 1px #000); }
.ov-brush.src { stroke: rgba(255, 79, 207, .9); stroke-dasharray: 4 3; }
.ov-cross { stroke: #ff4fcf; stroke-width: 1.5; }
.ov-track { fill: none; stroke: #5fe39a; stroke-width: 1.5; }
.ov-track.sel { stroke: #b6ffd2; stroke-width: 2; }
.ov-search { fill: none; stroke: rgba(95, 227, 154, .45); stroke-width: 1; stroke-dasharray: 4 3; }
.ov-path { fill: none; stroke: rgba(95, 227, 154, .55); stroke-width: 1.2; }
.ov-tlabel { fill: #b6ffd2; font: 600 11px Inter Variable, system-ui; paint-order: stroke; stroke: #000; stroke-width: 3px; }
.vp-shapes { display: flex; flex-direction: column; gap: 6px; }
.vp-shape { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 9px; background: #121116; box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; flex-wrap: wrap; }
.vp-shape.sel { box-shadow: inset 0 0 0 1px rgba(232, 199, 90, .6); background: #18161c; }
.vp-shname { width: 84px; height: 24px; border-radius: 6px; border: 1px solid var(--line-2); background: #0d0c10; color: var(--ink); font: inherit; font-size: 12px; padding: 0 6px; }
.vp-shape select { height: 24px; border-radius: 6px; border: 1px solid var(--line-2); background: #0d0c10; color: var(--ink); font-size: 12px; }
.vp-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--faint); }
.vp-mini .vp-num { width: 52px; }
.vp-anim-tag { font-style: normal; font-size: 10.5px; color: #ffc46b; }
.vp-bake { flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.vp-head { margin: 10px 0 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.gz-box { width: min(440px, 100%); }
.gz-body { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.gz-name { width: 100%; height: 38px; font-size: 14px; }
.gz-row { display: flex; align-items: center; }
.gz-row .opt { flex: 1; }
.vt-btn.on { color: #47d18f; }
.vp-ai { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 12px; background: linear-gradient(135deg, rgba(255, 79, 207, .08), rgba(125, 107, 255, .06)); box-shadow: inset 0 0 0 1px rgba(255, 79, 207, .25); }
.vp-ai-row { display: flex; align-items: center; gap: 10px; }
.vp-ai-row b { display: block; font-size: 12.5px; }
.vp-ai-row small { display: block; font-size: 11.5px; color: var(--dim); }
.vp-ai-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.vp-ai.s-done .vp-ai-dot { background: #47d18f; box-shadow: 0 0 0 3px rgba(71, 209, 143, .18); }
.vp-ai.s-queued .vp-ai-dot, .vp-ai.s-running .vp-ai-dot, .vp-ai.s-rendering .vp-ai-dot { background: var(--accent); animation: lic-pulse 1.4s ease-in-out infinite; }
.vp-ai.s-failed .vp-ai-dot, .vp-ai.stale .vp-ai-dot { background: #ff6378; }
.vp-ai.s-failed small, .vp-ai.stale small { color: #ff8f9c; }
/* round 31: an AI node rendering - blurred input with progress over it */
.vv-wait { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 3; }
.vv-wait[hidden] { display: none; }
.vv-wait-in { display: grid; justify-items: center; gap: 6px; padding: 18px 26px; border-radius: 16px; background: rgba(14, 13, 18, .55); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.08); animation: vvWaitIn .35s ease both; }
.vv-wait-t { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.82);
  background: linear-gradient(90deg, rgba(255,255,255,.45), #fff, rgba(255,255,255,.45)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: vvShimmer 1.8s linear infinite; }
.vv-wait-t::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: vvDots 1.4s steps(4) infinite; -webkit-text-fill-color: rgba(255,255,255,.8); }
.vv-wait-p { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--lime, #c6ff3d); line-height: 1; }
.vv-wait-p:empty { display: none; }
.vv-wait-s { font-size: 11.5px; color: rgba(255,255,255,.55); }
.vv-wait-bar { display: block; width: 180px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); overflow: hidden; }
.vv-wait-bar > i { display: block; height: 100%; background: var(--lime, #c6ff3d); border-radius: 3px; transition: width .6s ease; }
.vv-wait.indet .vv-wait-bar > i { width: 35% !important; animation: vvIndet 1.3s ease-in-out infinite; }
@keyframes vvShimmer { to { background-position: -200% 0; } }
@keyframes vvDots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@keyframes vvIndet { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes vvWaitIn { from { opacity: 0; transform: scale(.96); } }
.vv-lost { position: absolute; inset: auto 0 14px; margin: auto; width: fit-content; padding: 7px 14px; border-radius: 999px; background: rgba(18,17,22,.9); font-size: 12px; color: rgba(255,255,255,.8); z-index: 4; }
.vv-lost[hidden] { display: none; }

/* round 31: the canvas header looks like the app's top bar (as in VFX) */
.cv .cv-top { background: rgba(9, 9, 10, .94); backdrop-filter: blur(14px); border-bottom: 1px solid #16151a; }
/* recent tabs: a slim strip under the top bar */
body { --top: calc(var(--bar) + var(--tabs)); }
body.has-tabs { --tabs: 38px; }
.tabbar { display: none; }
body.has-tabs .tabbar { position: sticky; top: var(--bar); z-index: 39; display: flex; align-items: center; gap: 2px; height: var(--tabs); padding: 0 14px; overflow-x: auto; scrollbar-width: none;
  background: rgba(9, 9, 10, .9); backdrop-filter: blur(14px); border-bottom: 1px solid #16151a; }
.tabbar::-webkit-scrollbar { display: none; }
.tabbar .tab { flex: none; display: flex; align-items: center; gap: 7px; height: 28px; max-width: 260px; padding: 0 5px 0 11px; border-radius: 8px; font-size: 13px; font-weight: 500; color: #9a93b2; text-decoration: none;
  transition: background .15s, color .15s; animation: tabIn .22s var(--ease) both; }
.tabbar .tab > svg { width: 14px; height: 14px; flex: none; opacity: .75; }
.tabbar .tab-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar .tab:hover { background: #141318; color: #d9d3ee; }
.tabbar .tab.on { background: #1a1820; color: #fff; box-shadow: inset 0 -2px 0 #ff5fd0; }
.tabbar .tab.on > svg { opacity: 1; color: #ff8be3; }
.tab-x { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 5px; background: none; color: inherit; opacity: 0; cursor: pointer; transition: opacity .15s, background .15s; }
.tab-x svg { width: 12px; height: 12px; }
.tabbar .tab:hover .tab-x, .tabbar .tab.on .tab-x { opacity: .7; }
.tab-x:hover { opacity: 1 !important; background: rgba(255, 255, 255, .1); }
@keyframes tabIn { from { opacity: 0; transform: translateY(-3px); } }
/* round 31: cut a pipe */
.cv-cut { position: absolute; z-index: 30; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px; border: 1px solid rgba(255, 107, 94, .55);
  background: rgba(24, 12, 16, .94); color: #ffb3aa; font: 600 12px/1 var(--font); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.cv-cut[hidden] { display: none; }
.cv-cut svg { width: 13px; height: 13px; }
.cv-cut:hover { background: #ff6b5e; color: #1a0705; border-color: #ff6b5e; }
.cv-group.sel .cv-ghead { background: color-mix(in srgb, var(--gc) 22%, transparent); }
/* round 31: pick the text → image model for a sheet */
.cc-models { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cc-model { display: grid; gap: 2px; text-align: left; padding: 9px 11px; border-radius: 11px; border: 1px solid #25222c; background: #121116; color: #cfc8e6; cursor: pointer; transition: border-color .15s, background .15s; }
.cc-model b { font-size: 12.5px; color: #fff; }
.cc-model small { font-size: 11px; color: #8d86a3; line-height: 1.3; }
.cc-model:hover { border-color: #3a3546; }
.cc-model.on { border-color: transparent; background: linear-gradient(#17151d, #17151d) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.cc-model-sel { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid #27242e; background: #121116; color: #e8e2fa; font: 500 13px var(--font); }
@media (max-width: 760px) { .cc-models { grid-template-columns: 1fr; } }
/* tabs: rename, resize, reorder */
.tabbar .tab { position: relative; user-select: none; touch-action: none; }
.tabbar .tab.sized { max-width: none; }
.tabbar .tab .tab-t { flex: 1; min-width: 0; }
.tabbar .tab.moving { z-index: 2; background: #221f2a; color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); transition: none; cursor: grabbing; }
.tabbar .tab:not(.moving) { transition: background .15s, color .15s, transform .18s var(--ease); }
.tab-grip { position: absolute; top: 4px; bottom: 4px; right: -3px; width: 7px; cursor: ew-resize; border-radius: 3px; z-index: 1; }
.tab-grip:hover, .tab.sizing .tab-grip { background: rgba(255, 95, 208, .45); }
.tab-ren { flex: 1; min-width: 60px; height: 22px; padding: 0 6px; border: 1px solid #6d55c7; border-radius: 6px; background: #0d0c11; color: #fff; font: 500 13px var(--font); outline: none; }
/* PRO licence: a badge by the logo and the welcome celebration */
body.is-pro .logo::after { content: "PRO"; align-self: center; margin-left: 2px; padding: 3px 6px 2px; border-radius: 6px; font: 800 9.5px/1 var(--display); font-stretch: 125%; letter-spacing: .14em; color: #1c0418;
  background: linear-gradient(120deg, #ffd36b, #ff5fd0 55%, #b46bff); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, 0 2px 10px rgba(255, 95, 208, .35); background-size: 200% 100%; animation: proShine 4s ease-in-out infinite; }
@keyframes proShine { 50% { background-position: 100% 0; } }
.pro-party { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, rgba(255, 95, 208, .22), rgba(6, 5, 10, .78) 60%); backdrop-filter: blur(3px); overflow: hidden; animation: proFade .35s ease both; }
.pro-party.out { animation: proFadeOut .4s ease both; }
.pro-bit { position: absolute; pointer-events: none; }
.pro-card { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; padding: 30px 38px 28px; max-width: min(440px, calc(100vw - 32px)); text-align: center; border-radius: 22px;
  background: linear-gradient(#141219, #141219) padding-box, linear-gradient(120deg, #ffd36b, #ff5fd0, #b46bff) border-box; border: 1.5px solid transparent; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: proPop .6s cubic-bezier(.2, 1.4, .4, 1) both .1s; }
.pro-card h2 { margin: 6px 0 0; font: 800 24px/1.15 var(--display); font-stretch: 112%; color: #fff; }
.pro-card p { margin: 0 0 8px; color: #b9b2cc; font-size: 14px; line-height: 1.45; }
.pro-burst { position: relative; display: grid; place-items: center; width: 120px; height: 120px; }
.pro-burst::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #ffd36b, #ff5fd0, #b46bff, #3ad7ff, #ffd36b); filter: blur(18px); opacity: .55; animation: proSpin 6s linear infinite; }
.pro-big { position: relative; padding: 10px 18px 8px; border-radius: 14px; font: 900 34px/1 var(--display); font-stretch: 125%; letter-spacing: .12em; color: #1c0418;
  background: linear-gradient(120deg, #ffd36b, #ff5fd0 55%, #b46bff); box-shadow: 0 10px 30px rgba(255, 95, 208, .5); animation: proBadge .9s cubic-bezier(.2, 1.6, .4, 1) both .25s; }
@keyframes proFade { from { opacity: 0; } }
@keyframes proFadeOut { to { opacity: 0; } }
@keyframes proPop { from { opacity: 0; transform: scale(.85) translateY(14px); } }
@keyframes proBadge { from { opacity: 0; transform: scale(.3) rotate(-12deg); } }
@keyframes proSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pro-card, .pro-big, .pro-burst::before, body.is-pro .logo::after { animation: none; } }
/* the guided tour (account menu → Take the tour) */
.guide-card { width: min(380px, calc(100vw - 32px)); gap: 9px; }
.guide-card.busy { opacity: .6; }
.guide-head { display: flex; align-items: center; gap: 8px; }
.guide-n { font: 600 11px var(--font); color: #8d86a3; font-variant-numeric: tabular-nums; }
.guide-ch { display: flex; gap: 4px; margin: 2px 0 4px; }
.guide-ch i { flex: 1; padding: 4px 0 0; border-top: 3px solid #2e2938; font: 600 10px/1.2 var(--font); font-style: normal; color: #6f6984; text-align: center; transition: border-color .3s, color .3s; }
.guide-ch i.done { border-color: #7a3f8f; color: #a99fbf; }
.guide-ch i.on { border-color: #f03fe0; color: #fff; }
.guide .tour-hole { animation: guidePulse 2.4s ease-in-out infinite; }
@keyframes guidePulse { 50% { box-shadow: 0 0 0 9999px rgba(4, 3, 8, .72), 0 0 0 2px #ff7be6, 0 0 60px rgba(240, 63, 224, .85); } }
/* Home: its own button right after the logo */
.nav-home { position: relative; flex: none; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); color: #d9d3ee; font-weight: 600; }
.nav-home svg { width: 15px; height: 15px; }
.nav-home:hover { background: #17151c; color: #fff; }
.nav-home[aria-current="page"] { color: #fff; background: #1d1a24; border-color: rgba(255, 95, 208, .45); box-shadow: inset 0 -2px 0 #ff5fd0; }
@media (max-width: 1100px) { .nav-home span { display: none; } .nav-home { padding: 6px 8px; } }
/* the timeline preview's second player: loads the next shot out of sight */
.tl-video.tl-back { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
/* update popup */
.upd-modal { position: fixed; inset: 0; z-index: 380; display: grid; place-items: center; background: rgba(6, 5, 10, .66); backdrop-filter: blur(4px); animation: proFade .25s ease both; }
.upd-modal.out { animation: proFadeOut .25s ease both; }
.upd-card { width: min(460px, calc(100vw - 32px)); display: grid; gap: 10px; padding: 24px 26px 22px; border-radius: 20px; background: linear-gradient(#15131a, #15131a) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: proPop .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.upd-badge { justify-self: start; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 95, 208, .14); color: #ff9ce6; font: 700 11px var(--font); letter-spacing: .12em; text-transform: uppercase; }
.upd-badge svg { width: 13px; height: 13px; }
.upd-card h2 { margin: 2px 0 0; font: 800 22px/1.2 var(--display); font-stretch: 112%; }
.upd-card p { margin: 0; }
.upd-notes { margin: 0; padding: 10px 14px 10px 30px; max-height: 220px; overflow: auto; border-radius: 12px; background: #0f0e13; color: #cfc8e6; font-size: 13.5px; line-height: 1.55; }
.upd-prog { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.upd-prog[hidden] { display: none; }
.upd-prog i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .4s ease; }
.upd-line { color: #8d86a3; font-size: 12px; }
.acct-ver { display: block; padding: 6px 12px 2px; color: #6f6984; font-size: 11px; }

/* Admin (only on the publishing PC) */
.adm .adm-tabs { margin: -8px 0 18px; }
.adm .adm-tabs button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: #bcb4d4; font-weight: 600; font-size: 13px; cursor: pointer; }
.adm .adm-tabs button:hover { color: var(--ink); }
.adm .adm-tabs button[aria-pressed="true"] { background: var(--panel-3); color: var(--ink); }
.adm .adm-tabs svg { width: 15px; height: 15px; }
.adm-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-stack { display: grid; gap: 16px; }
@media (max-width: 980px) { .adm-grid { grid-template-columns: 1fr; } }
.adm-card { display: grid; gap: 10px; padding: 18px; border-radius: var(--r-lg); background: var(--card, #151419); border: 1px solid var(--card-line, #26232e); position: relative; overflow: hidden; }
.adm-card h3 { margin: 0; font-size: 15px; }
.adm-card.ok { border-color: rgba(143, 224, 124, .35); }
.adm-card.bad { border-color: rgba(255, 107, 94, .4); }
.adm-card .help { margin: 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.adm-lbl { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: #d8d3e6; }
.adm-lbl small { color: var(--faint); font-weight: 500; }
.adm-in { width: 100%; box-sizing: border-box; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #0f0f12; color: var(--ink); font: 14px var(--font); outline: none; }
.adm-in:focus { border-color: rgba(255, 79, 207, .55); }
textarea.adm-in { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.adm-notes { min-height: 130px; }
.adm .xrow .adm-in { flex: 1; width: auto; }
.adm-load, .adm-empty { color: var(--faint); padding: 30px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.adm-empty.small { padding: 18px; font-size: 13px; }
.adm-empty svg { width: 26px; height: 26px; opacity: .6; }
.adm-pill { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--panel-3); color: var(--dim); }
.adm-pill.ok { background: rgba(143, 224, 124, .14); color: var(--ok); }
.adm-pill.busy { background: var(--accent-soft); color: var(--accent); }
.adm-pill.bad { background: rgba(255, 107, 94, .14); color: var(--bad); }
.adm-step { font-size: 13.5px; color: #d8d3e6; }
.adm-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.adm-bar i { display: block; height: 100%; background: var(--grad); transition: width .4s ease; }
.adm-bar i.ind { width: 40% !important; animation: admInd 1.3s ease-in-out infinite; }
@keyframes admInd { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.adm-log summary { cursor: pointer; color: var(--faint); font-size: 12px; }
.adm-log pre { max-height: 220px; overflow: auto; margin: 8px 0 0; padding: 10px; border-radius: 8px; background: #0c0c0f; color: #a9a3b8; font: 11.5px/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.adm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.adm-stat { display: grid; gap: 2px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--card, #151419); border: 1px solid var(--card-line, #26232e); position: relative; overflow: hidden; }
.adm-stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .8; }
.adm-stat b { font: 800 34px/1.05 var(--display); font-stretch: 112%; }
.adm-stat span { font-size: 13px; color: #d8d3e6; }
.adm-stat small { font-size: 11.5px; color: var(--faint); }
.adm-table { display: grid; }
.adm-tr { display: grid; grid-template-columns: minmax(0, 2.4fr) 1fr .8fr .8fr 34px; gap: 10px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.adm-tr.k { grid-template-columns: .9fr minmax(0, 1.6fr) .9fr 1.2fr 34px; }
.adm-tr.head { border-top: 0; color: var(--faint); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.adm-tr > span { min-width: 0; display: grid; }
.adm-notes1 { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tr .mini, .adm .adm-thead .mini, .adm-side .mini { background: #27252d; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.adm-feedback { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .adm-feedback { grid-template-columns: 1fr; } }
.adm-side { display: grid; gap: 10px; }
.adm-issues { display: grid; gap: 6px; max-height: calc(100vh - 260px); overflow: auto; }
.adm-issue { display: grid; gap: 4px; text-align: left; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: #121116; color: var(--ink); cursor: pointer; font: inherit; }
.adm-issue:hover { border-color: var(--line-2); }
.adm-issue.on { border-color: rgba(255, 79, 207, .5); background: #18131b; }
.adm-issue.closed b { color: var(--dim); }
.adm-issue b { font-size: 13.5px; }
.adm-issue small { color: var(--faint); font-size: 11.5px; }
.adm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.adm-thread { display: grid; gap: 12px; padding: 18px; border-radius: var(--r-lg); background: var(--card, #151419); border: 1px solid var(--card-line, #26232e); min-height: 300px; align-content: start; }
.adm-thead h3 { margin: 0; font-size: 16px; }
.adm-posts { display: grid; gap: 10px; }
.adm-post { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: #0f0f12; border: 1px solid var(--line); }
.adm-post.mine { background: #18121b; border-color: rgba(255, 79, 207, .25); }
.adm-who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.adm-who img { width: 22px; height: 22px; border-radius: 50%; }
.adm-who small { color: var(--faint); }
.adm-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; color: #e4e1ec; overflow-wrap: anywhere; }
.adm-reply { display: grid; gap: 8px; }
.adm-key { display: block; padding: 12px; border-radius: 10px; background: #0c0c0f; font: 13px/1.5 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: all; color: #ffd0f2; }
.adm-links { display: flex; gap: 8px; flex-wrap: wrap; }
.acct-admin .badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
/* free trial + buy a key on the key screen */
.lic-trial { background: var(--grad); color: #1c0418; font-weight: 800; }
.lic-trial:hover { filter: brightness(1.08); background: var(--grad); }
.lic-or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 2px 0; }
.lic-or::before, .lic-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.lic-buy { height: 40px; border-radius: 12px; text-decoration: none; }
.lic-banner a.btn { text-decoration: none; }
.acct-acts a.opt { text-decoration: none; color: inherit; }

/* sound layers and sound effects */
.tl-name-btn { border: 0; font: 700 10px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tl-name-btn:hover { color: var(--ink); }
.tl-name-btn svg { width: 11px; height: 11px; }
.tl-name-btn.muted { color: var(--bad); }
.tl-lane.muted .tl-clip { opacity: .4; }
.fx-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.fx-presets .chip { font-size: 12px; }
.fx-sliders { display: grid; gap: 6px; margin-top: 6px; }
.fx-row { display: grid; grid-template-columns: 70px 1fr 64px; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.fx-row output { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.fx-st { font-size: 12px; color: var(--faint); }
.fx-st.busy { color: var(--accent); } .fx-st.ok { color: var(--ok); } .fx-st.bad { color: var(--bad); }
.cv-watch { display: grid; gap: 6px; }
.cv-watch .btn { justify-content: center; }
.fx-presets .chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 79, 207, .35); }

/* timeline rows with headers on the left (eye / mute / name), video rows over V1, a waveform under every sound */
.tl-row { display: flex; align-items: stretch; }
.tl-row > .tl-lane { flex: 1; min-width: 0; }
.tl-rulerrow > .tl-ruler { flex: none; }
.tl-th { position: sticky; left: 0; z-index: 7; flex: none; width: 132px; box-sizing: border-box; display: flex; align-items: center; gap: 6px; padding: 0 8px;
  background: #121116; border-right: 1px solid var(--line); border-top: 1px solid rgba(255, 255, 255, .03); }
.tl-th.corner { height: 24px; border-top: 0; border-bottom: 1px solid var(--line); }
.tl-th.video { box-shadow: inset 3px 0 0 rgba(138, 77, 255, .7); }
.tl-th.audio { box-shadow: inset 3px 0 0 rgba(47, 143, 255, .7); }
.tl-tb { flex: none; width: 24px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: #24222a; color: #d8d3e6; cursor: pointer; }
.tl-tb:hover { background: #302e38; }
.tl-tb svg { width: 13px; height: 13px; }
.tl-tb.off { background: rgba(255, 107, 94, .16); color: var(--bad); }
.tl-tn { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: transparent; padding: 0; color: var(--dim); cursor: pointer; text-align: left; line-height: 1.15; }
.tl-tn.static { cursor: default; }
.tl-tn b { font: 700 11px var(--font); color: var(--ink); }
.tl-tn span { font-size: 10.5px; color: var(--faint); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-tn:not(.static):hover span { color: var(--dim); }
.tl-th.dim .tl-tn { opacity: .5; }
.tl-lane.muted { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .015) 0 8px, transparent 8px 16px); }
.tl-lane.muted .tl-clip, .tl-lane.muted .tl-snd { opacity: .4; }
.tl-lane.vsound { height: calc(var(--lane-h, 62px) * .65); }
.tl-snd { top: 4px; bottom: 4px; }
.tl-snd .tl-wave { position: absolute; top: 3px; bottom: 3px; left: 28px; width: calc(100% - 30px); height: calc(100% - 6px); inset: auto; opacity: .85; }
.tl-snd .tl-mute { position: relative; z-index: 1; }
.tl-cmute { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); z-index: 3; width: 20px; height: 18px; }
.tl-cmute svg, .tl-mute svg { width: 12px; height: 12px; }
.tl-cmute.on { color: #ff8a8a; background: rgba(0, 0, 0, .55); }
.tl-clip.muted { filter: saturate(.3); }
.tl-clip.audio .lbl, .tl-lane.video:not([data-track="V1"]) .tl-clip .lbl { padding-left: 30px; }
.tl-ovbox { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.tl-ov { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tl-screen.v1-off > .tl-video, .tl-screen.v1-off > .tl-still, .tl-screen.v1-off > .tl-ph, .tl-screen.v1-off > .tl-joinimg { visibility: hidden; }
.pop .opt.danger { color: var(--bad); }

/* ---- timeline tools (left strip), lift-and-drop between rows, razor, snapping */
.tl-body { display: flex; gap: 8px; min-width: 0; }
.tl-body[hidden] { display: none; }
.tl-body > .tl-scroll { flex: 1; min-width: 0; }
.tl-tools { flex: none; width: 40px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; align-self: stretch; }
.tl-tool { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: #9a98a6; cursor: pointer; transition: background .15s, color .15s, transform .12s; }
.tl-tool .i { width: 17px; height: 17px; }
.tl-tool:hover { background: rgba(255, 255, 255, .06); color: #e8e6f0; }
.tl-tool:active { transform: scale(.92); }
.tl-tool[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(255, 79, 207, .35); }
.tl-tools-sep { width: 20px; height: 1px; margin: 3px 0; background: var(--line); }
/* a clip being moved lifts off its row */
.tl-clip.lifting { z-index: 6; cursor: grabbing; box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .25); filter: brightness(1.12); transition: box-shadow .15s, filter .15s; will-change: transform; }
.tl-scroll.dragging, .tl-scroll.dragging * { cursor: grabbing !important; }
.tl-lane.drop-ok { background: linear-gradient(90deg, rgba(255, 79, 207, .1), rgba(255, 79, 207, .04)); box-shadow: inset 0 0 0 1px rgba(255, 79, 207, .35); transition: background .15s, box-shadow .15s; }
.tl-snapline { position: absolute; top: 0; bottom: 0; width: 1px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); z-index: 9; pointer-events: none; }
.tl-insert { position: absolute; width: 4px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 10px var(--accent); z-index: 9; pointer-events: none; animation: tlIns .18s ease-out; }
@keyframes tlIns { from { transform: scaleY(.3); opacity: 0; } }
.tl-razorline { position: absolute; top: 22px; bottom: 6px; width: 0; border-left: 1px dashed rgba(255, 255, 255, .75); z-index: 9; pointer-events: none; }
.tl-razorline.all { border-left: 1px solid var(--accent); }
.tl-slice { position: absolute; top: 20px; bottom: 4px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 12px 2px var(--accent); z-index: 9; pointer-events: none; transform-origin: top; animation: tlSlice .5s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes tlSlice { 0% { transform: scaleY(0); opacity: 1; } 35% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
/* cursors per tool */
.tl-scroll[data-tool="razor"] .tl-lane, .tl-scroll[data-tool="razor"] .tl-clip, .tl-scroll[data-tool="razor"] .tl-clip .h { cursor: crosshair; }
.tl-scroll[data-tool="track"] .tl-clip, .tl-scroll[data-tool="track"] .tl-clip .h { cursor: e-resize; }
.tl-scroll[data-tool="hand"], .tl-scroll[data-tool="hand"] * { cursor: grab !important; }
.tl-scroll.panning, .tl-scroll.panning * { cursor: grabbing !important; }
.tl-scroll[data-tool="zoom"] .tl-lane, .tl-scroll[data-tool="zoom"] .tl-clip, .tl-scroll[data-tool="zoom"] .tl-ruler { cursor: zoom-in; }
.tl-scroll[data-tool="razor"] .tl-clip .h:hover, .tl-scroll[data-tool="zoom"] .tl-clip .h:hover { background: transparent; }
@media (prefers-reduced-motion: reduce) { .tl-slice, .tl-insert { animation: none; } }

/* ---- timeline: gaps, volume line, hover preview, deleting, playing */
.tl-gap { position: absolute; top: 6px; bottom: 6px; border-radius: 6px; cursor: pointer; z-index: 1; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 6px, transparent 6px 12px); border: 1px dashed rgba(255, 255, 255, .07); transition: background .15s, border-color .15s; }
.tl-gap span { font-size: 10px; font-weight: 700; color: var(--accent); opacity: 0; transition: opacity .15s; pointer-events: none; }
.tl-gap:hover { background: repeating-linear-gradient(135deg, rgba(255, 79, 207, .14) 0 6px, rgba(255, 79, 207, .04) 6px 12px); border-color: rgba(255, 79, 207, .5); }
.tl-gap:hover span { opacity: 1; }
.tl-scroll:not([data-tool="select"]):not([data-tool="track"]) .tl-gap { pointer-events: none; }
.tl-vol { position: absolute; inset: 2px 0; z-index: 2; pointer-events: none; }
.tl-vol .v-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tl-vol .v-l { fill: none; stroke: #ffd36a; stroke-width: 1.5; opacity: .75; transition: opacity .15s, stroke-width .15s; }
.tl-vol .v-hit { fill: none; stroke: transparent; stroke-width: 9; pointer-events: stroke; cursor: ns-resize; }
.tl-vol.hot .v-l, .tl-clip.sel .tl-vol .v-l { opacity: 1; stroke-width: 2.2; }
.tl-vol .v-dots { position: absolute; inset: 0; }
.tl-vol .v-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: #ffd36a; border: 1.5px solid #1a1206; pointer-events: auto; cursor: move; box-shadow: 0 0 0 2px rgba(255, 211, 106, .25); transition: transform .12s; }
.tl-vol .v-dot:hover { transform: scale(1.35); }
.tl-vol .v-tip { position: absolute; top: -2px; transform: translate(-50%, -100%); padding: 2px 6px; border-radius: 6px; background: #000c; color: #ffd36a; font: 700 10px var(--font); white-space: nowrap; pointer-events: none; z-index: 5; }
.tl-scroll:not([data-tool="select"]) .tl-vol .v-hit, .tl-scroll:not([data-tool="select"]) .tl-vol .v-dot { pointer-events: none; }
.tl-skim { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .55); z-index: 8; pointer-events: none; }
.tl-gone { position: absolute; z-index: 9; pointer-events: none; transform-origin: center; }
.tl-snd.unlinked { opacity: .35; border-style: dashed; }
.tl-snd.lifting { z-index: 6; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, .8); filter: brightness(1.15); }
.tl-wave.fresh { animation: waveIn .7s cubic-bezier(.3, .8, .3, 1) backwards; }
@keyframes waveIn { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.tl-scroll.playing .tl-head { box-shadow: 0 0 10px 1px rgba(255, 179, 64, .7); animation: headGlow 1.6s ease-in-out infinite; }
@keyframes headGlow { 50% { box-shadow: 0 0 16px 3px rgba(255, 179, 64, .45); } }
.tl-snapbtn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .tl-wave.fresh, .tl-scroll.playing .tl-head { animation: none; } }

/* ---- app-wide motion: page slides, ripples, the flight to the queue, renders landing, skeletons */
@keyframes pageInR { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes pageInL { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: none; } }
main[data-dir="r"] > * { animation: pageInR .4s var(--ease) both; }
main[data-dir="l"] > * { animation: pageInL .4s var(--ease) both; }
.rpl-host { overflow: hidden; isolation: isolate; }
.rpl { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 70%); pointer-events: none; z-index: -1; transform: scale(0); opacity: .9; animation: rpl .6s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes rpl { to { transform: scale(1); opacity: 0; } }
.fly-dot { position: fixed; z-index: 2000; width: 14px; height: 14px; border-radius: 50%; pointer-events: none; background: var(--grad, var(--accent)); box-shadow: 0 0 14px 4px rgba(255, 79, 207, .65), 0 0 0 3px rgba(255, 255, 255, .25); }
.q-btn.bump { animation: qBump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes qBump { 30% { transform: scale(1.25) rotate(-6deg); color: var(--accent); } 60% { transform: scale(.94); } }
.xbadge.pop { animation: badgePop .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes badgePop { 40% { transform: scale(1.5); } }
.qd-it.flip-in { animation: qdFlip .65s cubic-bezier(.2, .8, .3, 1.1) both; transform-origin: 50% 50%; }
@keyframes qdFlip { 0% { transform: perspective(600px) rotateX(-90deg); opacity: 0; } 60% { transform: perspective(600px) rotateX(12deg); opacity: 1; } 100% { transform: none; } }
.sk-row { height: 64px; border-radius: 14px; }
.sk-tile { height: 92px; border-radius: 12px; }
.dw .sk-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sk-grid { animation: fadeIn .3s both; }
.sk-grid .sk:nth-child(2) { animation-delay: .12s; } .sk-grid .sk:nth-child(3) { animation-delay: .24s; } .sk-grid .sk:nth-child(4) { animation-delay: .36s; }
/* a render lands on the timeline: the footage sweeps in and the clip flashes once */
.tl-clip.landed { animation: clipFlash 1.2s ease-out; }
.tl-clip.landed::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55) 45%, rgba(255, 79, 207, .5) 55%, transparent); transform: translateX(-100%); animation: clipSweep .9s cubic-bezier(.3, .6, .3, 1) forwards; }
.tl-clip.landed img, .tl-clip.landed video { animation: clipReveal .9s cubic-bezier(.3, .6, .3, 1) both; }
@keyframes clipSweep { to { transform: translateX(100%); } }
@keyframes clipReveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes clipFlash { 0%, 100% { box-shadow: none; } 35% { box-shadow: 0 0 0 2px #fff, 0 0 22px 4px rgba(255, 79, 207, .7); } }
/* the canvas opening: nodes arrive one by one, wires fade in after */
.cv.cv-intro .cv-node { animation: cvNodeIn .5s cubic-bezier(.2, .9, .3, 1.12) both; animation-delay: calc(160ms + var(--i, 0) * 60ms); }
.cv.cv-intro .cv-wires { animation: fadeIn .5s .45s both; }
@keyframes cvNodeIn { from { opacity: 0; transform: translateY(18px) scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main[data-dir] > *, .tl-clip.landed, .tl-clip.landed::after, .cv.cv-intro .cv-node { animation: none; } }

/* ---- timeline layout: the shot panel runs the full height on the right */
.tl { grid-template-columns: minmax(0, 1fr) 8px var(--insp-w, 360px); gap: 2px; align-items: stretch; }
.tl-main { display: grid; gap: 10px; min-width: 0; align-content: start; }
.tl-top { grid-template-columns: var(--bin-w, 280px) 8px minmax(0, 1fr); }
.tl-side { position: relative; min-height: 420px; }
.tl-side > .tl-insp { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 12px; scrollbar-width: thin; }
@media (max-width: 1100px) { .tl { grid-template-columns: 1fr; } .tl-side { min-height: 0; } .tl-side > .tl-insp { position: static; } }
.opt-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
/* ---- the shot panel: header, tabs, panes */
.tl-insp > * + * { margin-top: 10px; }
.ins-meta .fx { color: #9fe7ff; border-color: rgba(62, 197, 255, .35); }
.ins-takes { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ins-takes > small { font-size: 10.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-right: 2px; }
.ins-tabs { position: sticky; top: -12px; z-index: 3; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 3px; border-radius: 12px; background: #0e0d12; border: 1px solid var(--line); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .8); }
.ins-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; border: 0; border-radius: 9px; background: transparent; color: var(--dim); font: 600 12px var(--font); cursor: pointer; transition: background .15s, color .15s; }
.ins-tabs button .i { width: 14px; height: 14px; }
.ins-tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
.ins-tabs button[aria-selected="true"] { color: #fff; background: linear-gradient(180deg, #2a2534, #1e1a27); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 -2px 0 var(--accent); }
.ins-pane { display: grid; gap: 8px; animation: insIn .2s ease-out; }
.ins-box { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.ins-cap { font-size: 10.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
.ins-cap.row { display: flex; align-items: center; gap: 6px; }
/* compact shot info: two columns of small tiles */
.ins-pane .si { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ins-pane .si-row { display: grid; grid-template-columns: 1fr; gap: 1px; padding: 6px 8px; border: 0; border-radius: 8px; background: #121117; }
.ins-pane .si-row > span { font-size: 9.5px; }
.ins-pane .si-row > b { font-size: 12px; line-height: 1.3; }
.ins-pane .si-row > b small { display: block; font-size: 10.5px; }
.ins-pane .si .sc-sec { grid-column: 1 / -1; }
.ins-pane .sc-refs { display: flex; gap: 6px; flex-wrap: wrap; }
.ins-pane .sc-ref img { width: 52px; height: 52px; }
.ins-pane .sc-prompt p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; margin: 0; }
.ins-pane .sc-prompt.open p { -webkit-line-clamp: unset; }
/* tool tiles */
.ins-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ins-tile { display: grid; justify-items: center; align-content: center; gap: 5px; min-height: 64px; padding: 8px 4px; border-radius: 10px; border: 1px solid #25222e; background: #141219; color: var(--ink); cursor: pointer; text-align: center; transition: background .15s, border-color .15s, transform .12s; }
.ins-tile .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 79, 207, .1); color: #ff9ce6; transition: background .15s, transform .2s; }
.ins-tile b { font-size: 11.5px; font-weight: 650; line-height: 1.15; }
.ins-tile:hover { background: #1d1a25; border-color: #3a3348; }
.ins-tile:hover .ic { background: rgba(255, 79, 207, .2); transform: translateY(-1px); }
.ins-tile:active { transform: scale(.96); }
.ins-tile:disabled { opacity: .4; cursor: default; }
.ins-tile.on .ic { background: rgba(63, 211, 176, .14); color: #3fd3b0; }
/* look */
.lk-looks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.lk-sw { display: grid; gap: 4px; padding: 4px 4px 6px; border-radius: 9px; border: 1px solid #25222e; background: #141219; color: var(--dim); cursor: pointer; font: 600 10.5px var(--font); transition: border-color .15s, color .15s, transform .12s; }
.lk-sw i { display: block; height: 22px; border-radius: 6px; }
.lk-sw:hover { color: var(--ink); border-color: #3a3348; transform: translateY(-1px); }
.lk-sw.on { color: #fff; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.lk-sls { display: grid; gap: 6px; }
.lk-sl { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; font-size: 11.5px; color: var(--dim); }
.lk-sl output { font: 600 11px ui-monospace, Consolas, monospace; color: var(--faint); }
.lk-sl output.on { color: #ffd36a; }
.lk-sl input { grid-column: 1 / -1; width: 100%; height: 16px; margin: 0; }
.lk-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.lk-th { position: relative; aspect-ratio: 16 / 10; padding: 0; border-radius: 7px; overflow: hidden; border: 1px solid #25222e; background: #000; cursor: pointer; transition: transform .12s, border-color .15s; }
.lk-th img, .lk-th video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.lk-th span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; font-size: 9.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.lk-th:hover { border-color: var(--accent); transform: scale(1.04); }
.lk-ok { display: inline-flex; align-items: center; gap: 3px; color: #3fd3b0; font-size: 10.5px; text-transform: none; letter-spacing: 0; }
.lk-ok .i { width: 12px; height: 12px; }
.lk-all { justify-content: center; }
/* speed */
.sp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sp-card { display: grid; gap: 3px; justify-items: start; padding: 7px 8px; border-radius: 10px; border: 1px solid #25222e; background: #141219; color: var(--ink); cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .12s; }
.sp-card b { font-size: 11.5px; }
.sp-card small { font-size: 10.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.sp-card:hover:not(:disabled) { border-color: #3a3348; background: #1d1a25; transform: translateY(-1px); }
.sp-card:disabled { opacity: .55; cursor: default; }
.sp-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.sp-card.busy { opacity: 1; animation: insPulse 1.2s ease-in-out infinite; }
.sp-spark { width: 100%; height: 26px; }
.sp-spark polyline { fill: none; stroke: #ff9ce6; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.sp-spark .sp-mid { stroke: rgba(255, 255, 255, .12); stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.sp-card.on .sp-spark polyline { stroke: #ffd36a; }
/* recast / reframe pop-ups */
.rc-pop { display: grid; gap: 8px; padding: 4px; }
.rc-cast { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-height: 210px; overflow: auto; }
.rc-pick { display: grid; gap: 3px; padding: 3px; border-radius: 8px; border: 1px solid #25222e; background: #141219; color: var(--dim); cursor: pointer; font-size: 10px; }
.rc-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.rc-pick span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-pick.on { border-color: var(--accent); color: #fff; }
/* film grain in the preview (the export adds real grain) */
.tl-grain { position: absolute; inset: 0; z-index: 6; pointer-events: none; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainMove .5s steps(4) infinite; }
@keyframes grainMove { 0% { background-position: 0 0; } 25% { background-position: -40px 30px; } 50% { background-position: 50px -20px; } 75% { background-position: -20px -50px; } }
.lk-sl input::-webkit-slider-runnable-track { background: linear-gradient(90deg, #34323c var(--a, 50%), var(--accent) var(--a, 50%), var(--accent) var(--b, 50%), #34323c var(--b, 50%)); }
/* the shot panel stays in view while you scroll down to the timeline */
.tl-side > .tl-insp { position: sticky; inset: auto; top: 100px; height: calc(100vh - 112px); max-height: 100%; }
@media (max-width: 1100px) { .tl-side > .tl-insp { position: static; height: auto; max-height: none; } }
/* the clip's right-click menu: compact, scrolls if the screen is short */
.pop.ctx-pop { max-height: calc(100vh - 24px); overflow-y: auto; padding: 4px; }
.pop.ctx-pop .opt { padding: 6px 10px; font-size: 12.5px; min-height: 0; }
.pop.ctx-pop .opt .i { width: 14px; height: 14px; }
/* the account chip: Admin (the publishing PC) or PRO with ∞ for a key that never runs out; no badge by the logo */
body.is-pro .logo::after { content: none; display: none; }
.acct-txt small.acct-tier { display: inline-flex; align-items: center; gap: 4px; }
.acct-tier b { font-size: 11px; font-weight: 700; color: #ff9ce6; }
.acct-tier .inf { font-size: 13px; line-height: 1; color: var(--dim); }

/* ---- the left Add panel: buttons, not a list */
.add-grp { gap: 8px; }
.add-hero { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 16px; cursor: pointer; text-align: left; color: var(--ink);
  border: 1px solid transparent; background: linear-gradient(180deg, #1d1828, #141119) padding-box, var(--grad) border-box; box-shadow: 0 12px 30px -20px rgba(240, 63, 224, .8); transition: transform .15s, box-shadow .2s; overflow: hidden; }
.add-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 0% 0%, rgba(255, 79, 207, .18), transparent 60%); pointer-events: none; }
.add-hero:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -18px rgba(240, 63, 224, .95); }
.add-hero:active { transform: scale(.98); }
.add-hero-ic { position: relative; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--grad); color: #1c0418; font-size: 19px; box-shadow: 0 8px 18px -8px rgba(240, 63, 224, .9); }
.add-hero .add-tx { position: relative; flex: 1; }
.add-hero .add-tx b { font-size: 15px; } .add-hero .add-tx small { white-space: normal; }
.add-go { position: relative; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: #ff9ce6; transition: background .15s, transform .2s; }
.add-hero:hover .add-go { background: rgba(255, 79, 207, .2); transform: rotate(90deg); }
.add-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.add-sq { display: grid; justify-items: center; align-content: center; gap: 7px; padding: 12px 4px 10px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .06); cursor: pointer; color: var(--ink);
  background: linear-gradient(180deg, rgba(28, 25, 38, .7), rgba(17, 15, 25, .7)); transition: transform .15s, border-color .15s, box-shadow .2s; }
.add-sq b { font-size: 12px; }
.add-sq .add-ic { width: 36px; height: 36px; border-radius: 11px; }
.add-sq:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .14); box-shadow: 0 12px 24px -16px rgba(0, 0, 0, .9); }
.add-sq:active { transform: scale(.96); }
.add-sq.c2 .add-ic { color: #ffc56b; background: rgba(255, 197, 107, .12); } .add-sq.c2:hover { border-color: rgba(255, 197, 107, .4); }
.add-sq.c3 .add-ic { color: #7fd8ff; background: rgba(127, 216, 255, .12); } .add-sq.c3:hover { border-color: rgba(127, 216, 255, .4); }
.add-sq.c4 .add-ic { color: #7fe8cf; background: rgba(127, 232, 207, .12); } .add-sq.c4:hover { border-color: rgba(127, 232, 207, .4); }
.add-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.add-med { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 13px; border: 1px dashed rgba(255, 255, 255, .12); background: transparent; color: var(--ink); cursor: pointer; text-align: left; transition: background .15s, border-color .15s, transform .15s; }
.add-med > .i { width: 18px; height: 18px; flex: none; }
.add-med.c5 > .i { color: #c4b0ff; } .add-med.c3 > .i { color: #7fd8ff; }
.add-med span { display: grid; min-width: 0; } .add-med b { font-size: 12.5px; } .add-med small { font-size: 10.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.add-med:hover { background: rgba(255, 255, 255, .03); border-style: solid; border-color: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.add-hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 2px; padding: 9px 10px; border-radius: 12px; font-size: 11.5px; line-height: 1.35; color: var(--faint); background: rgba(255, 255, 255, .02); border: 1px solid rgba(255, 255, 255, .04); }
.add-hint .i { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.add-hint.on { color: var(--dim); border-color: rgba(255, 79, 207, .2); background: rgba(255, 79, 207, .05); }
.add-hint.on .i { color: #ff9ce6; animation: hintNudge 1.6s ease-in-out infinite; }
@keyframes hintNudge { 50% { transform: translateX(3px); } }
.tl-bin { align-content: start; grid-template-rows: none; }
/* ---- Admin · Website */
.adm-site { display: grid; gap: 12px; }
.site-main .xrow { align-items: center; gap: 10px; }
.site-dot { width: 10px; height: 10px; border-radius: 50%; background: #55525e; flex: none; }
.site-dot.on { background: #3fd3b0; box-shadow: 0 0 0 4px rgba(63, 211, 176, .15); animation: insPulse 2s ease-in-out infinite; }
.site-dot.starting { background: #ffb340; animation: insPulse 1s ease-in-out infinite; }
.site-url { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; }
.site-url code { flex: 1; padding: 9px 12px; border-radius: 10px; background: #0e0d12; border: 1px solid var(--line); font-size: 13px; color: #9fe7ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-get { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 10px; background: rgba(255, 255, 255, .02); border: 1px dashed var(--line); }
.site-made { display: grid; gap: 8px; margin-top: 10px; }
.site-cred { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; }
.site-cred span { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.site-cred code { font-size: 14px; color: var(--ink); }
.adm-tr.s { grid-template-columns: 1.4fr 1fr 1fr 32px; }
/* testers' renders in your queue, and the website's tester list */
.q-tester { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; padding: 1px 7px 1px 5px; border-radius: 999px; font-size: 10.5px; font-weight: 700; vertical-align: 1px;
  color: #9fe7ff; background: rgba(62, 197, 255, .12); border: 1px solid rgba(62, 197, 255, .3); }
.q-tester .i { width: 11px; height: 11px; }
.adm-tr.s { grid-template-columns: 1.3fr .8fr .8fr .6fr .6fr 1.3fr 110px; align-items: center; }
.site-who { display: inline-flex; align-items: center; gap: 8px; }
.site-acts { display: inline-flex; gap: 6px; justify-content: flex-end; }
.site-log { display: grid; gap: 2px; max-height: 360px; overflow: auto; margin-top: 8px; }
.site-ev { display: grid; grid-template-columns: 90px 110px 1fr; gap: 10px; padding: 6px 4px; border-bottom: 1px solid rgba(255, 255, 255, .04); font-size: 12.5px; }
.site-ev b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lic-kicked { color: #ffb4a8; }
/* the website: where a tester's renders are saved */
.site-ask-ov { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px; background: rgba(5, 4, 9, .72); backdrop-filter: blur(8px); animation: fadeIn .25s both; }
.site-ask { width: min(460px, 100%); display: grid; justify-items: center; gap: 10px; padding: 28px 24px 22px; border-radius: 22px; text-align: center;
  background: linear-gradient(180deg, #1b1724, #121017); border: 1px solid #2c2738; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); animation: popIn .35s var(--ease) both; }
.site-ask-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; background: var(--grad); color: #1c0418; }
.site-ask h2 { margin: 4px 0 0; font-size: 20px; }
.site-ask p { margin: 0; color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.site-ask-acts { display: grid; gap: 8px; width: 100%; margin-top: 8px; }
.site-ask-acts .btn { justify-content: center; }
.adm-tr .site-who { display: flex; align-items: center; gap: 8px; } .adm-tr .site-acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
/* ---- Admin · Render farm */
.farm { display: grid; gap: 12px; }
.farm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.farm-stat { display: grid; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--card-line); }
.farm-stat small { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .07em; }
.farm-stat b { font-size: 24px; font-variant-numeric: tabular-nums; }
.farm-mem { display: block; height: 4px; border-radius: 4px; background: #2a2833; overflow: hidden; } .farm-mem > i { display: block; height: 100%; background: var(--grad); }
.farm-filter { justify-self: start; }
.farm-h { margin: 8px 0 0; font-size: 12px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; }
.farm-now { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; }
.farm-done { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.farm-card { display: grid; grid-template-columns: 1fr; gap: 0; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--card-line); }
.farm-card.live { grid-template-columns: 200px minmax(0, 1fr); border-color: rgba(255, 79, 207, .35); box-shadow: 0 14px 34px -22px rgba(240, 63, 224, .8); }
.farm-card.failed { border-color: rgba(255, 107, 94, .4); }
.farm-pic { position: relative; aspect-ratio: 16 / 9; background: #000; display: grid; place-items: center; overflow: hidden; }
.farm-pic img, .farm-pic video { width: 100%; height: 100%; object-fit: cover; }
.farm-ph { color: #4b4757; font-size: 22px; }
.farm-live { position: absolute; top: 6px; left: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, .65); font: 800 9.5px var(--font); letter-spacing: .08em; color: #fff; }
.farm-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff4f6d; animation: insPulse 1.2s ease-in-out infinite; }
.farm-tx { display: grid; gap: 5px; align-content: center; padding: 12px 14px; min-width: 0; }
.farm-tx b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farm-tx small { font-size: 11.5px; color: var(--dim); }
.farm-bar { height: 6px; border-radius: 6px; background: #2a2833; overflow: hidden; } .farm-bar > i { display: block; height: 100%; background: var(--grad); transition: width .6s; }
.farm-pct { font-variant-numeric: tabular-nums; }
.farm-who { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.farm-who .i { width: 11px; height: 11px; }
.farm-who.y { color: #ff9ce6; background: rgba(255, 79, 207, .12); }
.farm-who.t { color: #9fe7ff; background: rgba(62, 197, 255, .12); }
.farm-who.w { color: #ffd36a; background: rgba(255, 211, 106, .12); }
.farm-list { display: grid; gap: 4px; }
.farm-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.farm-row b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.farm-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #24212c; color: var(--dim); flex: none; }
@media (max-width: 900px) { .farm-stats { grid-template-columns: repeat(2, 1fr); } .farm-card.live { grid-template-columns: 1fr; } }

/* ---- the website version only: no GPU controls, no quitting, no model downloads - and a ribbon on the logo */
body.site .gpu-more > .btn, body.site .models-btn:not(.q-btn) { display: none; }
body.site .logo { position: relative; overflow: visible; margin-right: 52px; }
body.local .logo { position: relative; overflow: visible; margin-right: 52px; }
body.site .logo::after, body.local .logo::after { content: "CLOUD"; position: absolute; right: -58px; top: 50%; transform: translateY(-50%) rotate(-8deg); padding: 3px 8px 2px; border-radius: 5px;
  font: 800 8.5px/1 var(--display, inherit); letter-spacing: .18em; color: #1c0418; background: var(--grad); box-shadow: 0 4px 12px -4px rgba(240, 63, 224, .8); pointer-events: none; }

/* ---- start-up: the logo builds, the dots breathe, a welcome types itself */
.boot { position: fixed; inset: 0; z-index: 650; display: grid; place-content: center; justify-items: center; gap: 14px; background: radial-gradient(60% 50% at 50% 40%, #1a1024, #070609 70%); transition: opacity .6s ease, transform .6s ease; }
.boot.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
.boot-mark { width: 74px; height: 74px; animation: bootMark .9s cubic-bezier(.2,.9,.3,1.2) both; filter: drop-shadow(0 12px 30px rgba(240, 63, 224, .5)); }
.boot-mark > * { width: 100%; height: 100%; }
@keyframes bootMark { from { opacity: 0; transform: scale(.6) rotate(-12deg); } }
.boot-word { display: flex; align-items: baseline; gap: 1px; font: 800 30px var(--display, inherit); letter-spacing: .02em; }
.boot-word span { display: inline-block; animation: bootLetter .5s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: calc(.25s + var(--i) * 45ms); }
.boot-word em { margin-left: 10px; font-style: normal; font-size: 13px; letter-spacing: .35em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: bootLetter .6s .75s both; }
@keyframes bootLetter { from { opacity: 0; transform: translateY(14px); } }
.boot-dots { display: flex; gap: 8px; margin-top: 6px; }
.boot-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--grad); animation: bootDot 1.2s ease-in-out infinite; }
.boot-dots i:nth-child(2) { animation-delay: .15s; } .boot-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes bootDot { 0%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1.15); opacity: 1; } }
.boot-hi { min-height: 18px; font-size: 14px; color: var(--dim); }
@media (prefers-reduced-motion: reduce) { .boot *, .boot { animation: none !important; transition: none !important; } }
/* ---- a render on its way: a slow glow fills the clip as it renders */
.tl-clip.rendering::before { content: ""; position: absolute; inset: 0; width: calc(var(--p, 0) * 100%); z-index: 0; pointer-events: none; transition: width .8s ease;
  background: linear-gradient(90deg, rgba(255, 79, 207, .08), rgba(255, 79, 207, .32)); box-shadow: inset -2px 0 0 rgba(255, 156, 230, .9); }
.tl-clip.rendering::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .12) 50%, transparent 70%) 0 0 / 200% 100%; animation: tlShimmer 2.2s linear infinite; }
@keyframes tlShimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
/* ---- the website: where each clip is */
.tl-where { position: absolute; top: 3px; right: 4px; z-index: 3; display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px 1px 4px; border-radius: 999px; font: 700 9.5px var(--font); pointer-events: none; background: rgba(0, 0, 0, .6); color: #9fe7ff; }
.tl-where .i { width: 10px; height: 10px; }
.tl-where[data-state="local"] { color: #7fe8cf; }
.tl-where[data-state="saving"] { color: #ffd36a; } .tl-where[data-state="saving"] .i { animation: whereBob .8s ease-in-out infinite; }
.tl-where[data-state="rendering"] { color: #ff9ce6; }
@keyframes whereBob { 50% { transform: translateY(2px); } }
.site-fly { position: fixed; z-index: 900; pointer-events: none; background: var(--grad); box-shadow: 0 0 20px rgba(240, 63, 224, .6); }
.site-line { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 12px; border-radius: 14px; perspective: 400px;
  background: rgba(20, 17, 27, .92); border: 1px solid #2c2738; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .9); backdrop-filter: blur(10px); }
.site-line b { font-size: 13px; display: inline-block; } .site-line small { color: var(--dim); font-size: 11px; }
.site-line-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: insPulse 1.4s ease-in-out infinite; }
.site-notice { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: 10px; max-width: min(720px, calc(100% - 32px)); padding: 9px 10px 9px 14px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 79, 207, .18), rgba(155, 123, 255, .18)), #15121c; border: 1px solid rgba(255, 79, 207, .35); font-size: 13px; animation: popIn .35s both; }
.site-grant { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--grad); color: #1c0418; font-weight: 700; box-shadow: 0 12px 28px -10px rgba(240, 63, 224, .8); animation: popIn .35s both; }
.site-fb-btn { position: fixed; right: 16px; bottom: 86px; z-index: 60; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700;
  color: var(--ink); background: rgba(20, 17, 27, .9); border: 1px solid #2c2738; }
.site-fb-btn:hover { border-color: var(--accent); }
.site-fb { justify-items: stretch; text-align: left; width: min(520px, 100%); }
.site-fb textarea { width: 100%; min-height: 110px; resize: vertical; box-sizing: border-box; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); font: 14px/1.5 var(--font); outline: none; }
.site-fb textarea:focus { border-color: var(--accent); }
.site-fb textarea::placeholder { color: #6e6e77; }
.site-fb-pic { position: relative; } .site-fb-pic img { width: 100%; border-radius: 10px; border: 1px solid var(--line); } .site-fb-pic .mini { position: absolute; top: 6px; right: 6px; }
.site-ask-acts.row { display: flex; justify-content: flex-end; }
.lic-link { margin-top: 6px; border: 0; background: none; color: #ff9ce6; font-size: 12.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.acct-sub { display: block; font-size: 11px; color: var(--dim); }
/* ---- Admin: invites, feedback, and a glow round what's rendering */
.site-invites { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.site-invites .chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #1c1924; font-size: 11.5px; }
.site-fbs { display: grid; gap: 10px; margin-top: 8px; max-height: 520px; overflow: auto; }
.site-fbi { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.site-fbi p { margin: 6px 0; font-size: 13px; white-space: pre-wrap; }
.site-fbi img { max-width: 100%; max-height: 220px; border-radius: 8px; border: 1px solid var(--line); }

/* the website: the cloud renderer pill (no panel) and the language switch in the account menu */
.gpu.cloud { cursor: default; }
.gpu.cloud .dot { background: #6f6984; }
.gpu.cloud.on .dot { background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .16); }
.acct-lang { margin: 8px 12px 0; display: flex; } .acct-lang button { flex: 1; }
.lic-lang { align-self: flex-end; display: flex; margin-bottom: -6px; } .lic-lang button { padding: 4px 12px; font-size: 12px; }
.site-plan { border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); border-radius: 999px; padding: 2px 10px; font: 700 11.5px var(--font); cursor: pointer; }
.site-plan.easy { color: #9fe7ff; border-color: rgba(62, 197, 255, .4); background: rgba(62, 197, 255, .1); }
.site-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-ext { background: var(--bg-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: 8px; padding: 2px 6px; font: 600 11.5px var(--font); }

/* creators: reference photos, and "making it for a shot" */
.cc-photos { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.cc-photos .xrow { gap: 8px; align-items: baseline; } .cc-photos .help { margin: 0; font-size: 12px; }
.cc-ph-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px; border-radius: 12px; border: 1px dashed transparent; transition: border-color .2s, background .2s; }
.cc-ph-row.over { border-color: var(--accent); background: rgba(255, 79, 207, .06); }
.cc-ph-it { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); }
.cc-ph-it img { width: 100%; height: 100%; object-fit: cover; }
.cc-ph-it .mini { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .65); }
.cc-ph-add { width: 84px; height: 84px; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--bg-2); color: var(--dim); display: grid; place-items: center; align-content: center; gap: 4px; cursor: pointer; }
.cc-ph-add:hover { border-color: var(--accent); color: var(--ink); }
.cc-forshot { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(255, 79, 207, .35); background: linear-gradient(90deg, rgba(255, 79, 207, .12), rgba(155, 123, 255, .08)); font-size: 13.5px; }
.cv-cast-new { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }

/* render farm: finished renders are stills; click to watch full screen */
.farm-still { all: unset; position: relative; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.farm-still img, .farm-still video { width: 100%; height: 100%; object-fit: cover; display: block; }
.farm-play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; opacity: .85; pointer-events: none; }
.farm-play .i { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.farm-still:hover .farm-play { opacity: 1; }
.farm-full { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; background: rgba(0, 0, 0, .88); animation: farmIn .18s ease-out; }
.farm-full video, .farm-full img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.farm-full-x { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
@keyframes farmIn { from { opacity: 0; } }
body.local .logo::after { content: "LOCAL"; right: -50px; background: linear-gradient(135deg, #3ec5ff, #7cf0b0); box-shadow: 0 4px 12px -4px rgba(62, 197, 255, .8); }

/* admin: people (cloud + local) and codes */
.adm-tr.pp { grid-template-columns: 1.4fr .7fr .7fr 1.3fr 60px; align-items: center; }
.pp-where { font: 800 10px/1 var(--font); letter-spacing: .12em; padding: 3px 7px; border-radius: 5px; color: #10131a; }
.pp-where.cloud { background: var(--grad); } .pp-where.local { background: linear-gradient(135deg, #3ec5ff, #7cf0b0); }
.farm-people { margin-bottom: 14px; } .farm-people .xrow { gap: 10px; align-items: baseline; }
.mini.danger.armed { background: var(--bad); color: #fff; }
.adm-steps { margin: 4px 0 10px 18px; display: grid; gap: 4px; }
.adm-tr.pp .pp-where, .adm-tr.pp .site-plan { display: inline-block; width: fit-content; }

/* admin: stacked sections on one page */
.adm-stack { display: grid; gap: 14px; }
.adm-card[data-part="testers"] .adm-table { display: none; }
.gpu.cloud.busy .dot { background: #ffa53d; box-shadow: 0 0 0 4px rgba(255, 165, 61, .18); }

/* ---- Admin: pause all renders, stop a tester's render with a reason, cloud settings */
.farm-pause { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--panel2, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.08)); margin-bottom: 12px; flex-wrap: wrap; }
.farm-pause .adm-in { flex: 1 1 260px; min-width: 180px; }
.farm-pause.on { border-color: #ffb34766; background: rgba(255, 179, 71, .1); }
.farm-pause.on > .i { color: #ffb347; }
.farm-stop { margin-top: 6px; }
.farm-row .farm-stop { margin: 0 0 0 8px; }
.stop-ask { max-width: 620px; text-align: left; }
.stop-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0; }
.stop-r { display: flex; gap: 8px; align-items: flex-start; text-align: left; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line, rgba(255,255,255,.1)); background: rgba(255,255,255,.03); color: inherit; font: inherit; font-size: 12.5px; cursor: pointer; }
.stop-r:hover, .stop-r:focus-visible { border-color: #ff6b8a; background: rgba(255, 107, 138, .1); outline: none; }
.stop-r b { flex: none; width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 10.5px; background: rgba(255,255,255,.1); }
.stop-ask .xrow .adm-in { flex: 1; }
@media (max-width: 640px) { .stop-reasons { grid-template-columns: 1fr; } }
.adm-tr.pp { grid-template-columns: 1.3fr .6fr .6fr 1.2fr 1fr 70px; }
.pp-today { display: flex; flex-direction: column; gap: 2px; }
.cs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.cs-grid label, .cs-cell label { display: flex; flex-direction: column; gap: 3px; }
.cs-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.cs-reasons label { display: flex; align-items: center; gap: 8px; } .cs-reasons label .adm-in { flex: 1; }
@media (max-width: 760px) { .cs-reasons { grid-template-columns: 1fr; } }
.adm-tr.cs { grid-template-columns: 1fr 1.4fr 1.4fr; align-items: start; gap: 12px; }
.adm-tr.cs.set { background: rgba(170, 255, 120, .05); }
.adm-tr.cs > span:first-child { display: flex; flex-direction: column; }
.cs-cell { display: flex; flex-wrap: wrap; gap: 8px; } .cs-cell label { flex: 1 1 110px; } .cs-cell select { max-width: 100%; }
.adm-in.num { width: 100%; }

/* ---- the website: where each picture / clip is (cloud · saving · on this computer), on every card */
.site-where-host { position: relative; }
.site-where { position: absolute; top: 5px; right: 5px; z-index: 4; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 999px; display: grid; place-items: center; background: rgba(0, 0, 0, .62); color: #9fe7ff; cursor: pointer; }
.site-where .i { width: 11px; height: 11px; }
.site-where[data-state="local"] { color: #7fe8cf; cursor: default; }
.site-where[data-state="saving"] { color: #ffd36a; } .site-where[data-state="saving"] .i { animation: whereBob .8s ease-in-out infinite; }
.site-where[data-state="cloud"]:hover { background: rgba(0, 0, 0, .85); transform: scale(1.1); }
.site-local-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin: 10px 0 4px; }
.site-local-bar i { display: block; height: 100%; width: 0; background: var(--grad, #9be15d); transition: width .3s; }
.site-msg-tx { font-size: 15px; white-space: pre-wrap; }
.site-msg-why { font-size: 14px; padding: 8px 12px; border-left: 3px solid #ff6b8a; background: rgba(255,107,138,.08); border-radius: 6px; text-align: left; }

/* ---- first-time setup: the AI engine and the models an app needs */
.site-ask.eng { max-width: 520px; text-align: left; }
.site-ask.eng .site-ask-ic { margin: 0 auto 6px; }
.site-ask.eng h2 { text-align: center; }
.eng-list { margin: 8px 0 4px; padding-left: 18px; color: var(--muted, #b9b2cc); font-size: 13.5px; line-height: 1.7; }
.eng-files { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; margin: 10px 0 6px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: 12.5px; }
.eng-files > div { display: flex; justify-content: space-between; gap: 12px; } .eng-files span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eng-skip { display: block; margin: 10px auto 0; background: none; border: 0; color: var(--muted, #8d86a3); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.eng-log { max-height: 200px; overflow: auto; font-size: 11px; background: #000; padding: 8px; border-radius: 8px; white-space: pre-wrap; }
.eng-chip { position: fixed; left: 16px; bottom: 16px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(20, 18, 30, .92); color: inherit; font: 600 12.5px var(--font); cursor: pointer; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.eng-chip[hidden] { display: none; }
.pp-blocked { margin-left: 6px; font: 800 9.5px/1 var(--font); letter-spacing: .1em; padding: 3px 6px; border-radius: 5px; background: #ff4f6d; color: #fff; }
.adm-tr.pp { grid-template-columns: 1.3fr .6fr .6fr 1.2fr 1fr 96px; }
.cs-names { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.cs-name { display: grid; grid-template-columns: 150px 14px 1fr auto; align-items: center; gap: 8px; font-size: 13px; }
.cs-real { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted, #a7a3b3); white-space: nowrap; }
@media (max-width: 900px) { .cs-names { grid-template-columns: 1fr; } }
