/* GenHub studio — «Бутон»: white paper, dark-red drops, one font (Manrope, served from here).
   The Креатор is a big drop in the middle of the home screen; the bottom bar is a row of drops that
   melt into one another; behind everything lives a quiet world of AI (nodes, orbits, flowing lines).
   Every colour comes from the variables below, so a palette is one block. */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/manrope-cyrillic-wght-normal.woff2) format("woff2-variations"),
       url(fonts/manrope-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2-variations"),
       url(fonts/manrope-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #ffffff;
  --ink: #3b0713; /* the deep burgundy of the drops */
  --it: #ffffff; /* text on ink */
  --acc: #7a1428; /* the burgundy: the Креатор, the chosen, the live */
  --at: #ffffff; /* text on acc */
  --fg: #2a0a10; /* the text */
  --muted: #76595f;
  --line: rgba(59, 7, 19, .16);
  --card: rgba(255, 255, 255, .92);
  --tint: #f4e8ea;
  --star: #1d2a55; /* the thin ink of the stars and orbits */
  --ok: #2b7a3d;
  --bad: #d92d20; /* clearly brighter than the burgundy */
  --f: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --tabs-h: 84px;
  --dock-h: 74px;
  --gutter: 20px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --shadow: 0 8px 20px -12px rgba(59, 7, 19, .55);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--f);
  font-size: 15px;
  line-height: 1.4;
  color: var(--fg);
  background: var(--bg);
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
input, textarea { caret-color: var(--acc); }  /* the blinking text cursor: always visible, in the accent colour */
input::placeholder, textarea::placeholder { text-overflow: ellipsis; font-size: 14px; }
.bud-cap, .edits, .sect, .lead, h1, .journey .tt { text-shadow: 0 0 6px #fff, 0 0 12px #fff; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
::selection { background: rgba(122, 20, 40, .22); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --- the backdrop: a world of AI, behind everything ------------------------------------------------ */
.bgart { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; transform: translateZ(0); contain: strict; }
/* white page, thin stars and orbits around the bud. Three layers: the still stars and constellations (always), the still
   orbits and the glow (home only) and a small live layer (satellites with trails, a few twinkles, shooting stars) that
   exists only on the home screen: elsewhere it is display:none, so nothing animates or repaints behind the tools. */
.bgart svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .5s; }
.bgart.soft .stars { opacity: .4; }
.bgart.soft .orbits { opacity: 0; }
.bgart.soft .live { display: none; }
.bgart .tw { animation: bgtw 4s ease-in-out infinite; }
.bgart .shoot { animation: bgshoot 11s linear infinite; opacity: 0; }
@keyframes bgtw { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
@keyframes bgshoot { 0% { transform: translate(0, 0); opacity: 0; } 4% { opacity: .9; } 16% { transform: translate(-280px, 180px); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bgart .live { display: none; } }

.app { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* --- header: the logo, the box office and the queue ---------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) var(--gutter) 8px;
  background: linear-gradient(180deg, #fff 88%, rgba(255, 255, 255, 0));
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mark { flex: none; width: 38px; height: 38px; }
.mark .k { fill: var(--ink); }
.mark .a { fill: var(--acc); }
.wm { min-width: 0; }
.wm b { display: block; font: 800 19px/1 var(--f); color: var(--ink); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm .title { display: block; margin-top: 4px; font: 700 8.5px/1 var(--f); letter-spacing: .22em; color: var(--acc); white-space: nowrap; }
.meta { display: flex; align-items: center; flex: none; }
.pill, .seances {
  display: flex; align-items: center; gap: 6px; height: 34px; border-radius: 17px; background: var(--ink); color: var(--it);
  font: 800 13px/1 var(--f); white-space: nowrap; font-variant-numeric: tabular-nums; transition: background .2s;
}
.pill { position: relative; z-index: 1; padding: 0 14px; }
.pill small { font: 600 10px/1 var(--f); opacity: .75; }
.seances { margin-left: -9px; padding: 0 13px 0 17px; }
.seances.busy { background: var(--acc); color: var(--at); }
.seances svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- the view ------------------------------------------------------------------------------------------- */
.view { flex: 1; min-width: 0; padding: 6px var(--gutter) 28px; overflow-wrap: break-word; }
.app.has-tabs .view { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 44px); }
.app.has-dock .view { padding-bottom: calc(var(--dock-h) + var(--safe-b) + 30px); }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 55vh; text-align: center; }
.center p { margin: 0; color: var(--muted); max-width: 300px; }

h1 { font: 800 24px/1.15 var(--f); color: var(--ink); letter-spacing: -.01em; margin: 10px 0 4px; text-align: center; }
.lead { color: var(--muted); margin: 0 0 6px; font-size: 14px; text-align: center; }
.label, .sect {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 9px;
  font: 800 10.5px/1.2 var(--f); letter-spacing: .14em; text-transform: uppercase; color: var(--acc);
}
.sect span, .label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sect small { flex: none; white-space: nowrap; }
.label::after, .sect::after { content: ""; flex: 1; min-width: 12px; border-top: 1px solid var(--line); }
.sect small { font-size: 10px; letter-spacing: .06em; color: var(--muted); font-weight: 600; text-transform: none; order: 2; }
.muted { color: var(--muted); }

/* cards: every surface that holds content */
.model, .upload, .note, .how, .xstep, .qrow, .tool, .pack, .hist, .ref, .result-text, .acts button, .qline, .bubble.ai {
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
}

/* --- the home screen: the bud ----------------------------------------------------------------------------- */
.bud { display: flex; flex-direction: column; align-items: center; margin-top: -28px; } /* «Создать» a little higher: room for the templates under it */
.bud-canvas { --h: 340; position: relative; width: min(100%, 340px); aspect-ratio: 1; }
/* with «Сделаем за вас»: room under the lower petals for its long drop */
.bud-canvas.tall { --h: 372; aspect-ratio: 340 / 372; }
.bud-goo, .bud-labels { position: absolute; inset: 0; }
.bud-goo { filter: url(#goo); pointer-events: none; }
.bud-canvas i, .bud-canvas button.core, .bud-canvas button.pet {
  position: absolute; display: block; border-radius: 50%; aspect-ratio: 1; transform: translate(-50%, -50%);
  left: calc(var(--x) * 100% / 340); top: calc(var(--y) * 100% / var(--h)); width: calc(var(--d) * 100% / 340);
  /* only transform and opacity move: no layout, no repaint of the filtered layer's geometry */
  transition: transform .5s cubic-bezier(.3, 1.25, .5, 1), opacity .3s, background .25s;
}
/* the petals and their tails are moved frame by frame from the script (the crawling snakes), not by a transition */
.bud-canvas i.pet, .bud-canvas i.tail, .bud-canvas button.pet { transition: background .25s; will-change: transform; }
.bud-canvas i.core { background: var(--acc); }
.bud-canvas.open i.core, .bud-canvas.open button.core { transform: translate(-50%, -50%) scale(.643); }
.bud-canvas i.pet { background: var(--ink); }
.bud-canvas i.pet.on { background: var(--acc); }
.bud-canvas button.core, .bud-canvas button.pet { display: grid; place-items: center; background: none; color: var(--at); text-align: center; }
.bud-canvas button.core { overflow: hidden; clip-path: circle(50%); }
.bud-canvas button.core .in { position: relative; display: block; max-width: 86%; }
.bud-canvas button.core b { display: block; font: 800 clamp(22px, 8vw, 29px)/1.1 var(--f); letter-spacing: -.01em; }
.bud-canvas button.core small { display: block; margin-top: 3px; font: 600 clamp(9.5px, 3vw, 11.5px)/1.25 var(--f); opacity: .92; }
.bud-canvas.open button.core small { display: none; }
.bud-canvas button.pet { font: 700 clamp(9.5px, 3.1vw, 11.5px)/1.1 var(--f); }
.bud-canvas button.pet span { display: block; max-width: 92%; }
.bud-canvas:not(.open) button.pet { pointer-events: none; }
.bud-canvas i.tail { background: var(--ink); }
/* the Креатор's drop: the burgundy of «Создать» melting into the deep burgundy of the petals */
.bud-canvas i.cr { transition: none; will-change: transform; background: radial-gradient(circle at 28% 30%, var(--acc) 0%, color-mix(in srgb, var(--acc) 55%, var(--ink)) 45%, var(--ink) 100%); }
.bud-canvas button.crb { color: #fff; }
.bud-canvas button.crb .in { display: block; max-width: 88%; }
.bud-canvas button.crb b { display: block; font: 800 clamp(11px, 3.6vw, 13px)/1.1 var(--f); }
.bud-canvas button.crb small { display: block; margin-top: 2px; font: 600 clamp(6.5px, 2.1vw, 7.5px)/1.15 var(--f); opacity: .92; }
/* «Сделаем за вас»: a long drop, the Креатор's burgundy laid sideways */
.bud-canvas i.cc, .bud-canvas button.ccb { aspect-ratio: auto; height: calc(var(--dh) * 100% / var(--h)); border-radius: 999px; }
.bud-canvas i.cc { transition: none; will-change: transform; background: linear-gradient(100deg, var(--acc) 0%, color-mix(in srgb, var(--acc) 50%, var(--ink)) 55%, var(--ink) 100%); }
.bud-canvas button.ccb { color: #fff; }
.bud-canvas button.ccb .in { display: block; max-width: 90%; }
.bud-canvas button.ccb b { display: block; font: 800 clamp(13px, 4.2vw, 15px)/1.1 var(--f); }
.bud-canvas button.ccb small { display: block; margin-top: 2px; font: 600 clamp(8.5px, 2.7vw, 10px)/1.15 var(--f); opacity: .92; }
.bud-canvas button.core:active, .bud-canvas button.pet:active { filter: brightness(.94); }
.bud-cap { margin: 2px 0 0; text-align: center; font: 600 13px/1.35 var(--f); color: var(--muted); }
/* «Шаблоны рекламы» under «Создать»: a strip of playing templates with no frame, its edges dissolving into the
   white page and the stars, so it reads as part of the backdrop, not a box laid on it */
.tstrip { display: block; width: 100%; margin: 6px 0 12px; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
/* one clip, its edges melting into the page's background: no frame, no card */
.tstrip-win {
  position: relative; display: block; width: calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); aspect-ratio: 16 / 10; max-height: 300px;
  overflow: hidden; border-radius: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.tstrip-win video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: transparent; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.tstrip-win video.on { opacity: 1; }
.tstrip:active .tstrip-win { transform: scale(.985); }
.tstrip-place:empty { display: none; }
.tstrip-cap { display: block; margin-top: 2px; text-align: center; font: 600 13px/1.35 var(--f); color: var(--acc); text-shadow: 0 0 6px #fff, 0 0 12px #fff; }
/* the screen with every template, and the template on top of the director's chat */
.tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin-top: 12px; }
.tcard { display: block; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.tcard video { display: block; width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; background: var(--tint); pointer-events: none; }
.tcard span { display: block; margin-top: 6px; font: 600 12.5px/1.3 var(--f); }
.tcard.main span { color: var(--acc); }
.tpl-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; padding: 8px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); }
.tpl-head video { flex: none; display: block; width: 64px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 12px; background: var(--tint); }
.tpl-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tpl-text b { font: 800 14.5px/1.25 var(--f); color: var(--ink); overflow-wrap: anywhere; }
.tpl-text small { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.edits { margin-top: 6px; font: 700 10.5px/1.2 var(--f); letter-spacing: .08em; text-transform: uppercase; text-align: center; color: var(--muted); }
.edits button { color: var(--acc); font-weight: 800; padding: 4px 6px; }

/* the drops of the open petal, and every tool drop («тикет») */
.kids-box { margin-top: 4px; }
.kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.kids p { margin: 0; }
.price-tiers { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 2px 0 14px; }
.price-tiers[hidden] { display: none; }
.price-tier { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 10px 6px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--tint); color: var(--fg); font: inherit; text-align: center; cursor: pointer; }
.price-tier small { font-weight: 700; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.price-tier b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 13px var(--f); }
.price-tier em { font-style: normal; font-weight: 800; font-size: 12px; color: var(--acc); }
.price-tier:active { transform: scale(.97); }
.tk {
  position: relative; flex: 0 1 auto; min-width: 88px; max-width: 100%; min-height: 54px; padding: 8px 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--ink); color: var(--it); border-radius: 27px; box-shadow: var(--shadow);
  font: 800 13px/1.15 var(--f); transition: transform .12s, background .2s;
}
.tk small { display: block; margin-top: 1px; font-weight: 600; font-size: 10px; opacity: .8; }
.tk em { display: block; margin-top: 2px; font-style: normal; font-weight: 800; font-size: 10.5px; color: #f3d3d8; }
.tk:active:not(:disabled) { transform: scale(.96); }
.tk.live { background: var(--acc); color: var(--at); }
.tk.live em { color: #fff; }
.tk.soon { background: var(--tint); color: var(--muted); border: 1.5px dashed var(--line); box-shadow: none; }
.tk.soon em { color: var(--muted); }

.dchat {
  display: flex; align-items: center; gap: 8px; margin-top: 16px; padding: 4px 4px 4px 18px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.dchat:focus-within { border-color: var(--ink); }
.dchat input { flex: 1; min-width: 0; padding: 9px 0; border: 0; outline: none; background: none; font-size: 16px; color: var(--fg); }
.dchat input::placeholder { color: var(--muted); }
.dchat button { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--it); font-size: 15px; font-weight: 800; }

.buy, .cta, .btn.primary {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 8px 18px; text-align: center;
  background: var(--ink); color: var(--it); font: 800 15px/1.2 var(--f); border-radius: 999px;
  box-shadow: 0 12px 24px -12px rgba(59, 7, 19, .75); transition: transform .1s, opacity .15s, background .2s;
}
.buy { min-height: 54px; margin-top: 12px; }
.buy:active:not(:disabled), .cta:active:not(:disabled), .btn.primary:active:not(:disabled) { transform: scale(.98); background: var(--acc); }
.buy:disabled, .cta:disabled { opacity: .6; }

.qline {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; padding: 6px 8px 6px 16px; border-radius: 999px;
  font: 600 12px/1.3 var(--f); font-variant-numeric: tabular-nums;
}
.qline > button:first-child { flex: 1; min-width: 0; padding: 6px 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qline .x { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--tint); font-weight: 800; color: var(--acc); }

/* --- chips, choices, fields ------------------------------------------------------------------------------ */
.chips { display: flex; gap: 8px; margin: 10px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; padding: 8px 14px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink);
  font: 700 12.5px/1.25 var(--f); white-space: nowrap; transition: background .15s, color .15s;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--it); }
.chip:disabled { opacity: .55; }

.models { display: flex; flex-direction: column; gap: 10px; }
.model {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 20px; transition: background .15s, border-color .15s;
}
.model.on { border-color: var(--ink); background: var(--tint); box-shadow: inset 0 0 0 1px var(--ink), var(--shadow); }
.model .nm { flex: 1; min-width: 0; }
.model .nm b { display: block; font-size: 14.5px; font-weight: 700; }
.model .nm small { display: block; font-size: 12px; color: var(--muted); }
.model .pr { font: 800 15px var(--f); white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
s.old { font-weight: 500; opacity: .55; margin-right: 5px; color: var(--fg); }
.note.promo { margin-bottom: 12px; }
.radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.model.on .radio { border: 6px solid var(--ink); }

.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg button {
  padding: 9px 15px; border-radius: 999px; background: var(--card); border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 700;
  color: var(--ink); transition: background .15s, color .15s;
}
.seg button { max-width: 100%; overflow-wrap: anywhere; }
.seg.filters { margin: 0 0 10px; }
.seg.filters button { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.seg button.on { background: var(--ink); border-color: var(--ink); color: var(--it); }

.helper { margin: 10px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.helper .note { width: 100%; }
.helper .chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; white-space: normal; text-align: left; border-radius: 18px; }
.helper .chip svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.len { display: flex; align-items: center; gap: 12px; }
.len input { flex: 1; min-width: 0; accent-color: var(--ink); }
.len-val { min-width: 42px; text-align: right; font-weight: 800; color: var(--ink); }

.field { position: relative; }
.field textarea {
  display: block; width: 100%; min-height: 110px; max-height: 280px; resize: none; padding: 14px 16px 28px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 22px; font-size: 16px; line-height: 1.45; color: var(--fg);
  outline: none; transition: box-shadow .15s, border-color .15s;
}
.field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(59, 7, 19, .1); }
.field textarea::placeholder { color: var(--muted); opacity: .85; }
.field .count { position: absolute; right: 16px; bottom: 9px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; pointer-events: none; }
.field .count.over { color: var(--bad); font-weight: 700; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; min-width: 0; }
.ideas .chip { max-width: 100%; white-space: normal; text-align: left; border-radius: 16px; font-size: 12px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cancel { margin-top: 14px; display: grid; gap: 8px; }
.cancel small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.assist { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.assist .chip, .shot .chip, .rung .chip { white-space: normal; text-align: left; max-width: 100%; }
.chip svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pick .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.pick .ph svg { width: 34px; height: 34px; fill: none; stroke: var(--it); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.rung > *, .shot > * { min-width: 0; max-width: 100%; }
.view { overflow-x: clip; }
.example { max-width: 100%; }
.example { margin: 12px 0 0; border-radius: 22px; overflow: hidden; background: var(--ink); border: 1px solid var(--line); }
.example img, .example video { width: 100%; max-height: 260px; object-fit: cover; }
.example audio { width: 100%; padding: 10px; }
.example.sample { padding: 0; }
.example.sample .cell { position: relative; min-width: 0; background: var(--ink); }
.example.sample .cell img, .example.sample .cell video { display: block; width: 100%; height: 100%; max-height: 300px; object-fit: contain; background: #0000; }
.example.sample .cell audio { display: block; width: 100%; padding: 10px; box-sizing: border-box; }
.example.sample.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.example.sample.pair .cell { aspect-ratio: 1 / 1; }
.example.sample.pair .cell img, .example.sample.pair .cell video { object-fit: cover; max-height: none; }
.example.sample.pair figcaption { grid-column: 1 / -1; }
.example.sample .tag { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; letter-spacing: .05em; }
.example.sample .strip { display: flex; gap: 2px; margin-bottom: 2px; }
.example.sample .strip .cell { flex: 1 1 0; height: 92px; }
.example.sample .strip .cell img, .example.sample .strip .cell video { max-height: 92px; object-fit: cover; }
.example figcaption { padding: 8px 14px; font-size: 11.5px; color: var(--it); letter-spacing: .04em; }

.upload {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 14px; min-height: 64px; border-radius: 20px;
  color: var(--ink); font-size: 14px; border-style: dashed; border-width: 1.5px; border-color: var(--ink);
}
.upload.has { border-style: solid; border-color: var(--line); }
.upload > svg:first-child { color: var(--acc); }
.upload svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.upload img, .upload video { flex: none; width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--ink); }
.upload .nm { flex: 1; min-width: 0; }
.upload .nm b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload .nm small { display: block; color: var(--muted); font-size: 12px; }
.upload .x { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tint); display: flex; align-items: center; justify-content: center; color: var(--acc); }
.upload .x svg { width: 16px; height: 16px; }
.upload .bar { display: block; height: 4px; margin-top: 6px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.upload .bar-fill { display: block; height: 100%; width: 0; background: var(--acc); border-radius: 4px; transition: width .2s ease; }
.file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* picking one of the user's own videos (Topaz, lip-sync) */
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pick { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: var(--ink); border: 2px solid transparent; color: var(--it); font-size: 11px; }
.pick video, .pick img { width: 100%; height: 100%; object-fit: cover; }
.pick span { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 3px 8px; border-radius: 99px; background: rgba(42, 10, 16, .72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.on { border-color: var(--acc); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--acc); }

/* --- the bottom button and the bar of drops --------------------------------------------------------------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; padding: 14px calc(var(--gutter) - 4px) calc(18px + var(--safe-b));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 42%);
}
.cta { height: 54px; }
.cta .spin { width: 20px; height: 20px; border-width: 2.5px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; padding: 6px 16px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--ink); color: var(--ink); font-weight: 800; font-size: 14.5px; text-align: center;
}
.btn.primary { border-color: transparent; }
.btn:disabled { opacity: .5; }

.tabs {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + var(--safe-b)); z-index: 12;
  width: min(calc(100% - 28px), 420px); aspect-ratio: 312 / 68;
}
.app.has-tabs::after { /* a white fade under the bar, so content never shows through between the drops */
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tabs-h) + var(--safe-b) + 12px); z-index: 11; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 60%);
}
.tabs-goo { position: absolute; inset: 0; filter: url(#goo); pointer-events: none; }
.tabs i, .tabs button {
  position: absolute; display: grid; place-items: center; transform: translate(-50%, -50%); border-radius: 999px;
  left: calc(var(--x) * 100% / 312); top: 52.9%; width: calc(var(--w) * 100% / 312); height: calc(var(--h) * 1%);
}
.tabs .t0 { --x: 40; --w: 62; --h: 64.7; }
.tabs .t1 { --x: 106; --w: 62; --h: 64.7; }
.tabs .t2 { --x: 156; --w: 60; --h: 88; }
.tabs .t3 { --x: 206; --w: 62; --h: 64.7; }
.tabs .t4 { --x: 272; --w: 62; --h: 64.7; }
.tabs-goo i { background: var(--ink); transition: background .2s; }
.tabs-goo i.on { background: var(--acc); }
.tabs button { z-index: 1; color: var(--it); font: 700 clamp(8px, 2.8vw, 10px)/1 var(--f); letter-spacing: 0; white-space: nowrap; }
.tabs button.on { color: var(--at); }
.tabs button.t2 span { font-size: clamp(16px, 5.6vw, 20px); font-weight: 800; }
.tabs button:active { filter: brightness(.9); }
.badge {
  position: absolute; z-index: 2; left: calc(124 * 100% / 312); top: 14.7%; transform: translate(-50%, -50%);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--acc); color: var(--at); box-shadow: 0 0 0 2px #fff;
  font: 800 10px/18px var(--f); font-style: normal; text-align: center; pointer-events: none;
}

/* --- generation -------------------------------------------------------------------------------------------- */
.gen {
  position: relative; margin: 16px auto 0; height: 280px; max-width: 420px; overflow: hidden;
  background: var(--ink); border-radius: 36px; box-shadow: var(--shadow);
}
.gen .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; color: var(--it); }
.gen .mid b { font: 800 18px var(--f); }
.gen .mid small { color: rgba(255, 255, 255, .78); font-size: 14px; font-variant-numeric: tabular-nums; }
.gen .spin { border-color: rgba(255, 255, 255, .22); border-top-color: #fff; }
.bar { height: 6px; margin-top: 16px; border-radius: 3px; background: var(--tint); overflow: hidden; position: relative; }
.bar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 3px; left: 0; will-change: transform; background: var(--acc); animation: slide 1.6s ease-in-out infinite; }

.note { display: flex; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 20px; font-size: 13.5px; line-height: 1.45; color: var(--fg); box-shadow: none; }
.note svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--acc); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.note.bad { border-color: var(--acc); background: var(--tint); }
.prompt-quote { margin-top: 12px; color: var(--muted); font: 500 14.5px/1.45 var(--f); white-space: pre-wrap; word-break: break-word; text-align: center; }

.media { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.media img, .media video { width: 100%; border-radius: 22px; background: var(--ink); border: 1px solid var(--line); }
.media audio { width: 100%; }
.result-text {
  margin-top: 14px; padding: 14px 16px; border-radius: 20px; box-shadow: none;
  white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.5; user-select: text; -webkit-user-select: text;
}
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.acts button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; min-height: 68px; border-radius: 20px;
  font-size: 11.5px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.2;
}
.acts svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.acts button.on { background: var(--ink); color: var(--it); border-color: var(--ink); }
.acts button.on svg { fill: currentColor; }
.acts button:disabled { opacity: .5; }
.sent { display: flex; justify-content: center; gap: 6px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--ok); font-weight: 700; }
.sent svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- the archive -------------------------------------------------------------------------------------------- */
.works { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.work { position: relative; height: 172px; border-radius: 24px; overflow: hidden; background: var(--ink); text-align: left; color: var(--it); box-shadow: var(--shadow); }
.work:active, .model:active, .pack:active, .acts button:active { transform: scale(.98); }
.work img { width: 100%; height: 100%; object-fit: cover; }
.work .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 14px 14px 38px; }
.work .ph svg { width: 34px; height: 34px; fill: none; stroke: var(--it); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.work .ph p { margin: 0; font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.work .st {
  position: absolute; left: 8px; bottom: 8px; font: 800 10px/1 var(--f); letter-spacing: .05em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 99px; background: #fff; color: var(--ink);
}
.work .st.ok { background: #fff; color: var(--ok); }
.work .st.run { background: var(--acc); color: var(--at); }
.work .st.err { background: var(--fg); color: #fff; }
.work .kind { position: absolute; right: 8px; top: 8px; font: 800 10px/1 var(--f); padding: 6px 9px; border-radius: 99px; background: rgba(42, 10, 16, .66); color: #fff; text-transform: uppercase; letter-spacing: .05em; }
.more { margin-top: 14px; }
.works + .more, h1 + .seg { margin-top: 12px; }
h1 + .seg { justify-content: center; }
.work .fav { position: absolute; right: 8px; bottom: 8px; width: 26px; height: 26px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; }
.work .fav svg { width: 13px; height: 13px; fill: var(--acc); stroke: var(--acc); stroke-width: 1.5; stroke-linejoin: round; }
.g0 { background: linear-gradient(135deg, var(--ink), var(--acc)); }
.g1 { background: linear-gradient(225deg, var(--ink), var(--acc)); }
.g2 { background: linear-gradient(315deg, var(--ink), var(--acc)); }
.g3 { background: linear-gradient(45deg, var(--ink), var(--acc)); }
.g4 { background: linear-gradient(160deg, var(--acc), var(--ink)); }
.g5 { background: linear-gradient(200deg, var(--acc), var(--ink)); }

/* --- the queue ----------------------------------------------------------------------------------------------- */
.qrows { display: grid; gap: 12px; margin-top: 12px; }
.qrow { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; }
.qrow.live { background: var(--ink); color: var(--it); border-color: transparent; }
.qrow .nm { flex: 1; min-width: 0; text-align: left; }
.qrow .nm b { display: block; font: 800 14px var(--f); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .nm small { display: block; font-size: 12px; opacity: .85; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow .x { flex: none; padding: 8px 12px; border-radius: 99px; background: var(--tint); color: var(--acc); font-weight: 800; font-size: 12px; }
.qrow.live .x { display: none; }
.qrow .nm .pr { display: block; margin-top: 3px; font-size: 12px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- drafts ---------------------------------------------------------------------------------------------------- */
.hist .row.draft { padding: 0 8px 0 0; }
.hist .row.draft .go { flex: 1; min-width: 0; padding: 12px 16px; text-align: left; color: inherit; }
.hist .row.draft .x { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--tint); color: var(--acc); font-weight: 800; }
.hist.scenes .row { width: 100%; text-align: left; }
.hist + .sect, .hist + .btn { margin-top: 18px; }

/* --- the catalog by category ----------------------------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 4px; }
.tool { position: relative; display: flex; flex-direction: column; text-align: left; overflow: hidden; border-radius: 24px; color: var(--fg); }
.tool:active { transform: scale(.98); }
.tool .art { position: relative; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.tool .art svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool .tag {
  position: absolute; left: 8px; top: 8px; padding: 4px 8px; border-radius: 99px; background: rgba(42, 10, 16, .66); color: #fff;
  font: 800 9.5px/1 var(--f); letter-spacing: .06em; text-transform: uppercase;
}
.tool .tx { padding: 10px 14px 13px; min-width: 0; }
.tool .tx b { display: block; font: 800 14.5px/1.2 var(--f); overflow: hidden; text-overflow: ellipsis; }
.tool .tx small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.tool .tx em { display: block; margin-top: 6px; font: 800 13px var(--f); font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; }
.tool .tx em .old { margin-right: 5px; color: var(--muted); font-weight: 400; }

/* --- the box office (balance) ------------------------------------------------------------------------------------ */
.wallet {
  position: relative; margin: 8px 0 0; padding: 22px 20px; text-align: center; color: var(--it);
  background: linear-gradient(135deg, var(--ink), var(--acc)); border-radius: 30px; box-shadow: 0 14px 28px -14px rgba(59, 7, 19, .8);
}
.wallet small { font: 800 10px var(--f); letter-spacing: .24em; text-transform: uppercase; opacity: .9; }
.wallet b { display: block; margin-top: 4px; font: 800 38px/1.05 var(--f); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.wallet p { margin: 8px 0 0; font-size: 12.5px; opacity: .92; }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pack { position: relative; padding: 16px 6px; text-align: center; border-radius: 22px; font: 800 19px var(--f); color: var(--ink); font-variant-numeric: tabular-nums; }
.pack:disabled { opacity: .5; }
.test-note { margin: 10px 4px 0; font-size: 12px; color: var(--muted); text-align: center; }
.hist { border-radius: 22px; overflow: hidden; }
.hist .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--fg); }
.hist .row:last-child { border-bottom: 0; }
.hist .row div { min-width: 0; }
.hist .row b { display: block; font-weight: 700; font-size: 14px; }
.hist .row small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .amt { flex: none; font: 800 14.5px var(--f); font-variant-numeric: tabular-nums; }
.hist .amt.plus { color: var(--ok); }
.hist .row .side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hist .row .side .cancel { min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--tint); color: var(--acc); font: 700 12.5px var(--f); }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty p { margin: 0 0 14px; }
.secure { display: flex; gap: 8px; align-items: flex-start; margin: 12px 4px 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.secure svg { flex: none; width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* --- sheet and toast ------------------------------------------------------------------------------------------------ */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(42, 10, 16, .45); animation: fade .2s ease; }
.sheet-card {
  position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 26px 20px calc(20px + var(--safe-b));
  border-radius: 30px 30px 0 0; background: #fff; animation: rise .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet-card::before { content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
.sheet-card h2 { margin: 0 0 6px; font: 800 20px/1.2 var(--f); color: var(--ink); letter-spacing: -.01em; }
.sheet-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.sheet-card .btn + .btn, .sheet-card .model + .model { margin-top: 9px; }
.sheet-card .models { margin-bottom: 14px; }
.toast {
  position: fixed; left: 16px; right: 16px; top: calc(12px + var(--safe-t)); z-index: 30; max-width: 528px; margin: 0 auto; padding: 13px 18px; border-radius: 22px;
  background: var(--ink); color: var(--it); box-shadow: 0 14px 30px -12px rgba(42, 10, 16, .6); font-size: 14px; font-weight: 600;
  animation: drop .2s ease;
}
.toast.bad { background: var(--acc); color: var(--at); }

/* --- the Креатор (AIHAYA) ---------------------------------------------------------------------------------------------- */
.aihaya {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 6px 0 14px; padding: 14px 16px; text-align: left;
  border-radius: 28px; color: var(--it); background: linear-gradient(135deg, var(--ink), var(--acc)); box-shadow: var(--shadow);
}
.aihaya .ic { flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; }
.aihaya .tx { flex: 1; min-width: 0; }
.aihaya .tx b { display: block; font: 800 15.5px var(--f); }
.aihaya .tx small { display: block; margin-top: 2px; font-size: 12px; opacity: .9; line-height: 1.35; }
.aihaya svg, .how summary svg, .btn svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.aihaya > svg { width: 18px; height: 18px; opacity: .85; }
.how { margin-top: 14px; border-radius: 22px; box-shadow: none; }
.how summary { display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 800; cursor: pointer; list-style: none; color: var(--ink); }
.how summary::-webkit-details-marker { display: none; }
.how summary svg { stroke: var(--acc); }
.how ol { margin: 0; padding: 0 16px 4px 38px; }
.how li { margin-bottom: 10px; font-size: 13.5px; line-height: 1.45; }
.how li::marker { color: var(--acc); font-family: var(--f); font-weight: 800; }
.how li b { display: block; font-weight: 700; }
.how li span { color: var(--muted); }
/* the Креатор's route: numbered drops, the current one filled */
.journey { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 4px; }
.journey li { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; opacity: .55; }
.journey li.now, .journey li.done { opacity: 1; }
.journey .no, .xhead .no {
  width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center;
  font: 800 11px/1 var(--f); color: var(--ink); background: #fff;
}
.journey li.now .no { background: var(--acc); border-color: var(--acc); color: var(--at); }
.journey li.done .no { background: var(--ink); color: var(--it); }
.journey .tt { min-height: 2.3em; font: 700 9.5px/1.15 var(--f); letter-spacing: .01em; color: var(--ink); overflow-wrap: anywhere; }
.xstep { margin-top: 10px; padding: 13px 16px; border-radius: 22px; box-shadow: none; }
.xstep .xhead { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.xstep .hint { margin: 6px 0 10px; }
.how .example, .how .btn { margin: 0 16px 16px; width: auto; }
.scene-video { margin-top: 16px; overflow: hidden; background: var(--fg); border-radius: 28px; box-shadow: var(--shadow); }
.scene-video video { display: block; width: 100%; height: 100%; object-fit: contain; }
.scene-video.a16x9 { aspect-ratio: 16 / 9; }
.scene-video.a1x1 { aspect-ratio: 1 / 1; }
.scene-video.a9x16 { aspect-ratio: 9 / 16; width: min(100%, calc(62vh * 9 / 16)); margin-left: auto; margin-right: auto; }
.scene-video.dim video { opacity: .45; }
.scene-frames { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 10px; }
.scene-frames img { display: block; width: 100%; min-width: 0; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--fg); box-shadow: var(--shadow); }
.scene-frames.a1x1 img { aspect-ratio: 1 / 1; }
.scene-frames.a9x16 { width: min(100%, calc(62vh * 9 / 16)); margin-left: auto; margin-right: auto; }
.scene-frames.a9x16 img { aspect-ratio: 9 / 16; }
.scene-busy { position: relative; }
.scene-busy .scene-video { margin-top: 16px; }
.scene-busy .mid { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 16px; color: #fff; }
.scene-busy .mid b { font: 800 18px var(--f); }
.scene-busy .mid small { color: rgba(255, 255, 255, .85); font-size: 14px; font-variant-numeric: tabular-nums; }
.scene-busy .spin { border-color: rgba(255, 255, 255, .22); border-top-color: #fff; }
.refs { display: grid; gap: 8px; margin: 8px 0 12px; }
.hint + .seg, .refs + .seg, .hint + .ref-name { margin-top: 10px; }
.seg + .ref-name { margin-top: 10px; }
.ref { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 20px; box-shadow: none; }
.ref img { width: 56px; height: 56px; object-fit: cover; border-radius: 14px; flex: none; }
.ref .nm { flex: 1; min-width: 0; display: grid; }
.ref .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref .x { flex: none; }
.ref-name { width: 100%; margin: 8px 0; padding: 12px 16px; font: inherit; font-size: 16px; color: var(--fg); background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; outline: none; }
.ref-name:focus { border-color: var(--ink); }
.scene-meta { margin: 10px 4px 0; font-size: 12px; color: var(--muted); text-align: center; letter-spacing: .03em; }
.hint { margin: 8px 4px 0; font-size: 12px; color: var(--muted); line-height: 1.4; }
.edit-go, .btn.again { margin-top: 10px; }

/* «Камера»: the camera round the scene, from above and from the side */
.cam-takes { flex-wrap: wrap; margin-top: 10px; }
.cam-take { min-height: 44px; }
.cam-take.add { border-style: dashed; }
.cam-time { margin-top: 12px; }
.cam-time .cam-ctl input { width: 100%; }
.cam-read { text-align: center; font-variant-numeric: tabular-nums; }
.btn.cam-del { margin-top: 10px; min-height: 44px; width: 100%; }
.cam-moves { scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); }
.cam-move { min-height: 44px; scroll-snap-align: center; }
.cam-hint { min-height: 34px; }
.cam-rows { display: grid; gap: 10px; margin-top: 14px; }
.cam-row { padding: 10px 12px 6px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); }
.cam-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 4px; font-size: 13.5px; font-weight: 700; color: var(--fg); }
.cam-val { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cam-ctl { display: flex; align-items: center; gap: 8px; }
.cam-ctl input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--ink); }
.cam-step { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--tint); border: 1.5px solid var(--line); color: var(--ink); font: 800 20px/1 var(--f); }
.cam-step:disabled, .cam-ctl input:disabled { opacity: .45; }
.cam-flip { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); text-align: left; color: var(--fg); }
.cam-flip .nm { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cam-flip .nm b { font-size: 13.5px; }
.cam-flip .nm small { font-size: 12px; color: var(--muted); }
.cam-flip .sw { flex: none; position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--line); transition: background .15s; }
.cam-flip .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(42, 10, 16, .25); transition: transform .15s; }
.cam-flip.on .sw { background: var(--ink); }
.cam-flip.on .sw::after { transform: translateX(18px); }
.cam-flip:disabled { opacity: .5; }
.cam-acts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 10px; margin-top: 14px; }
.cam-acts .btn svg { width: 18px; height: 18px; }
.scenes .row { width: 100%; text-align: left; }
.scenes .row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sst { flex: none; font: 800 10px/1 var(--f); letter-spacing: .05em; text-transform: uppercase; padding: 6px 9px; border-radius: 99px; background: var(--acc); color: var(--at); }
.sst.ready { background: var(--ok); color: #fff; }
.sst.failed { background: var(--fg); color: #fff; }
.sst.local { background: var(--tint); color: var(--ink); }

.spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--tint); border-top-color: var(--acc); animation: turn .8s linear infinite; }
.noscript { padding: 24px; text-align: center; }

.chat-log { width: 100%; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.chat-log > * { flex-shrink: 0; } /* a full log scrolls; a message is never squeezed under its neighbour */
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 20px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; box-shadow: none; white-space: pre-wrap; user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
.bubble .bt { display: block; }
.bubble.ai { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.bad { border-color: var(--acc); color: var(--fg); }
.bcopy { display: inline-flex; align-items: center; margin-top: 6px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--tint); color: var(--acc); font: 700 11.5px/1.2 var(--f); cursor: pointer; }
.bcopy:active { filter: brightness(.94); }
.shot-head .bcopy { margin-top: 0; flex: none; }
.samples { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.samples small { color: var(--muted); font-size: 12px; }
.sample-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sample { margin: 0; min-width: 0; }
.sample video { width: 100%; aspect-ratio: 9 / 16; max-height: 220px; object-fit: contain; border-radius: 12px; background: #000; display: block; }
.sample figcaption { font-size: 12px; line-height: 1.3; margin-top: 4px; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--ink); color: var(--it); border-bottom-right-radius: 6px; }
.chat-in { width: 100%; display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.chat-in input, .chat-in textarea { flex: 1; min-width: 0; padding: 11px 16px; border-radius: 22px; resize: none; line-height: 1.35; max-height: 132px; overflow-y: auto; display: block; border: 1.5px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-size: 16px; outline: none; }
.chat-in input:focus, .chat-in textarea:focus { border-color: var(--ink); }
.chat-in .btn { width: auto; min-height: 46px; padding: 0 18px; flex: none; }
.send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--acc); color: var(--at); font: 800 22px/1 var(--f); cursor: pointer; }
.send:active:not(:disabled) { transform: scale(.94); }
.send:disabled { opacity: .5; }
.chat-in textarea::placeholder { color: var(--muted); opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the chat of the director and of the prompt helper: one card, the answers' chips in a tidy column */
.chat { margin-top: 12px; padding: 12px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--card); }
.chat .chat-opts { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.chat .chat-opts:empty { display: none; }
.chat .chat-opts .chip { max-width: 100%; padding: 9px 14px; font-size: 13px; line-height: 1.3; }
/* the director fills the screen: the chat grows to the space left under the header, not a strip at the top */
.dir-chat { display: flex; flex-direction: column; min-height: 380px; } /* its height is set to the button by the script */
.dir-chat .chat-log { flex: 1 1 auto; max-height: none; min-height: 120px; overflow-y: auto; }
.dir-chat .chat-opts, .dir-chat .chat-in { flex: none; }
.dir-len { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.dir-len > span { flex: none; font: 800 10.5px/1.2 var(--f); letter-spacing: .14em; text-transform: uppercase; color: var(--acc); }
.dir-len .seg { flex: 1; min-width: 0; margin: 0; }
.dir-photo { margin-top: 2px; }
.dir-photos { display: flex; flex-direction: column; gap: 8px; }
.ph-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ph-tile { position: relative; flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: var(--tint); border: 1.5px solid var(--line); display: grid; place-items: center; }
.ph-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-tile > svg { width: 22px; height: 22px; fill: none; stroke: var(--acc); stroke-width: 1.6; }
.ph-n { position: absolute; left: 3px; bottom: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; font: 800 10px/16px var(--f); text-align: center; }
.ph-x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; padding: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.ph-x svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ph-add { flex: none; width: 52px; height: 52px; border-radius: 12px; border: 1.5px dashed var(--acc); background: transparent; color: var(--acc); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font: 700 13px/1.2 var(--f); }
.ph-add.wide { width: auto; height: 44px; padding: 0 14px; }
.ph-add svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dir-photos-note { margin: 6px 0 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.dir-photos .file { display: none; }
.shot-photo { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.shot-photo small { font: 700 11px/1.2 var(--f); color: var(--muted); letter-spacing: .04em; }
.shot-photo .seg { margin: 0; flex-wrap: wrap; }
.chat .chat-opts .chip.idea { background: var(--acc); color: var(--at); border-color: var(--acc); font-weight: 800; }
/* typing: the fixed button and the bar of drops step aside, they covered the text box over the keyboard */
html.typing .dock, html.typing .tabs, html.typing .app.has-tabs::after { display: none; }
html.typing .app.has-dock .view, html.typing .app.has-tabs .view { padding-bottom: 24px; }
.feedback { margin-top: 8px; }
.feedback .chat-log { margin-bottom: 8px; }
.fb-apply { margin-top: 10px; }

@keyframes turn { to { transform: rotate(360deg); } }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
@media (max-width: 340px) {
  :root { --gutter: 16px; }
  .tk { min-width: 80px; padding: 7px 12px; font-size: 12.5px; }
  .pill small { display: none; }
  .wm b { font-size: 17px; }
}
@media (min-width: 560px) {
  .view { max-width: 560px; margin-left: auto; margin-right: auto; width: 100%; }
  .top { padding-left: max(var(--gutter), calc((100% - 560px) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100% - 560px) / 2 + var(--gutter))); }
  .cta { max-width: 520px; margin: 0 auto; }
  .bud-canvas { width: min(100%, 420px); }
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .packs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .picks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --- скидки: пакеты, профиль, идеи ------------------------------------------------------------------------- */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.door { display: flex; flex-direction: column; gap: 2px; padding: 14px 14px; text-align: left; border-radius: 20px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.door b { font: 800 15px var(--f); }
.door small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.door:active { transform: scale(.98); }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 4px; }
.tier { padding: 10px 8px; text-align: center; border-radius: 16px; background: var(--tint); border: 1px solid var(--line); }
.tier b { display: block; font: 800 13px var(--f); color: var(--ink); }
.tier small { display: block; margin-top: 2px; font-size: 10.5px; line-height: 1.3; color: var(--muted); }
.cart-row.has { background: var(--tint); }
.cart-row small, .hist .row small { display: block; font-size: 11.5px; color: var(--muted); }
.step { display: flex; align-items: center; gap: 4px; flex: none; }
.step button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 800 18px var(--f); }
.step .q { min-width: 28px; text-align: center; font: 800 15px var(--f); font-variant-numeric: tabular-nums; }
.cart-total { margin-top: 8px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); padding: 8px 16px; }
.cart-total .row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.cart-total .row.big b { font: 800 22px var(--f); color: var(--ink); }
.cart-notes p { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.biz-q { margin-bottom: 14px; }
.biz-q input { width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: 600 15px var(--f); }
.biz-chips button { font-size: 12.5px; padding: 7px 12px; }
.biz-cards { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.biz-card { padding: 14px 16px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.biz-card b { font: 800 15px var(--f); color: var(--ink); }
.biz-card p { margin: 6px 0 12px; font-size: 13.5px; line-height: 1.45; color: var(--fg); }

/* --- the camera by hand: a full-screen model of the scene, the cameras' timeline above it, the controls below --- */
.btn.cam-shoot { margin-top: 10px; min-height: 48px; font-weight: 800; border-color: var(--acc); color: var(--ink); }
.fl { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #121216; color: #f4f1ee;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); touch-action: none; user-select: none; -webkit-user-select: none; }
:where(.fl) button { font: inherit; color: inherit; }
.fl-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px 4px; }
.fl-name { display: grid; gap: 1px; min-width: 0; }
.fl-title { font-size: 16px; }
.fl-sub { font-size: 12.5px; opacity: .72; }
.fl-done { min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: #f4f1ee; color: #121216; font-weight: 800; cursor: pointer; }
.fl-tl { padding: 4px 14px 6px; }
.fl-track { position: relative; height: 34px; border-radius: 10px; background: #26262d; overflow: hidden; }
.fl-seg { position: absolute; top: 0; bottom: 0; padding: 0 8px; border: 0; border-right: 2px solid #121216; background: color-mix(in srgb, var(--c) 38%, #26262d); text-align: left; overflow: hidden; white-space: nowrap; cursor: pointer; font-size: 12px; }
.fl-seg.on { background: color-mix(in srgb, var(--c) 78%, #26262d); font-weight: 800; }
.fl-seg:disabled { cursor: default; }
.fl-recfill { position: absolute; top: 0; bottom: 0; background: rgba(255, 52, 64, .55); pointer-events: none; }
.fl-ph { position: absolute; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #ff3440; pointer-events: none; }
.fl-ticks { display: flex; justify-content: space-between; margin-top: 2px; font-size: 11px; opacity: .6; }
.fl-grip { align-self: center; min-height: 30px; padding: 0 16px; border: 0; border-radius: 15px; background: #26262d; font-size: 12.5px; cursor: pointer; }
.fl-grip[hidden] { display: none; }
.fl.fl-min .fl-panel { max-height: none; overflow: visible; }
.fl.fl-min .fl-panel > :not(.fl-acts) { display: none; }
.fl-view { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.fl-frame { position: relative; overflow: hidden; border-radius: 12px; background: #000; box-shadow: 0 0 0 2px #2c2c34; }
.fl-frame.rec { box-shadow: 0 0 0 4px #ff3440; }
.fl-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.fl-ring, .fl-knob, .fl-second { position: absolute; left: 0; top: 0; pointer-events: none; border-radius: 50%; }
.fl-ring { width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 2px dashed rgba(255, 255, 255, .55); }
.fl-knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; background: rgba(255, 255, 255, .8); }
.fl-second { width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 3px solid #5ac8fa; background: rgba(90, 200, 250, .25); }
.fl-fb[hidden], .fl-ring[hidden], .fl-knob[hidden], .fl-second[hidden], .fl-hint[hidden], .fl-badge[hidden], .fl-big[hidden], .fl-joy[hidden], .fl-recfill[hidden] { display: none; }
.fl-hint { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(18, 18, 22, .78); font-size: 13px; line-height: 1.35; pointer-events: none; }
.fl-badge { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 12px; background: #ff3440; font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.fl-big { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 120px; font-weight: 900; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .6); pointer-events: none; }
.fl-joy { position: absolute; right: 14px; bottom: 14px; width: 112px; height: 112px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); background: rgba(18, 18, 22, .4); touch-action: none; }
.fl-joyknob { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(255, 255, 255, .85); pointer-events: none; }
.fl-panel { display: grid; gap: 6px; padding: 6px 14px 10px; min-height: 0; max-height: 36vh; overflow-y: auto; touch-action: pan-y; }
.fl-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 14px; }
.fl-group { display: grid; gap: 4px; min-width: 0; }
.fl-cap { font-size: 11px; opacity: .65; line-height: 1.1; }
.fl-seg2 { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-chips { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
.fl-chips .fl-opt { flex: none; }
.fl-opt, .fl-btn { min-height: 38px; padding: 0 12px; font-size: 13.5px; border: 1.5px solid #3a3a44; border-radius: 20px; background: #1d1d23; cursor: pointer; }
.fl-opt.on { background: #f4f1ee; color: #121216; border-color: #f4f1ee; font-weight: 800; }
.fl-opt:disabled, .fl-btn:disabled, .fl-step button:disabled { opacity: .4; cursor: default; }
.fl-step { display: flex; align-items: center; gap: 8px; }
.fl-step button { width: 38px; height: 38px; border: 1.5px solid #3a3a44; border-radius: 50%; background: #1d1d23; font-size: 20px; cursor: pointer; }
.fl-step b { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.fl-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.fl-rec, .fl-stop, .fl-keep { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 0; border-radius: 24px; font-weight: 800; cursor: pointer; }
.fl-rec { background: #ff3440; color: #fff; }
.fl-rec i { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.fl-stop { background: #f4f1ee; color: #121216; }
.fl-stop i { width: 14px; height: 14px; border-radius: 3px; background: #ff3440; }
.fl-keep { background: #2fbf71; color: #08140d; }
.fl-btn.danger { color: #ff8a92; }
.fl button:focus-visible, .fl-joy:focus-visible { outline: 3px solid #5ac8fa; outline-offset: 2px; }

.fl-fb { position: absolute; left: 14px; bottom: 14px; display: grid; gap: 8px; }
.fl-fwdbtn { min-width: 104px; min-height: 46px; padding: 0 14px; border: 2px solid rgba(255, 255, 255, .55); border-radius: 23px; background: rgba(18, 18, 22, .55); color: #fff; font-size: 15px; font-weight: 800; touch-action: none; cursor: pointer; user-select: none; }
.fl-fwdbtn:active { background: rgba(255, 255, 255, .85); color: #121216; }
/* the transitions and the time track on the flight screen */
.fl-mix { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fl-mix[hidden] { display: none; }
.fl-junc { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; transform: rotate(45deg); border-radius: 2px; background: #f4f1ee; box-shadow: 0 0 0 2px #121216; pointer-events: none; }
.fl-slow { position: absolute; bottom: 0; height: 5px; background: #5ac8fa; pointer-events: none; }
.fl-slow.fast { background: #f2a93b; }
.fl-trow { align-items: flex-start; }
.fl-trans { flex: 1 1 100%; }

/* several cameras, the transitions between them, the time track: the studio's camera card */
.cam-list { display: grid; gap: 8px; margin-top: 10px; }
.cam-card { display: grid; gap: 8px; padding: 10px 12px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); }
.cam-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.cam-card-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cam-card-pick { flex: 1; min-width: 0; display: grid; gap: 1px; min-height: 44px; padding: 0; border: 0; background: none; text-align: left; color: var(--fg); font: inherit; cursor: pointer; }
.cam-card-pick b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cam-card-pick small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cam-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.cam-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.cam-tool { min-height: 40px; padding: 0 12px; border-radius: 20px; border: 1.5px solid var(--line); background: var(--tint); color: var(--ink); font: 700 12.5px var(--f); }
.cam-tool:disabled { opacity: .45; }
.cam-tool.danger { color: #c4314b; }
.cam-name-in { width: 100%; min-height: 44px; padding: 8px 14px; font: inherit; font-size: 16px; color: var(--fg); background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; outline: none; }
.cam-name-in:focus { border-color: var(--ink); }
.cam-junc { display: grid; gap: 6px; margin: 0 8px; padding: 8px 12px; border-left: 3px dashed var(--line); }
.cam-junc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.cam-junc .chips { flex-wrap: nowrap; overflow-x: auto; }
.cam-junc .chip { flex: none; min-height: 40px; }
.cam-junc .cam-ctl input { height: 40px; }
.cam-slow { margin-top: 14px; }
.cam-slow-bar { position: relative; height: 30px; margin: 8px 4px 4px; border-radius: 10px; background: var(--tint); overflow: hidden; }
.cam-slow-bar i { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, #3aa0ff 55%, transparent); }
.cam-slow-bar i.fast { background: color-mix(in srgb, #f2a93b 60%, transparent); }
.cam-slow-bar i.on { outline: 2px solid var(--ink); outline-offset: -2px; }
.cam-slow-bar em { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--ink); opacity: .45; }
.cam-seg { display: grid; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 20px; background: var(--card); border: 1.5px solid var(--line); }
.cam-seg.on { border-color: var(--ink); }
.cam-seg .chips { flex-wrap: wrap; }
.cam-seg .chip { min-height: 40px; }
.cam-warn { margin: 8px 4px 0; font-size: 12.5px; line-height: 1.4; color: #c4314b; }
.cam-warn:empty { display: none; }
.btn.cam-film { margin-top: 10px; min-height: 46px; width: 100%; }
.cam-card .chips, .cam-junc .chips, .cam-seg .chips { margin: 0 -12px; padding: 2px 12px; }
.cam-set { display: grid; gap: 8px; }
.cam-set .btn.cam-shoot { margin-top: 0; }
.cam-set .cam-rows { margin-top: 2px; }
.cam-set .cam-row, .cam-junc .cam-row, .cam-seg .cam-row, .cam-card > .cam-row { background: var(--tint); }
.cam-tool.cam-add, .cam-tool.cam-add-slow { width: 100%; min-height: 44px; margin-top: 8px; border-style: dashed; }
.cam-seg > .cam-head { align-items: center; }
.cam-seg > .cam-head .cam-tool { min-height: 36px; }
.cam-film-read { margin-top: 6px; font-variant-numeric: tabular-nums; }

/* The scene helper: the first thing on the Креатор's screen, a card that cannot be missed. */
.helper.ai-card { display: block; margin: 8px 0 12px; padding: 14px; border-radius: 22px; border: 2px solid var(--ink); background: var(--card); }
.ai-card .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-card .ai-head svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ai-card .ai-head small { color: var(--muted); font-size: 12px; }
.ai-card .chat-log { max-height: 52vh; }
.ai-card .chat-in { margin-top: 8px; }
.ai-card > .chip { margin-top: 8px; }
.chat-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-opts .chip { max-width: 100%; }
.chat-opts .chip { border-radius: 16px; font-size: 13px; text-align: left; white-space: normal; }
.label.sub { margin-top: 4px; }

/* «Фото по макету»: the layout's sides, two in a row, a tap chooses one */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.shot { position: relative; display: block; border-radius: 14px; overflow: hidden; background: var(--fg); box-shadow: var(--shadow); cursor: pointer; outline: 3px solid transparent; outline-offset: -3px; }
.shot.on { outline-color: var(--ink); }
.shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots.a1x1 .shot img { aspect-ratio: 1 / 1; }
.shots.a9x16 .shot img { aspect-ratio: 9 / 16; }
.shot input { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.shot .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 12px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }

/* «Ролик»: shots and the ladder of checks */
.shot { margin: 12px 0; padding: 14px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line); display: grid; gap: 10px; }
.shot-head { display: flex; align-items: baseline; gap: 10px; }
.shot-head small { color: var(--muted); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shot-head .x { border: 0; background: none; color: var(--fg); opacity: .5; font: inherit; font-size: 16px; min-width: 32px; min-height: 32px; cursor: pointer; }
.shot .field textarea { min-height: 56px; }
.shot .chip { justify-self: start; }
.rung { display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 12px; align-items: center; margin: 10px 0; padding: 14px; border-radius: 22px; background: var(--card); border: 1.5px solid var(--line); }
.rung .n { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--ink); font-weight: 800; }
.rung.now { border-color: var(--acc); }
.rung.now .n { background: var(--acc); color: #fff; }
.rung.done .n { background: var(--ink); color: #fff; }
.rung .rt b { display: block; }
.rung .rt small { display: block; opacity: .65; }
.rung .pr { font-weight: 800; white-space: nowrap; }
.rung .tiers { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.hist .row .pr { flex: none; font-weight: 800; white-space: nowrap; }
.rung .chip { grid-column: 2 / 4; justify-self: start; }

/* the assistant: the one thing on the tool screen that asks to be pressed */
.assist .chip.ai {
  flex: 1 1 100%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 18px;
  border-radius: 26px; border: 0; background: linear-gradient(135deg, var(--acc), var(--ink)); color: var(--at);
  font: 800 14.5px/1.25 var(--f); text-align: left; box-shadow: 0 10px 22px -10px rgba(122, 20, 40, .75); animation: aipulse 2.6s ease-in-out infinite;
}
.assist .chip.ai svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 1.2; flex: none; }
@keyframes aipulse { 0%, 100% { box-shadow: 0 10px 22px -10px rgba(122, 20, 40, .75), 0 0 0 0 rgba(122, 20, 40, .35); } 50% { box-shadow: 0 10px 22px -10px rgba(122, 20, 40, .75), 0 0 0 8px rgba(122, 20, 40, 0); } }
@media (prefers-reduced-motion: reduce) { .assist .chip.ai { animation: none; } }

/* the samples: small tiles, the files open on a tap */
.samples { margin: 12px 0 0; min-width: 0; }
.tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tile { position: relative; flex: none; width: 92px; height: 92px; border-radius: 16px; overflow: hidden; background: var(--ink); border: 1.5px solid var(--line); color: var(--it); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile-ph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 26px; }
.tile-play { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: rgba(0, 0, 0, .55); }
.tile-play::after { content: ""; position: absolute; left: 12px; top: 8px; border-left: 10px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.tile-tag { position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 2px 0; border-radius: 99px; background: rgba(0, 0, 0, .6); color: #fff; font: 700 9.5px/1.3 var(--f); text-align: center; }
.sample-before { display: flex; gap: 6px; margin-bottom: 12px; }
.sample-before img { flex: 1 1 0; min-width: 0; max-height: 110px; object-fit: cover; border-radius: 12px; }
.sample-big { margin-bottom: 14px; border-radius: 18px; overflow: hidden; background: var(--ink); }
.sample-big video, .sample-big img { display: block; width: 100%; max-height: 55vh; object-fit: contain; }
.sample-big audio { display: block; width: 100%; padding: 10px; }

/* «Сделаем за вас» */
.concierge-card { background: var(--card, #fff); border-radius: 16px; padding: 14px 16px; margin: 8px 0 16px; line-height: 1.45; }
.concierge-card p { margin: 0 0 10px; }
.concierge-card p:last-child { margin-bottom: 0; }
.concierge-work { display: grid; gap: 12px; margin: 0 0 16px; }
.concierge-work img, .concierge-work video { width: 100%; border-radius: 16px; background: var(--card, #fff); }
.concierge-work audio { width: 100%; }
.hist button.row .pick {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.hist button.row.pickrow { justify-content: flex-start; }
.hist button.row.pickrow > div { flex: 1; }
.hist button.row.on .pick { background: var(--ink); border-color: var(--ink); color: var(--it); }
.hist button.row { width: 100%; text-align: left; font: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.concierge-card .muted { opacity: .7; font-size: .9em; }
.concierge-form .files { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.concierge-form .files:empty { display: none; }
.concierge-form .btn { width: 100%; margin-top: 4px; }
.model .nm small.qnote { color: var(--acc); font-weight: 600; }
.chat .bubble.ai { background: var(--tint); border-color: transparent; box-shadow: none; }
.chat .bubble.ai.bad { background: var(--card); border: 1.5px solid var(--acc); }
.dir-len .seg { flex-wrap: nowrap; gap: 6px; }
.dir-len .seg button { flex: 1 1 0; min-width: 0; padding: 8px 0; text-align: center; white-space: nowrap; }
.shot-photo .seg { gap: 6px; }
.shot-photo .seg button { min-height: 0; padding: 6px 11px; font-size: 12px; }

/* --- «рекомендуем» (genhub.lineup.RECOMMENDED: MAGI-2) ------------------------------------------------------------ */
.model .nm small.rec, .row small.rec { color: var(--acc); font-weight: 800; }
.price-tier.rec { border-color: var(--acc); }
.price-tier.rec small { color: var(--acc); }
.tk small.rec { opacity: 1; font-weight: 800; }
.tool .tag.rec { left: auto; right: 8px; background: var(--acc); }
.tiers .chip.rec { border-color: var(--acc); }
.model.rec { border-color: var(--acc); }

/* --- «Режиссёр»: 1 Инструмент → 2 Промпт → 3 Фото → 4 Генерация --------------------------------------------------- */
.dir-steps { display: flex; gap: 4px; margin: 4px 0 10px; padding: 0; list-style: none; counter-reset: none; }
.dir-steps li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; font: 600 11px/1.2 var(--f); color: var(--muted); text-align: center; }
.dir-steps li .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-weight: 800; }
.dir-steps li.now { color: var(--ink); }
.dir-steps li.now .n { border-color: var(--acc); color: var(--acc); }
.dir-steps li.done .n { background: var(--acc); border-color: var(--acc); color: #fff; }
.dir-tool { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 13.5px; }
.dir-tool small.rec { margin-left: 6px; color: var(--acc); font-weight: 800; }
.dir-tools .dir-why { margin: 0 0 10px; font-size: 12.5px; line-height: 1.4; }
.dir-tools .btn { margin-top: 10px; }
