/* «Простая» – a tidy app on warm paper (site-templates/README.md). The page is paper; what lies on it is white card with a
   hairline and a soft warm shadow. Ink for words, a quiet grey-brown for what is second, and ONE accent – a deep green – for
   the action of the moment, the credit coin, the free try and what is chosen. No gradients, no glow, no ornament. Type: Onest
   throughout, heavy for titles. Corners 11–22 px. The skeleton is Prod's: the same partials and app.js, every class as there
   – this file only dresses them. Phone first. */
@font-face { font-family: Onest; src: url(fonts/onest-cyrillic.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Onest; src: url(fonts/onest-latin.woff2) format("woff2"); font-weight: 100 900; font-display: swap; 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+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f5f3ee; --paper-rgb: 245 243 238; --paper-2: #ebe7de; --white: #fff; --white-rgb: 255 255 255; --tint: #efece5; --tint-2: #e5e0d5; --silver: #bdb6a8;
  --ink: #17171a; --ink-rgb: 23 23 26; --ink-2: #3b3a36; --mute: #66635b; --mute-rgb: 102 99 91;
  --acc: #1f5f57; --acc-rgb: 31 95 87; --acc-deep: #174a43; --acc-soft: #e4efe9;
  --red: #c8423b; --red-rgb: 200 66 59; --red-deep: #a8322b; --red-soft: #fbebe8;
  --amber: #d9911a; --amber-deep: #855000; --amber-soft: #fbf0dc;
  --line: #e5e0d5; --line-2: #d6d0c3;
  /* A card's hairline and its soft warm shadow. */
  --rim: inset 0 0 0 1px var(--line);
  --shadow: 0 1px 2px rgb(60 50 30 / .04), 0 10px 30px rgb(60 50 30 / .06);
  --shadow-lg: 0 2px 4px rgb(60 50 30 / .04), 0 18px 44px rgb(60 50 30 / .1);
  /* Marks drawn as masks: the arrow that sends the words, the plus of «Создать». */
  --arrow-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E");
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  --display: Onest, "Segoe UI", system-ui, -apple-system, sans-serif; --sans: Onest, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace; --hud: var(--sans);
  --glow: 0 6px 16px -8px rgb(var(--acc-rgb) / .55);
  --r: 12px; --frame: 22px; --tile: 18px; --top: 60px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font: 500 15.5px/1.5 var(--sans); overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
:is(.cat-kinds button, .cat-subs button, .pill):focus-visible { outline-offset: -2px; }
/* Every scrolling strip holds its own hidden words: one that does not lets them out past the screen's edge. */
:is(.reels, .takes-row, .variants, .pills, .cat-subs, .cat-kinds, .reel) { position: relative; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 60; padding: 10px 18px; border-radius: var(--r); background: var(--ink); color: var(--white); font-weight: 700; }
.skip:focus { top: 10px; }
/* A credit (partials/cr.html, and app.js writes the same one into prices): a green coin in a pale green ring, the spark cut
   out of it. The padding makes the ring. */
.cr { width: 1em; height: 1em; padding: .1em; border-radius: 50%; background: var(--acc-soft); fill: var(--acc); vertical-align: -.14em; flex: 0 0 auto; }
svg { flex: 0 0 auto; }

/* Keys: the green one is the action of the moment; a white one with a hairline does the rest; a text key is the way out. */
.go { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; border-radius: 14px; background: var(--acc); color: var(--white);
  font: 700 16px/1.15 var(--sans); text-align: center; text-decoration: none; box-shadow: 0 6px 16px -8px rgb(var(--acc-rgb) / .55); transition: transform .15s, background-color .15s; }
.go:active { transform: scale(.98); }
.go:disabled { opacity: .45; cursor: default; }
.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--white); color: var(--ink);
  font: 700 15px/1.15 var(--sans); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.ghost:disabled { opacity: .5; }
.small { min-height: 44px; padding: 0 18px; font-size: 14.5px; }
.wide { width: 100%; }
.text-btn { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--ink-2); font-weight: 700; text-decoration: underline; text-decoration-color: rgb(var(--acc-rgb) / .45); text-underline-offset: 4px; }
/* The «make it» mark: a plus in the key's own colour. */
.rec-dot { flex: 0 0 auto; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--plus) center / contain no-repeat; mask: var(--plus) center / contain no-repeat; }
/* The key that sends the words: an ink square, the white arrow up in it. */
.rec-btn { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; background: var(--ink); transition: transform .15s; }
.rec-btn > span { width: 22px; height: 22px; background: var(--white); -webkit-mask: var(--arrow-up) center / contain no-repeat; mask: var(--arrow-up) center / contain no-repeat; }

/* No camera here: no viewfinder corners, no «REC», no clock (app.js keeps writing it – a photo's frame read «00:00:00:00»). */
.vf { position: relative; isolation: isolate; }
.vf::after, .drop::before { content: none; }
.hud { display: none !important; }

/* Top: paper, its hairline only once the page moves under it (a browser that cannot follow the scrolling keeps the line).
   The brand's mark a green rounded square with the letter; «Ж / М» a segment on a darker paper; the balance a white chip. */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; height: var(--top); padding: 0 16px; background: rgb(var(--paper-rgb) / .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
@supports (animation-timeline: scroll()) {
  .top { animation: line-in linear both; animation-timeline: scroll(root); animation-range: 0 16px; }
  @keyframes line-in { from { box-shadow: 0 1px 0 rgb(229 224 213 / 0); } }
}
.brand { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; text-decoration: none; }
/* The way home as high as the top's keys to tap (the mark is 36 px). */
.brand::after { content: ""; position: absolute; inset: -4px 0; }
/* No logo: the first letter on a green rounded square. */
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; background: var(--acc); color: var(--white); font: 800 17px/1 var(--display); }
.brand-logo { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.brand-name { overflow: hidden; font: 750 16.5px/1.15 var(--display); letter-spacing: -.015em; white-space: nowrap; text-overflow: ellipsis; }
.top-nav, .top-make { display: none; }
.aud { display: flex; flex: 0 0 auto; padding: 3px; border-radius: 12px; background: var(--paper-2); }
/* Each a finger's width: the key as drawn, its touch area out to the box's edge (40 px; the two never overlap). */
.aud button { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--mute); }
.aud button::after { content: ""; position: absolute; inset: -4px 0; }
.aud button:first-child::after { left: -4px; }
.aud button:last-child::after { right: -4px; }
.aud svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.aud button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgb(60 50 30 / .12); }
.wallet { position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-width: 44px; height: 38px; padding: 0 13px 0 10px; border: 0; border-radius: 12px; background: var(--white);
  color: var(--ink); font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; box-shadow: inset 0 0 0 1px var(--line); }
/* The balance as high as a finger to tap. */
.wallet::after { content: ""; position: absolute; inset: -3px 0; }
.wallet .cr { width: 17px; height: 17px; }
.wallet-n:empty { display: none; }

.main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 6px 16px calc(104px + env(safe-area-inset-bottom)); }
.row-title { margin: 0 0 12px; font: 800 19px/1.2 var(--display); letter-spacing: -.025em; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.row-more { position: relative; color: var(--acc); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
/* A small word that is a link («Все», «Все эффекты»): its look as it is, its touch area at least 40 px high around it. */
:is(.row-more, .create-all)::after { content: ""; position: absolute; inset: -12px -8px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.facts li { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0 11px; border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 700; }
.cost-n { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ph { width: 34%; height: 34%; fill: none; stroke: rgb(var(--ink-rgb) / .28); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* The dock: white across the screen's foot with a hairline over it – the four main screens with their words, the current
   one green, and «Создать» in the middle as a green rounded square with a white plus (its word stays for a screen reader). */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 76px repeat(2, minmax(0, 1fr)); align-items: center;
  height: calc(66px + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom); background: rgb(var(--white-rgb) / .97); box-shadow: 0 -1px 0 var(--line); }
/* The icons on one line whatever the words under them; a long word («AI companions») goes on two even lines, never cut. */
.dock-tab { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; height: 56px; padding: 7px 0 0; border: 0; background: none; color: var(--mute);
  font: 650 10.5px/1.1 var(--sans); text-decoration: none; }
/* Nothing clipped: no ellipsis, no hidden overflow (it cut the descenders), just two even lines when one is not enough. */
.dock-tab span { display: block; max-width: 100%; text-align: center; text-wrap: balance; overflow-wrap: normal; }
.dock-tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
/* The current tab: the page's, or the main screen's on top – app.js sets aria-current. Green. */
.dock-tab[aria-current="page"] { color: var(--acc); }
.dock-tab[aria-current="page"] svg { stroke-width: 2.2; }
.dock-rec { position: relative; display: grid; place-items: center; align-self: stretch; min-width: 0; padding: 0; border: 0; background: none; color: var(--white); }
.dock-rec > span:last-child { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dock-rec-ring { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--acc); box-shadow: 0 8px 18px -6px rgb(var(--acc-rgb) / .5); transition: transform .15s; }
.dock-rec-dot { width: 24px; height: 24px; background: var(--white); -webkit-mask: var(--plus) center / contain no-repeat; mask: var(--plus) center / contain no-repeat; }
.dock-rec:active .dock-rec-ring { transform: scale(.94); }
.is-detail .dock { display: none; }
.is-missing .dock, .is-missing .wallet, .is-missing .top-make, .is-missing .aud { display: none; }
body.is-missing .main { padding-bottom: 40px; }
body.is-detail .main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }

/* The home page on a phone: the site's own title big and bold, its line; the free try on a pale green plate; «Свой
   сценарий» as a white card – the example in it with «Видео / Фото» and its name over its top, the line for the words under
   it –; «С чего начнём» as white tiles two by two; «Примеры». */
.home { display: grid; grid-template-columns: minmax(0, 1fr); }
.hero { display: grid; justify-items: start; min-width: 0; padding: 6px 0 0; }
.hero-title { display: -webkit-box; max-width: 100%; margin: 0 0 8px; overflow: hidden; color: var(--ink); font: 800 clamp(27px, 8vw, 34px)/1.08 var(--display); letter-spacing: -.035em;
  -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow-wrap: break-word; text-wrap: balance; }
.hero-lead { display: -webkit-box; max-width: 36em; margin: 0; overflow: hidden; color: var(--mute); font-size: 14px; line-height: 1.45; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.home.is-kind > .hero { display: none; }

/* The free try: a pale green plate – a green dot, its name and line, the green «Попробовать». */
.offer { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 62px; margin-top: 16px; padding: 9px 9px 9px 15px; border: 0; border-radius: 16px; background: var(--acc-soft);
  color: var(--ink); text-align: left; text-decoration: none; transition: transform .15s; }
.offer:active { transform: scale(.985); }
.offer-light { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px rgb(var(--acc-rgb) / .16); }
.offer-text { display: grid; flex: 1 1 auto; gap: 1px; min-width: 0; }
.offer-text strong { font: 700 15.5px/1.2 var(--sans); }
.offer-text small { color: #4f5650; font-size: 12px; font-weight: 500; line-height: 1.3; }
.offer-go { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-height: 44px; padding: 0 15px; border-radius: 12px; background: var(--acc); color: var(--white);
  font: 700 14px/1.1 var(--sans); white-space: nowrap; transition: background-color .15s; }
.shotrow-go svg, .menu-chev { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* The light of «free» on the free try's card: the same small green dot. */
.free-light .offer-light { width: 8px; height: 8px; }

/* «Свой сценарий»: a white card with a hairline and a soft shadow; in it the example with rounded corners – «Видео / Фото»
   on its left top, its name on its right top – and under it, on paper, the line that types out ideas with the price and the
   ink key that sends. A run takes the example's place. Its height on a phone from the screen's (pages/home.html has the
   head over it): the line for the words stays above the dock on an ordinary phone; a very low one scrolls. */
.studio { --pad: 8px; --ask: 54px; display: flex; flex-direction: column; justify-content: flex-end; height: clamp(280px, min(calc((100vw - 32px) * 1.08), calc(100svh - 372px)), 560px); margin-top: 14px;
  padding: var(--pad); overflow: hidden; border-radius: var(--frame); background: var(--white); box-shadow: var(--rim), var(--shadow); }
.offer[hidden] + .studio { margin-top: 16px; }
.studio-bg { position: absolute; inset: var(--pad) var(--pad) calc(var(--pad) * 2 + var(--ask)); overflow: hidden; border-radius: 15px; background: var(--tint); }
.studio-bg > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
html[data-site-mode="edit"] .only-animate, html[data-site-mode="animate"] .only-edit, html:not([data-site-mode]) .only-edit { display: none; }
/* A mode with no picture at all (no example of its own, no video scene's to borrow – partials/studio.html): plain paper. */
html[data-site-mode="animate"] .studio-bg:not(:has(> .only-animate:not([hidden]))), html[data-site-mode="edit"] .studio-bg:not(:has(> .only-edit:not([hidden]))) { background: var(--tint); }
/* The foot's parts under the picture; its head over the picture's top. */
.studio-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.studio-foot > * { position: relative; z-index: 5; }
.studio-foot > .studio-head { position: absolute; top: calc(var(--pad) + 10px); left: calc(var(--pad) + 10px); right: calc(var(--pad) + 10px); z-index: 6; display: flex; flex-direction: row-reverse;
  align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.studio-title { min-width: 0; margin: 0; overflow: hidden; padding: 7px 11px; border-radius: 10px; background: rgb(var(--white-rgb) / .92); color: var(--ink); font: 700 12.5px/1.15 var(--sans);
  white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.toggle { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; border-radius: 12px; background: rgb(var(--white-rgb) / .92); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }
.toggle button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 15px; border: 0; border-radius: 9px; background: none; color: var(--mute); font-size: 14px; font-weight: 700; }
.toggle button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.toggle button[aria-pressed="true"], .toggle button[aria-selected="true"] { background: var(--ink); color: var(--white); }
.studio .toggle button { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
/* Small in the frame, a finger's height to tap: 40 px up and down past the switch's edge. */
.studio .toggle button { position: relative; }
.studio .toggle button::after { content: ""; position: absolute; inset: -6px 0; }
.toggle-wide { display: grid; grid-template-columns: 1fr 1fr; width: 100%; margin: 0 0 14px; background: var(--paper-2); box-shadow: none; }
.toggle-wide button { min-height: 44px; font-size: 15px; }
.toggle-wide button[aria-pressed="true"], .toggle-wide button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgb(60 50 30 / .12); }
/* The line for the words: paper inside the card, the idea typing out in it (nowrap – one column as wide as the frame, so it
   never widens it), the price, the ink key. */
.ask { display: flex; align-items: center; gap: 10px; width: 100%; height: var(--ask); padding: 0 5px 0 14px; border: 0; border-radius: 14px; background: var(--paper); color: var(--ink); text-align: left; }
.ask-idea { display: none; }
.ask-text { flex: 1 1 auto; min-width: 0; overflow: hidden; color: var(--mute); font-size: 14.5px; font-weight: 500; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ask-price { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; font: 700 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.ask-price:empty { display: none; }
.ask .rec-btn { width: 44px; height: 44px; }
.ask:active .rec-btn { transform: scale(.94); }
html:is([data-site-step="upload"], [data-site-step="choose"]) .home .studio { cursor: pointer; }
.after { display: grid; gap: 8px; }
.after-note { margin: 0; color: var(--mute); font-size: 13.5px; line-height: 1.4; }
.studio .after { padding: 8px 4px 2px; }
.studio .after-note { color: var(--ink-2); }
.oops { margin: 0; padding: 10px 14px; border-radius: 14px; background: var(--red-soft); color: var(--red-deep); font-size: 14px; font-weight: 600; line-height: 1.4; box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / .22); }
.oops .text-btn { min-height: 32px; color: inherit; }

/* What the visitor made, in the example's place: the result on its own blurred light; while it runs, a green bar sweeping. */
.out { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.studio .out { inset: var(--pad) var(--pad) calc(var(--pad) * 2 + var(--ask)); overflow: hidden; border-radius: 15px; }
html[data-site-step="processing"] .studio .out { bottom: var(--pad); }
.out > img, .out > video { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: auto; }
.out-fill { object-fit: cover; filter: blur(28px) saturate(1.1) brightness(1.04); transform: scale(1.15); }
.out-pic { object-fit: contain; object-position: 50% 0; }
.out-video { background: var(--tint); }
.out-busy { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 32px; text-align: center; background: rgb(var(--paper-rgb) / .9);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.out-title { margin: 8px 0 0; color: var(--ink); font: 800 23px/1.1 var(--display); letter-spacing: -.03em; }
.out-title::after { content: "…"; }
.out-note { max-width: 260px; margin: 0; color: var(--mute); font-size: 14px; }
.out-line { position: relative; display: block; width: 168px; height: 6px; overflow: hidden; border-radius: 3px; background: var(--tint-2); }
.out-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; border-radius: 3px; background: var(--acc); animation: sweep 1.4s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: translateX(-20%); } to { transform: translateX(150%); } }
html:is([data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]):not([data-site-mode="effect"]) .studio-head { display: none; }
html:is([data-site-step="choose"], [data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]) .studio-bg { visibility: hidden; }
/* The home card shows the run of «Свой сценарий»: its example stays while a photo only waits (the photo is in the card). */
.home .studio .out [data-kit-src="photo"] { display: none !important; }
html[data-site-step="choose"] .home .studio-bg { visibility: visible; }
html[data-site-step="preview"] .studio .out, html[data-site-step="result"] .studio .out { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; }
/* A run and its result get a taller card than the example had on a phone: a 2:3 or 9:16 picture is seen whole, or nearly. */
html:is([data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]):not([data-site-mode="effect"]) .studio { height: clamp(440px, calc((100vw - 32px) * 1.45), 640px); }
/* The free trial's card and a scene's run an effect: «Свой сценарий» behind them stays as it was. */
html[data-site-mode="effect"] .home .studio .out { display: none; }
html[data-site-mode="effect"] .home .studio-bg { visibility: visible; }

/* «С чего начнём»: the four ways in as white tiles two by two – the example on top with rounded corners, the name, «от» its
   price (the kind's word for a computer). «Все эффекты» at the row's right. */
.takes { margin-top: 24px; }
.takes-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.take { position: relative; display: grid; grid-template-rows: auto auto; align-content: start; gap: 8px; min-width: 0; padding: 6px 6px 11px; border-radius: var(--tile); background: var(--white); color: var(--ink);
  text-decoration: none; box-shadow: var(--rim), var(--shadow); transition: transform .2s, box-shadow .2s; }
.take:active { transform: scale(.98); }
.take-media { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 13px; background: var(--tint); }
.take-media > img, .take-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.take-media > .ph { width: 30%; height: 30%; }
.take-text { display: grid; gap: 3px; min-width: 0; padding: 0 6px; }
.take-kind { display: none; align-items: center; gap: 5px; color: var(--acc); font-size: 12px; font-weight: 700; }
.take-kind svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.take-title { font: 700 14px/1.2 var(--sans); overflow-wrap: break-word; hyphens: auto; }
.take .cost { color: var(--mute); font-size: 12.5px; font-weight: 600; }
.take .cost .cr { width: 12px; height: 12px; }
/* «Популярно» on the first: a small star on the picture's corner; the count of scenarios on the second, on its other corner. */
.take-tag { position: absolute; top: 12px; left: 12px; z-index: 2; }
.take-count { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 8px; background: rgb(var(--white-rgb) / .92);
  color: var(--ink); font: 700 11.5px/1 var(--display); font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.take-count svg { display: none; }

/* «Примеры»: the kinds on a white capsule that floats under the top while the cards go by. */
.catalog { margin-top: 34px; scroll-margin-top: calc(var(--top) + 8px); }
.catalog-title { margin-bottom: 8px; font-size: 22px; }
.cat-bar { position: sticky; top: calc(var(--top) + 6px); z-index: 12; display: flex; align-items: center; gap: 6px; margin: 0 -6px; padding: 5px; border-radius: var(--r); background: rgb(var(--white-rgb) / .82);
  box-shadow: var(--rim), 0 12px 28px -18px rgb(60 50 30 / .55); }
.cat-kinds { display: flex; flex: 1 1 auto; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cat-kinds::-webkit-scrollbar { display: none; }
/* Rows of chips – the sections' pills, «Примеры»'s kinds and sections, the filters' chips: one line that
   scrolls sideways, never wrapping (2026-10-29: three lines of sections); no scrollbar – touch, a trackpad, shift+wheel
   and Tab scroll it –, snapping lightly to a chip; an edge fades only where more is behind it (the kit's web/sites/rails.js, with ‹ › for a mouse). */
:is(.pills, .cat-subs, .cat-kinds, .chips) { position: relative; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none; }
:is(.pills, .cat-subs, .cat-kinds, .chips)::-webkit-scrollbar { display: none; }
:is(.pills, .cat-subs, .cat-kinds, .chips) > * { flex: 0 0 auto; scroll-snap-align: start; }
:is(.pills, .cat-subs) { scroll-padding-inline: 16px; }
/* The kinds as capsules: the chosen one ink. */
.cat-kinds button { position: relative; flex: 0 0 auto; min-height: 40px; padding: 0 16px; border: 0; border-radius: var(--r); background: none; color: var(--ink-2); font-size: 15px; font-weight: 800; white-space: nowrap; }
.cat-kinds button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.cat-round { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.cat-round svg, .cat-search svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cat-dot { position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--white); }
.cat-search { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; min-width: 0; height: 40px; padding: 0 2px 0 14px; border-radius: var(--r); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.cat-search input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: none; color: var(--ink); font-size: 16px; outline: none; }
.cat-search input::placeholder { color: var(--mute); }
.cat-search input::-webkit-search-cancel-button { display: none; }
.cat-search-close { display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink); }
.catalog.is-searching .cat-kinds, .catalog.is-searching [data-cat-search-open] { display: none; }
.cat-subs { display: flex; gap: 6px; min-height: 40px; margin: 8px -16px 0; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; }
/* A chip as drawn (36 px), its touch area 40 px: into the row's own edge, where the scrolling does not cut it. */
.cat-subs button { position: relative; }
.cat-subs button::after { content: ""; position: absolute; inset: -2px 0; }
.cat-subs::-webkit-scrollbar { display: none; }
.cat-subs.is-blank { visibility: hidden; }
/* A chip: white with a hairline; the chosen one green inside a green rim (the rim is its border, always there, clear until
   chosen – nothing moves). */
.cat-subs button, .chips button { flex: 0 0 auto; min-height: 36px; padding: 0 15px; border: 2px solid transparent; border-radius: var(--r); background: var(--white); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.cat-subs button[aria-pressed="true"], .chips button[aria-pressed="true"] { background: linear-gradient(var(--acc-soft), var(--acc-soft)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; color: var(--acc); box-shadow: none; }
/* «до ⊙24»: the button is a flex box, so the space after «до» is dropped; the coin keeps it. */
.chips button .cr { margin: 0 1px 0 4px; }
.cat-more { height: 1px; }
.cat-empty { display: grid; justify-items: start; gap: 6px; padding: 26px 0 8px; }
.cat-empty-title { margin: 0; font: 700 19px/1.2 var(--display); letter-spacing: -.02em; }
.cat-empty-lead { margin: 0 0 6px; color: var(--mute); font-size: 14.5px; }

/* A kind chosen: its own frame on top – the example in green –, then the cards. On the home page what is above goes. */
.kind { display: grid; gap: 16px; margin-bottom: 26px; }
.kind:not([hidden]) { animation: rise-in .32s cubic-bezier(.3, .7, .2, 1); }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } }
.kind-shot { aspect-ratio: 4 / 3.4; overflow: hidden; border: 8px solid var(--white); border-radius: var(--frame); background: var(--tint); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.kind-media, .kind-media > img, .kind-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.kind-before, .before-chip { position: absolute; left: 16px; bottom: 16px; z-index: 5; width: 23%; max-width: 110px; aspect-ratio: 3 / 4; margin: 0; overflow: hidden; border-radius: 16px;
  box-shadow: 0 0 0 3px var(--white), 0 12px 24px -10px rgb(var(--ink-rgb) / .6); }
.kind-before img, .before-chip img { width: 100%; height: 100%; object-fit: cover; }
.kind-before > span, .before-chip figcaption, .card-before > span, .hold-word { position: absolute; left: 5px; bottom: 5px; padding: 1px 8px; border-radius: var(--r); background: rgb(var(--white-rgb) / .88); color: var(--ink);
  font-size: 11px; font-weight: 800; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.card-before > span { left: 3px; bottom: 3px; padding: 0 6px; font-size: 9.5px; }
.kind-text { display: grid; justify-items: start; gap: 10px; }
.kind-title { margin: 0; font: 800 26px/1.08 var(--display); letter-spacing: -.035em; }
.kind-lead { max-width: 36em; margin: 0; color: var(--mute); font-size: 15px; line-height: 1.5; }
.home.is-kind > .offer, .home.is-kind > .studio, .home.is-kind > .takes { display: none !important; }
.home.is-kind > .catalog { margin-top: 0; }
/* A run of «Свой сценарий» started from its card (which closes) always has its frame in sight: on the home page with a
   kind of «Примеры» chosen it comes back, on «Готовые сценарии» it shows under the sections while it runs and with the result.
   An idea's card of «Примеры» (#scene) shows its own run: not behind it, only once it is closed on a run still going. */
.page-scenes > .studio { display: none; margin: 0 0 24px; }
html:is([data-site-mode="animate"], [data-site-mode="edit"]):is([data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]):not(:has(#scene[open])) :is(.home.is-kind, .page-scenes) > .studio { display: flex !important; }

/* A card: a white plate – its picture in a rounded frame (its kind a white tile on top, the photo «до» a print with a
   white edge in the corner), its name and price under it on the white. */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.card { position: relative; display: grid; align-content: start; gap: 6px; min-width: 0; padding: 6px 6px 10px; border: 0; border-radius: var(--tile); background: var(--white); color: var(--ink);
  text-align: left; text-decoration: none; box-shadow: var(--rim), var(--shadow); transition: transform .25s cubic-bezier(.3, .7, .2, 1), box-shadow .25s; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 17px; background: var(--tint); }
.card-media > img, .card-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
/* No example yet: plain paper, a mark in it. */
.card-media.is-empty, .reel-media.is-empty, .variant-media.is-empty, .kind-media.is-empty { display: grid; place-items: center; background: var(--tint); }
.card-media > .ph, .reel-media > .ph { position: static; }
.card-before { position: absolute; right: 7px; bottom: 7px; z-index: 2; width: 30%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 11px; background: var(--tint); box-shadow: 0 0 0 2px var(--white), 0 8px 16px -8px rgb(var(--ink-rgb) / .6); }
.card-before img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.card-kind { position: absolute; top: 12px; left: 12px; z-index: 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgb(var(--white-rgb) / .86); color: var(--ink);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 4px 10px -5px rgb(var(--ink-rgb) / .5); }
.card-kind svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card[data-media="video"] .type-photo, .card[data-media="image"] .type-video { display: none; }
.card-title, .reel-title { display: -webkit-box; overflow: hidden; padding: 0 5px; font-size: 13.5px; font-weight: 800; line-height: 1.25; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: break-word; hyphens: auto; }
.card-price { display: inline-flex; align-items: center; gap: 4px; justify-self: start; padding: 0 5px; color: var(--ink-2); font: 600 12px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.card-price .cr { width: 13px; height: 13px; }
.card-lead { padding: 0 5px; color: var(--mute); font-size: 12.5px; line-height: 1.3; }
.card:focus-visible { outline-offset: 2px; }
/* «Свой сценарий» at the head of a kind's cards: its white frame, its example under a paper veil, the round that sends in
   the middle. */
.card-studio .card-media { background: var(--tint); }
.card-studio .card-media::after { content: ""; position: absolute; inset: 0; background: rgb(var(--paper-rgb) / .3); }
.card-rec { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; }
.card-rec .rec-btn { width: 54px; height: 54px; border-radius: 15px; box-shadow: 0 10px 24px -10px rgb(0 0 0 / .6); }
.card-rec .rec-btn > span { width: 26px; height: 26px; }
/* «Популярное»'s chart: the same cards, each with its place on a white tile, the first three on green. */
.chart { counter-reset: none; }
.chart-item { position: relative; display: grid; }
.chart-rank { position: absolute; top: 12px; right: 12px; z-index: 4; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--r); background: rgb(var(--white-rgb) / .9); color: var(--ink);
  font: 700 13.5px/1 var(--display); font-variant-numeric: tabular-nums; box-shadow: 0 4px 10px -5px rgb(var(--ink-rgb) / .5); pointer-events: none; }
.chart-item:nth-child(-n+3) .chart-rank { background: var(--acc); color: var(--white); }
.chart-all { display: flex; margin-top: 20px; }

/* Pages */
.page { padding-top: 8px; }
.page-title { margin: 6px 0 14px; font: 800 30px/1.06 var(--display); letter-spacing: -.04em; overflow-wrap: anywhere; }
.page-lead { max-width: 34em; margin: 0 0 18px; color: var(--mute); }
.pills { display: flex; gap: 6px; margin: 0 -16px 14px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 40px; padding: 0 17px; border: 2px solid transparent; border-radius: var(--r); background: var(--white); color: var(--ink-2);
  font-size: 14.5px; font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.pill[aria-current="page"] { background: linear-gradient(var(--acc-soft), var(--acc-soft)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; color: var(--acc); box-shadow: none; }
.page-empty { display: grid; justify-items: start; gap: 4px; padding: 22px 0 24px; }
/* An empty frame (404, an empty «История»): a white card, the mark in green. */
.lost { position: relative; display: grid; place-items: center; width: 100%; max-width: 440px; aspect-ratio: 16 / 9; margin-bottom: 14px; overflow: hidden; border-radius: var(--frame); background: var(--white);
  box-shadow: var(--rim), var(--shadow); }
.lost-mark { color: var(--acc); font: 800 78px/1 var(--display); letter-spacing: -.06em; }
.doc-body { max-width: 42em; color: var(--ink-2); line-height: 1.7; }
.doc-body h2 { margin: 28px 0 8px; color: var(--ink); font: 700 19px/1.25 var(--display); letter-spacing: -.02em; }
.doc-body a { color: var(--acc); }
.page-scenes .catalog { margin-top: 20px; }

/* A scenario's page and a mode's page: the picture in its white frame on top, the rest under it, the white bar at the
   foot. One column as wide as the screen: the strips inside it scroll, they never widen it. */
.item { display: grid; grid-template-columns: minmax(0, 1fr); }
.shot { position: relative; margin: 2px 0 0; aspect-ratio: 4 / 5; max-height: 70vh; max-height: 70svh; overflow: hidden; border-radius: var(--frame); background: var(--tint); box-shadow: var(--shadow); }
.shot-media, .shot-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.shot-media:not(:has(> :not([hidden]))) { background: var(--tint); }
.shot-before { opacity: 0; transition: opacity .18s; }
.shot.is-before .shot-before { opacity: 1; }
.back-btn { position: absolute; top: 14px; left: 14px; z-index: 7; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgb(var(--white-rgb) / .82); color: var(--ink);
  box-shadow: var(--rim), 0 8px 18px -10px rgb(var(--ink-rgb) / .6); }
.back-btn svg, .bar-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hold { position: absolute; left: 14px; bottom: 14px; z-index: 7; width: 24%; max-width: 112px; aspect-ratio: 3 / 4; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: var(--tint);
  box-shadow: 0 0 0 3px var(--white), 0 12px 24px -10px rgb(var(--ink-rgb) / .6); color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; }
.hold img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.shot.is-before .hold { box-shadow: 0 0 0 3px var(--acc), 0 12px 24px -10px rgb(var(--ink-rgb) / .6); }
html:is([data-site-step="choose"], [data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]) .hold { display: none; }
html:is([data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]) .back-btn { display: none; }
.item-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 18px; }
.item-title { margin: 0; font: 800 27px/1.08 var(--display); letter-spacing: -.04em; overflow-wrap: anywhere; }
.item-lead { margin: -4px 0 0; color: var(--mute); font-size: 15px; }
.item-body > .pills { margin-bottom: 0; }
.item-body .row-title { margin: 6px 0 -4px; font-size: 17px; }
.strip { margin-top: 34px; }
/* A scenario's own words at its page's foot (pages/effect.html): quiet, under «Похожие». */
.about { max-width: 44em; margin-top: 40px; }
.about-text, .about-steps { color: var(--mute); font-size: 14.5px; line-height: 1.6; }
.about-text { margin: 0; }
.about-steps { margin: 12px 0 0; padding-left: 1.4em; }
.about-steps li + li { margin-top: 4px; }
.reels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(130px, 40%); gap: 12px; margin: 0 -16px; padding: 4px 16px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; scrollbar-width: none; }
.reels::-webkit-scrollbar { display: none; }
.reel { display: grid; align-content: start; gap: 8px; min-width: 0; color: var(--ink); text-decoration: none; scroll-snap-align: start; }
.reel-media { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 20px; background: var(--tint); box-shadow: var(--rim), var(--shadow); }
.reel-media > img, .reel-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.reel[aria-current="page"] .reel-media { border: 3px solid transparent; background: var(--tint) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; }
/* «Варианты» of a mode: a strip of small frames; the one whose words are in the field in a green rim. */
.variants { display: grid; grid-auto-flow: column; grid-auto-columns: 108px; gap: 10px; margin: 0 -16px; padding: 4px 16px; overflow-x: auto; scrollbar-width: none; }
.variants::-webkit-scrollbar { display: none; }
.variant { display: grid; align-content: start; gap: 6px; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; }
.variant-media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border: 3px solid transparent; border-radius: 17px; background: var(--tint); }
.variant-media img { width: 100%; height: 100%; object-fit: cover; }
.variant-title { display: -webkit-box; overflow: hidden; font-size: 12.5px; font-weight: 700; line-height: 1.25; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; hyphens: auto; }
.variant[aria-pressed="true"] .variant-media { background: var(--tint) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; }
.variant[aria-pressed="true"] .variant-title { color: var(--acc); }
.variant-words { grid-auto-columns: auto; align-content: center; width: 200px; min-height: 76px; padding: 10px 14px; border: 2px solid transparent; border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.variant-words .variant-title { -webkit-line-clamp: 3; }
.variant-words[aria-pressed="true"] { background: linear-gradient(var(--acc-soft), var(--acc-soft)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; box-shadow: none; }
.variants:has(.variant-words) { grid-auto-columns: 200px; }

/* The bar at the foot: the price big, what will be made as small marks, and the main key – on white. */
.run-bar { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgb(var(--white-rgb) / .97);
  box-shadow: 0 -1px 0 var(--line); }
.item .run-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; margin: 0; border-radius: 0; box-shadow: 0 -1px 0 var(--line), 0 -10px 30px -18px rgb(60 50 30 / .35); }
/* The sum takes what the key leaves («Оживить · ⊙ 60» on one line, the price never torn from its coin). */
.run-sum { display: grid; flex: 1 1 0; gap: 3px; min-width: 0; }
.run-price { display: inline-flex; align-items: center; gap: 5px; font: 700 23px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.run-price .cr { width: 20px; height: 20px; }
.run-price:empty { display: none; }
.run-sum small { display: -webkit-box; overflow: hidden; color: var(--mute); font-size: 12.5px; font-weight: 600; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.run-sum small.run-marks { display: flex; flex-wrap: wrap; gap: 4px; }
.run-marks span { padding: 2px 9px; border-radius: var(--r); background: var(--tint); color: var(--ink-2); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.run-go { flex: 0 0 auto; min-height: 52px; padding: 0 22px; white-space: nowrap; }
.run-go .cr { width: 16px; height: 16px; }

/* «Свой сценарий»'s blocks: white white panels. */
.block { display: grid; gap: 10px; padding: 14px; border-radius: var(--tile); background: var(--white); box-shadow: var(--rim), var(--shadow); }
.cmp-body .block, .sheet .block { background: var(--white); }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.block-label { margin: 0; font: 700 15.5px/1.2 var(--display); letter-spacing: -.02em; }
.block-hint { color: var(--mute); font-size: 12.5px; font-weight: 600; }
.block-sub { margin: 4px 0 -2px; color: var(--mute); font-size: 12.5px; font-weight: 600; }
.field-box { border-radius: 20px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow .15s, background .15s; }
.field-box:focus-within { background: var(--white); box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 4px rgb(var(--acc-rgb) / .14); }
.field-box textarea, .kit-textarea { display: block; width: 100%; min-height: 112px; padding: 12px 14px 6px; border: 0; background: none; color: var(--ink); font: 500 16px/1.45 var(--sans); resize: none; outline: none; }
.field-box textarea::placeholder, .kit-textarea::placeholder, .field::placeholder { color: rgb(var(--mute-rgb) / .9); }
.field-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px 8px; }
.idea-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--r); background: var(--acc-soft); color: var(--acc); font-size: 13px; font-weight: 800; }
.idea-btn svg { width: 16px; height: 16px; fill: currentColor; }
/* «✦ Подставить идею» as drawn (36 px), a finger's height to tap. */
.idea-btn::after { content: ""; position: absolute; inset: -2px 0; }
.field-count { margin-left: auto; color: var(--mute); font: 600 11px/1 var(--sans); font-variant-numeric: tabular-nums; }
.field-box.is-asking { box-shadow: inset 0 0 0 1.5px var(--red), 0 0 0 4px rgb(var(--red-rgb) / .16); animation: nod .45s ease-in-out; }
@keyframes nod { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.field-ask { margin: 0; color: var(--red-deep); font-size: 13.5px; font-weight: 600; }
/* The choices (quality, length, frame, 1K / 2K): white tiles; the chosen one green in a green rim (the rim is its border,
   always there, clear until chosen). */
.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
/* The lengths in one row, as many as the chosen clip offers (a video scene's stop where its model does: the kit hides the rest). */
.opts-lengths { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.opts-formats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opts button { display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; min-height: 54px; padding: 6px 2px; border: 2px solid transparent; border-radius: 16px; background: var(--paper); color: var(--ink);
  font-size: 13px; font-weight: 800; line-height: 1.15; box-shadow: inset 0 0 0 1px var(--line-2); }
.opts .q-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opts .q-price { display: inline-flex; align-items: center; gap: 3px; color: var(--mute); font: 600 11.5px/1 var(--display); font-variant-numeric: tabular-nums; }
.opts .q-price .cr { width: 11px; height: 11px; }
.opts button[aria-pressed="true"] { background: linear-gradient(var(--acc-soft), var(--acc-soft)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; color: var(--acc); box-shadow: none; }
.opts button[aria-pressed="true"] .q-price { color: var(--acc); }
.opts-formats button { min-height: 58px; }
.opts-formats .q-name { white-space: normal; text-overflow: clip; text-align: center; }
.opts-fixed { color: var(--mute); font-size: 14px; font-weight: 600; }
/* A video scene's page: the clip's quality, length and frame, each row under its name (pages/effect.html). */
.clip-row { display: grid; gap: 8px; }
/* Each frame drawn as its outline. */
.q-frame { display: block; border: 1.5px solid currentColor; border-radius: 3px; }
.q-frame[data-frame="9:16"] { width: 11px; height: 19px; }
.q-frame[data-frame="2:3"] { width: 13px; height: 19px; }
.q-frame[data-frame="3:4"] { width: 14px; height: 18px; }
.q-frame[data-frame="1:1"] { width: 17px; height: 17px; }
.q-frame[data-frame="4:3"] { width: 19px; height: 14px; }
.q-frame[data-frame="3:2"] { width: 20px; height: 13px; }
.q-frame[data-frame="16:9"] { width: 22px; height: 12px; }

/* The photo: «Загрузить фото» as a dashed frame to drop it in – its arrow on an ink round –, the picked one small. */
.drop { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 14px 16px; border: 1.5px dashed rgb(var(--acc-rgb) / .5); border-radius: 18px;
  background: var(--white); color: var(--ink); text-align: left; transition: background .2s, border-color .2s; }
.drop:active, .drop.is-over { border-color: var(--acc); background: var(--acc-soft); }
.drop:disabled { opacity: .55; }
.drop-icon { display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; background: var(--acc); box-shadow: var(--glow); }
.drop-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.drop-text { display: grid; gap: 1px; }
.drop-title { font-size: 16px; font-weight: 800; }
.drop-note { color: var(--mute); font-size: 12.5px; font-weight: 600; }
.only-optional, .photo-optional .only-needed { display: none; }
.photo-optional .only-optional { display: inline; }
[data-slot-optional] .only-needed { display: none; }
[data-slot-optional] .only-optional { display: inline; }
/* A later photo's drop is quieter than the first one's: its plus on a white tile, not the ink one. */
.drop-more .drop-icon { background: var(--white); box-shadow: inset 0 0 0 1px var(--line-2); }
.drop-more .drop-icon svg { stroke: var(--ink); }
.picked { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 22px; background: var(--acc-soft); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .45); }
.picked-thumb { position: relative; flex: 0 0 auto; width: 56px; height: 56px; padding: 0; overflow: hidden; border: 0; border-radius: 15px; background: var(--tint); }
.picked-thumb img { width: 100%; height: 100%; object-fit: cover; }
.picked-text { display: grid; flex: 1 1 auto; min-width: 0; }
.picked-text strong { font-size: 15px; font-weight: 800; }
.picked-text small { color: var(--mute); font-size: 12.5px; }
.picked-again { flex: 0 0 auto; white-space: nowrap; }
.tips-wrap { margin-top: 8px; }
/* «Качество: 1K / 2K» under the photo and what fits (partials/photo.html): its name on the left, two of the clip's option
   tiles on the right. On the free try 2K is off, the reason under it. */
.res { margin-top: 10px; }
.res-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.res-name { margin: 0; }
.opts-res { flex: 0 1 200px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opts-res button { min-height: 48px; }
.opts-res button:disabled { opacity: .45; cursor: not-allowed; }
.res-note { flex-basis: 100%; margin: 0; color: var(--mute); font-size: 12.5px; line-height: 1.35; }
/* What fits stands apart; what does not, together after a hairline. */
.tips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tip { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--mute); font-size: 12px; font-weight: 600; }
.tip-yes { color: var(--ink); }
.tip-yes + .tip-no { margin-left: 8px; padding-left: 16px; box-shadow: inset 1px 0 0 var(--line-2); }
.tip-pic { position: relative; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px; background: var(--tint); }
.tip-pic img, .tip-pic svg { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.tip-drawn svg { padding: 3px; fill: var(--mute); }
.tip-blur svg { filter: blur(1.4px); }
.tip-mark { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 13px; height: 13px; border-radius: 50%; color: var(--white); font-size: 8.5px; font-weight: 900; line-height: 1;
  box-shadow: 0 0 0 1.5px var(--white); }
.tip-yes .tip-mark { background: var(--acc); }
.tip-no .tip-mark { background: var(--red-deep); }
.photo-slot, .slot, .scene-photo { display: grid; gap: 8px; }
.more-photos, .scene-more { display: grid; gap: 14px; }
.more-photos:not(:has(.slot:not([hidden]))), .scene-more:not(:has(.slot:not([hidden]))) { display: none; }
.slot-head { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.slot-name { font-size: 14px; font-weight: 800; }
.slot-opt { color: var(--acc); font-size: 12px; font-weight: 700; }
:not([data-slot-optional]) > .slot-head .slot-opt { display: none; }
[data-slot-waiting] > .slot-head { opacity: .55; }
.fx-words { padding: 0; background: none; box-shadow: none; }

/* The settings the kit draws (data-kit-params). */
.params { display: grid; gap: 14px; }
.params:empty { display: none; }
.kit-param { display: grid; gap: 8px; }
.kit-param-label { margin: 0; color: var(--mute); font-size: 13px; font-weight: 700; }
.kit-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kit-chip { position: relative; cursor: pointer; }
.kit-chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.kit-chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 17px; border: 2px solid transparent; border-radius: var(--r); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 14.5px; font-weight: 700; }
.kit-chip input:checked + span { background: linear-gradient(var(--acc-soft), var(--acc-soft)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; color: var(--acc); box-shadow: none; }
.kit-chip input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 3px; }
.kit-select, .kit-text, .field { width: 100%; min-height: 48px; padding: 0 16px; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink); font-size: 16px; box-shadow: inset 0 0 0 1px var(--line-2); }
.kit-text:focus, .field:focus, .kit-select:focus { outline: none; background: var(--white); box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 4px rgb(var(--acc-rgb) / .14); }
/* A slider («Возраст»): its line as the browser draws it, its touch area a finger high. */
.kit-range { width: 100%; height: 40px; margin: 0; accent-color: var(--acc); }
.kit-range-value { font-weight: 800; }
.kit-words { padding: 0; }
.kit-textarea { min-height: 96px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); }

/* Cards (dialogs): paper white sheets from the bottom on a phone, the green's lights glowing at their head; the tall ones take
   the screen. */
.sheet { width: 100%; max-width: 540px; max-height: 92vh; max-height: 92dvh; margin: auto auto 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain;
  border: 0; border-radius: var(--frame) var(--frame) 0 0; color: var(--ink); scrollbar-width: thin; scrollbar-color: rgb(var(--ink-rgb) / .2) transparent; background: var(--paper);
  box-shadow: 0 -20px 50px -30px rgb(30 25 15 / .4); }
.sheet::backdrop { background: rgb(23 23 26 / .42); }
.sheet[open] { animation: rise .34s cubic-bezier(.3, .7, .2, 1); }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet:is(.sheet-small, .sheet-filters, .sheet-install)::before { content: ""; display: block; width: 40px; height: 5px; margin: -6px auto 14px; border-radius: 3px; background: rgb(var(--ink-rgb) / .14); }
.sheet-small { max-width: 440px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sheet-title { margin: 0 0 8px; font: 800 23px/1.12 var(--display); letter-spacing: -.035em; }
.sheet-top .sheet-title { margin: 0; }
.sheet-text { margin: 0 0 14px; color: var(--mute); font-size: 15px; }
.sheet-text a { color: var(--acc); }
.sheet-hint { margin: 12px 0 0; color: var(--mute); font-size: 12.5px; line-height: 1.45; }
.sheet-status { margin: 0; color: var(--mute); font-size: 13.5px; }
.sheet-status:empty { display: none; }
.sheet-actions { display: grid; gap: 6px; }
.sheet-actions .text-btn { justify-self: center; }
.close { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sheet-full { height: 100vh; height: 100dvh; max-height: none; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); border-radius: 0; }
.sheet-full .sheet-top { position: sticky; top: 0; z-index: 8; margin: 0 -16px 14px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px; background: rgb(var(--paper-rgb) / .96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.age-mark { justify-self: start; width: fit-content; margin: 4px 0 12px; padding: 6px 18px; border-radius: 16px; background: var(--acc-soft); color: var(--acc); font: 800 38px/1.1 var(--display); letter-spacing: -.04em; }
.sheet .oops { margin-top: 10px; }

/* «Бесплатная проба» and a scene's card: the example in the frame on top, «до» in its corner, the rest under it, the bar
   at the foot. */
.sheet-free { height: 100vh; height: 100dvh; max-height: none; margin: auto auto 0; padding: 0; overflow: hidden; border-radius: 0; }
.sheet-free[open], .sheet-compose[open], .sheet-create[open] { display: flex; flex-direction: column; }
.free-shot { flex: 0 0 auto; height: 42%; min-height: 200px; overflow: hidden; background: var(--tint); }
@media (max-height: 700px) { .free-shot { height: 34%; } }
/* A scenario's card and «Бесплатная проба» on a phone or a tablet (2026-10-30, the free one 2026-11-01): the example as
   tall as its own proportions make it at the card's width (app.js: --shot-ratio, its height ÷ width) – a 2:3 or 9:16 clip
   whole, or nearly, not cut at the bottom –, never lower than the frame a landscape one keeps, never more than about two
   thirds of the screen (the name, the photo and the button stay in sight); a short phone a little less. Unknown
   proportions: the frame as it was. A computer shows it whole on the left anyway. */
@media (max-width: 999px) {
  .sheet-free .free-shot { height: clamp(42%, calc(min(100vw, 540px) * var(--shot-ratio, 0)), 68%); }
}
@media (max-width: 999px) and (max-height: 700px) { .sheet-free .free-shot { height: clamp(34%, calc(min(100vw, 540px) * var(--shot-ratio, 0)), 56%); } }
.free-media, .free-media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
/* A scenario with no example yet: the empty frame plain paper, as its card is. */
.free-media:not(:has(> :not([hidden]))) { background: var(--tint); }
.free-shot::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 22%; background: linear-gradient(rgb(var(--ink-rgb) / .25), transparent); pointer-events: none; }
.sheet-free .out [data-kit-src="photo"] { display: none !important; }
html:is([data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]) .before-chip { display: none; }
.free-close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; z-index: 9; background: rgb(var(--white-rgb) / .85); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.free-body { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; overflow: auto; overscroll-behavior: contain; padding: 16px; }
.free-light { display: inline-flex; align-items: center; gap: 9px; margin: 0; color: var(--acc); font-size: 12.5px; font-weight: 800; }
.free-title { margin: 0; font: 800 24px/1.1 var(--display); letter-spacing: -.035em; }
.free-lead { margin: 0; font-size: 15.5px; line-height: 1.35; }
.free-lead strong { font-weight: 800; }
.scene-lead { color: var(--mute); font-size: 13.5px; line-height: 1.4; }
.free-note { margin: 0 0 4px; color: var(--mute); font-size: 13px; line-height: 1.4; }
.scene-type { justify-self: start; margin: 0; padding: 4px 11px; border-radius: var(--r); background: var(--acc-soft); color: var(--acc); font-size: 12px; font-weight: 800; }
.scene-type:empty { display: none; }
.sheet-scene:not([data-clip="yes"]) .scene-video { display: none; }
.scene-video { display: grid; gap: 8px; }
/* «1 фото бесплатно» beside «Создать бесплатно»: on two even lines when the key leaves it no room for one, never cut. */
.free-bar .free-bar-title { text-wrap: balance; }
.free-bar-title { font: 700 15.5px/1.15 var(--display); letter-spacing: -.02em; }
.free-go { padding: 0 20px; }
.consents { display: grid; gap: 6px; margin-top: 4px; }
.consent { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 14px; border-radius: 18px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; line-height: 1.35; cursor: pointer; }
.consent-box { display: grid; place-items: center; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 0 0 1.5px var(--silver); background: var(--white); }
.consent-box svg { width: 16px; height: 16px; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.consent input:checked + .consent-box { background: var(--acc); box-shadow: none; }
.consent input:checked + .consent-box svg { opacity: 1; }
.consent input:focus-visible + .consent-box { outline: 2px solid var(--acc); outline-offset: 2px; }
.consent-text a { color: var(--acc); text-underline-offset: 3px; }
.consents.is-asking .consent:not(:has(input:checked)) { box-shadow: inset 0 0 0 1.5px var(--red); background: var(--red-soft); animation: nod .45s ease-in-out; }

/* «Свой сценарий» as a card. */
.sheet-compose { height: 100vh; height: 100dvh; max-height: none; padding: 0; overflow: hidden; border-radius: 0; }
.cmp-shot { display: none; }
.cmp-top { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; padding: calc(16px + env(safe-area-inset-top)) 16px 10px; }
.cmp-top .sheet-title { margin: 0; }
.cmp-lead { margin: 4px 0 0; color: var(--mute); font-size: 13.5px; line-height: 1.4; }
.cmp-body { flex: 1 1 auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; overflow: auto; overscroll-behavior: contain; padding: 4px 16px 16px; }

/* «Создать»: «Видео / Фото», then the ways as white rows. */
.sheet-create .sheet-top { margin-bottom: 12px; }
.sheet-create[data-tab="animate"] [data-create-panel="edit"], .sheet-create[data-tab="edit"] [data-create-panel="animate"] { display: none; }
.create-panel { display: grid; gap: 12px; align-content: start; animation: rise-in .3s cubic-bezier(.3, .7, .2, 1); }
.create-lead { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.45; }
.create-all { position: relative; color: var(--acc); font-weight: 800; text-underline-offset: 4px; white-space: nowrap; }
.shots { display: grid; gap: 10px; }
.shotrow { position: relative; display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 7px 12px 7px 7px; border: 0; border-radius: var(--tile);
  background: var(--white); box-shadow: var(--rim), var(--shadow); color: var(--ink); text-align: left; text-decoration: none; }
.shotrow-media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 16px; background: var(--tint); }
.shotrow-media > img, .shotrow-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.shotrow-media > .ph { position: absolute; inset: 0; margin: auto; }
.shotrow-text { display: grid; gap: 3px; min-width: 0; }
.shotrow-title { font: 700 16px/1.18 var(--display); letter-spacing: -.025em; overflow-wrap: break-word; hyphens: auto; }
.shotrow-lead { color: var(--mute); font-size: 13px; line-height: 1.35; }
.shotrow-price { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font: 600 13px/1 var(--display); }
.shotrow-go { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--paper); color: var(--ink); }
.shotrow-go.is-rec { background: var(--acc); color: var(--white); }
.shotrow-go .rec-dot { width: 18px; height: 18px; }

/* «История» as a sheet of small white frames; «Популярное» as a chart. */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kit-result { position: relative; padding: 0; overflow: hidden; aspect-ratio: 3 / 4; border: 0; border-radius: 16px; background: var(--tint); box-shadow: var(--rim), 0 8px 18px -14px rgb(60 50 30 / .6); }
.kit-result img { width: 100%; height: 100%; object-fit: cover; }
/* A result whose picture is gone (app.js): its tile plain paper, its name and date on it. */
.kit-result.is-empty { background: var(--tint); }
.kit-result[data-when]::before { content: attr(data-when); position: absolute; left: 5px; bottom: 5px; z-index: 1; padding: 1px 7px; border-radius: var(--r); background: rgb(var(--white-rgb) / .88); color: var(--ink); font: 800 10px/1.5 var(--sans); }
.kit-result.is-video::after { content: ""; position: absolute; right: 8px; bottom: 8px; border-left: 9px solid var(--white); border-top: 6px solid transparent; border-bottom: 6px solid transparent; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .4)); }
/* A picture made 2K after its run: «2K» in its lower right corner (a clip has its mark there). */
.kit-result.is-2k::after { content: "2K"; position: absolute; right: 5px; bottom: 5px; z-index: 1; padding: 1px 7px; border-radius: var(--r); background: var(--ink); color: var(--white); font: 800 10px/1.5 var(--sans); }
.kit-result-name { position: absolute; left: 0; right: 0; top: 0; z-index: 1; display: -webkit-box; overflow: hidden; padding: 6px 8px 16px; background: linear-gradient(rgb(var(--white-rgb) / .9), transparent);
  color: var(--ink); font-size: 11px; font-weight: 800; line-height: 1.25; text-align: left; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.acc-out { display: grid; gap: 10px; margin-bottom: 14px; }
.acc-out img, .acc-out video { width: 100%; max-height: 62vh; border-radius: 24px; background: var(--tint); object-fit: contain; }
#history:not(.is-viewing) .acc-out { display: none !important; }
.history-empty { display: grid; justify-items: start; gap: 4px; }
/* An empty sheet of frames: one white white frame waiting for the first picture. */
.history-empty .lost { max-width: none; aspect-ratio: 16 / 8; margin-bottom: 10px; }
/* In it, a picture mark on a pale green tile, waiting for the first picture. */
.history-empty .lost::before { content: ""; grid-area: 1 / 1; width: 60px; height: 60px; border-radius: 18px; background: var(--acc-soft); }
.history-empty .lost::after { content: ""; grid-area: 1 / 1; width: 28px; height: 28px; background: var(--acc);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='3'/%3E%3Ccircle cx='9' cy='10' r='1.8'/%3E%3Cpath d='m4 17 5-4.5 3.5 3 3-2.5 4.5 4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='3'/%3E%3Ccircle cx='9' cy='10' r='1.8'/%3E%3Cpath d='m4 17 5-4.5 3.5 3 3-2.5 4.5 4'/%3E%3C/svg%3E") center / contain no-repeat; }

/* «Фильтры» */
.flt { display: grid; gap: 10px; margin-top: 16px; }
.flt-title { margin: 0; color: var(--mute); font-size: 13px; font-weight: 700; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); }
.seg button { min-height: 42px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--mute); font-size: 14.5px; font-weight: 800; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgb(60 50 30 / .14); }
.chips { display: flex; gap: 6px; padding: 2px 0; }
.chips button { display: inline-flex; align-items: center; min-height: 40px; }
.flt-bar { position: sticky; bottom: calc(-22px - env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px -18px calc(-22px - env(safe-area-inset-bottom));
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: rgb(var(--paper-rgb) / .96); box-shadow: 0 -1px 0 var(--line); }
.flt-show { flex: 1 1 auto; max-width: 260px; }

/* «Пополнить баланс»: the steps as a green line that fills, the packages as white tiles (the chosen one in a green rim),
   the ways, the waiting card. */
.topup-steps { display: flex; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.topup-steps li { display: grid; flex: 1 1 0; gap: 7px; color: var(--mute); font-size: 12.5px; font-weight: 700; }
.topup-steps li::before { content: ""; height: 5px; border-radius: var(--r); background: var(--tint-2); }
.topup-steps li.is-on, .topup-steps li:has(i:not([hidden])) { color: var(--ink); }
.topup-steps li.is-on::before, .topup-steps li:has(i:not([hidden]))::before { background: var(--acc); }
.topup-steps i { display: none !important; }
.topup-lead { margin: 0 0 12px; color: var(--mute); font-size: 13.5px; line-height: 1.45; }
.topup-offers { display: grid; gap: 6px; margin-bottom: 14px; }
.offer-chip { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 18px; background: var(--acc-soft); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .4); font-size: 13.5px; line-height: 1.35; }
.offer-chip b { color: var(--acc); }
.offer-chip.is-promo { background: var(--acc-soft); box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .3); }
.offer-ico { font-size: 18px; }
.offer-note { margin: 0; color: var(--mute); font-size: 12px; }
.topup-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.topup-label { margin: 0 0 8px; font: 700 16px/1.2 var(--display); letter-spacing: -.02em; }
.topup-head .topup-label { margin: 0; }
.topup-rate { color: var(--mute); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 10px; padding-top: 4px; }
.pack { position: relative; display: grid; align-content: start; gap: 6px; min-width: 0; min-height: 124px; padding: 16px 12px 10px; border: 2.5px solid transparent; border-radius: 22px; background: var(--white); color: var(--ink);
  text-align: left; box-shadow: inset 0 0 0 1px var(--line-2), 0 8px 20px -16px rgb(60 50 30 / .55); transition: box-shadow .15s, background .15s; }
.pack-tag { position: absolute; top: -12px; left: 10px; padding: 3px 10px; border-radius: var(--r); background: var(--ink); color: var(--white); font-size: 10.5px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.pack.is-max .pack-tag { background: var(--acc); color: var(--white); }
.pack-total { display: inline-flex; align-items: center; gap: 5px; font: 700 23px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pack-total .cr { width: 19px; height: 19px; }
.pack-parts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.pack-sum { color: var(--mute); font-size: 12px; font-weight: 600; }
/* A phone and a tablet: the sum on its own line, the bonus and its credits together under it (never «+48» alone). */
@media (max-width: 999px) { .pack-sum { flex: 1 0 100%; } }
.pack-pct, .pack-gift { color: var(--acc); font-size: 11.5px; font-weight: 800; }
.pack-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; margin-top: auto; padding-top: 7px; border-top: 1px solid var(--line); }
.pack-price { font-size: 15.5px; font-weight: 800; }
.pack-worth { color: var(--mute); font-size: 11.5px; font-weight: 600; }
.pack[aria-pressed="true"] { background: linear-gradient(var(--white), var(--white)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; box-shadow: 0 16px 30px -16px rgb(var(--acc-rgb) / .55); }
.pack[aria-pressed="true"] .pack-foot { border-top-color: rgb(var(--acc-rgb) / .2); }
.promo { display: grid; gap: 8px; margin-top: 20px; }
.promo .topup-label { margin: 0; }
.promo-row { display: flex; gap: 8px; }
.promo-input { flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 0 18px; border: 0; border-radius: var(--r); background: var(--white); color: var(--ink); font: 700 16px/1 var(--sans); letter-spacing: .06em;
  box-shadow: inset 0 0 0 1px var(--line-2); }
.promo-input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--acc), 0 0 0 4px rgb(var(--acc-rgb) / .14); }
.promo-input::placeholder { color: rgb(var(--mute-rgb) / .85); }
.promo-go { flex: 0 0 auto; min-height: 48px; padding: 0 20px; border: 0; border-radius: var(--r); background: var(--acc-soft); color: var(--acc); font-size: 14.5px; font-weight: 800; }
.promo-note { margin: 0; color: var(--acc); font-size: 13px; font-weight: 700; }
.promo-hint { margin: 0; color: var(--mute); font-size: 12.5px; }
.topup-bar { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); z-index: 6; display: flex; align-items: center; gap: 12px; margin: 20px -18px calc(-24px - env(safe-area-inset-bottom));
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: rgb(var(--paper-rgb) / .96); box-shadow: 0 -1px 0 var(--line); }
.bar-sum { display: grid; flex: 1 1 auto; gap: 3px; min-width: 0; }
.bar-total { display: inline-flex; align-items: center; gap: 5px; font: 700 22px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.bar-total .cr { width: 19px; height: 19px; }
.bar-sub { overflow: hidden; color: var(--mute); font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pay-go { flex: 0 0 auto; min-width: 124px; }
.bar-back { display: grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 14px; background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
/* The ways in their groups: a row each, the countries' cards as flag tiles two to a row (the sum under the name). */
.ways { display: grid; gap: 18px; }
.way-group { display: grid; gap: 8px; }
.way-group-title { margin: 0 2px; color: var(--mute); font: 800 11.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.way-list { display: grid; gap: 8px; }
.is-cards .way-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Google Pay and Apple Pay side by side, «Карта Visa / Mastercard» under them the whole width (2026-12-01). */
.is-wallet .way-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.is-wallet .way:not(.way-pair) { grid-column: 1 / -1; }
.way-note { margin: 0 2px; color: var(--mute); font-size: 12px; line-height: 1.35; }
.way { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 2px solid transparent; border-radius: 22px; background: var(--white); color: var(--ink);
  text-align: left; box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 16px -14px rgb(60 50 30 / .55); }
.way[aria-pressed="true"] { background: linear-gradient(var(--white), var(--white)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; box-shadow: 0 12px 26px -16px rgb(var(--acc-rgb) / .5); }
.way-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--paper); }
.way-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.way-text { display: grid; min-width: 0; }
.way-text b { font-size: 15px; font-weight: 800; }
.way-text small { color: var(--mute); font-size: 12.5px; line-height: 1.3; }
.way-price { display: grid; justify-items: end; gap: 3px; font: 600 14.5px/1.1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.way-cut { padding: 2px 7px; border-radius: var(--r); background: var(--acc-soft); color: var(--acc); font: 800 11px/1.2 var(--sans); }
.way-ico svg.flag { width: 24px; height: 16px; border-radius: 3px; stroke: none; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); }
.way-tile { grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; gap: 3px 10px; min-height: 62px; padding: 8px 10px; }
.way-tile .way-ico { grid-row: 1 / span 2; width: 34px; height: 34px; }
.way-tile .way-ico svg.flag { width: 22px; height: 15px; }
.way-tile .way-price { justify-items: start; color: var(--mute); }
.way-tile .way-price:has(span:empty:last-child) { display: none; }
/* A country's card the package is too cheap or too dear for: dimmed, a lock and the packages it takes where its sum would
   be («от 10 $»); a press picks such a package (the kit). */
.way-lock { display: none; width: 12px; height: 12px; fill: currentColor; stroke: none; }
.way[aria-disabled="true"] { background: rgb(var(--white-rgb) / .5); box-shadow: inset 0 0 0 1px var(--line); }
.way[aria-disabled="true"] .way-ico, .way[aria-disabled="true"] .way-text { opacity: .5; }
.way[aria-disabled="true"] .way-ico { filter: grayscale(.6); }
.way[aria-disabled="true"] .way-price { display: flex; align-items: center; gap: 4px; color: var(--red-deep); font-size: 13px; }
.way[aria-disabled="true"] .way-lock { display: block; }
/* «Криптовалюта»'s coin under the ways: two keys – the coin and its network, its sum under them; the one picked in a rim of
   green, as a way is. */
.coins { display: grid; gap: 8px; margin: 2px 0 6px; padding: 0 0 0 12px; border-left: 2px solid rgb(var(--acc-rgb) / .45); }
.coins-title { margin: 0; font-size: 13px; color: var(--mute); }
.coin-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.coin { display: grid; align-content: center; gap: 5px; min-width: 0; min-height: 60px; padding: 8px 10px; border: 2px solid transparent; border-radius: 18px; background: var(--white); color: var(--ink); text-align: left;
  box-shadow: inset 0 0 0 1px var(--line-2); }
.coin[aria-pressed="true"] { background: linear-gradient(var(--acc-soft), var(--acc-soft)) padding-box, linear-gradient(var(--acc), var(--acc)) border-box; box-shadow: none; }
.coin-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; min-width: 0; }
.coin-name b { font: 700 14.5px/1.2 var(--display); }
.coin-name small { color: var(--mute); font-size: 12px; font-weight: 600; white-space: nowrap; }
.coin-sum { overflow: hidden; font: 600 14px/1.1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
.coin-sum:empty { display: none; }
.topup-sum { display: grid; margin: 16px 0 0; }
.topup-sum > div, .wait-rows > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.topup-sum dt, .wait-rows dt { color: var(--mute); font-size: 13.5px; }
.topup-sum dd, .wait-rows dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.topup-sum .is-plus { color: var(--acc); }
.topup-sum .is-total dd { display: inline-flex; align-items: center; gap: 4px; font: 700 19px/1 var(--display); }
#checkout[open] { display: flex; flex-direction: column; }
#checkout > .topup-body:not([hidden]), #checkout > .paying:not([hidden]), #checkout .topup-page:not([hidden]) { display: flex; flex: 1 0 auto; flex-direction: column; }
.paying { gap: 12px; }
.topup-page > .topup-bar, .paying > .topup-bar { margin-top: auto; }
.topup-page > .promo, .topup-page > .sheet-hint { margin-bottom: 20px; }
.wait-card { display: grid; justify-items: center; gap: 10px; padding: 26px 16px 22px; border-radius: 28px; background: var(--white); text-align: center; box-shadow: var(--rim), var(--shadow); }
.wait-clock { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--acc-soft); }
.wait-clock svg { width: 28px; height: 28px; fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linecap: round; }
.wait-title { margin: 6px 0 0; font: 800 20px/1.15 var(--display); letter-spacing: -.03em; }
.wait-lead { max-width: 30em; margin: 0; color: var(--mute); font-size: 13.5px; line-height: 1.45; }
.wait-rows { display: grid; width: 100%; margin: 8px 0 4px; text-align: left; }
.wait-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
/* «Отменить счёт»: the quiet way out beside «Статус платежа». «Закрыть» at the bar's right end, as high as the keys there. */
.pay-cancel { color: var(--mute); text-decoration-color: rgb(var(--mute-rgb) / .4); }
.bar-close { flex: 0 0 auto; margin-left: auto; min-height: 52px; padding: 0 22px; }

/* «Криптовалюта»'s transfer: the QR code on white (its quiet zone is in the code), the exact sum big, the visitor's own
   address on paper in monospace with «Скопировать», «Открыть в кошельке», the note. Side by side from 420px. */
.transfer { display: grid; gap: 12px; padding: 18px 16px; border-radius: 26px; background: var(--white); box-shadow: var(--rim), var(--shadow); }
.transfer-title { margin: 0; font: 700 18px/1.2 var(--display); letter-spacing: -.02em; }
.transfer-lead { margin: -6px 0 0; color: var(--mute); font-size: 13.5px; line-height: 1.45; }
.transfer-main { display: grid; gap: 14px; }
.transfer-qr { justify-self: center; width: min(220px, 70vw); padding: 6px; border-radius: 16px; background: var(--white); color: var(--ink); line-height: 0; box-shadow: inset 0 0 0 1px var(--line-2); }
.transfer-qr svg { display: block; width: 100%; height: auto; }
.transfer-facts { display: grid; align-content: start; gap: 10px; min-width: 0; }
.transfer-rows { display: grid; gap: 10px; margin: 0; }
.transfer-rows div { display: grid; gap: 3px; }
.transfer-rows dt { color: var(--mute); font-size: 12.5px; font-weight: 600; }
.transfer-rows dd { margin: 0; }
.transfer-sum b { font: 700 23px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.transfer-sum span { color: var(--acc); font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.transfer-address { padding: 10px 14px; border-radius: 14px; background: var(--tint); font: 700 13.5px/1.45 var(--mono); letter-spacing: .01em; overflow-wrap: anywhere; word-break: break-all; user-select: all; }
.transfer-copy svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.transfer-copy[data-copied] { background: var(--acc-soft); color: var(--acc); }
.transfer-note { margin: 0; color: var(--mute); font-size: 12.5px; line-height: 1.45; }
@media (min-width: 420px) {
  .transfer-main { grid-template-columns: 160px minmax(0, 1fr); align-items: start; }
  .transfer-qr { width: 100%; }
  .transfer-copy { justify-self: start; }
}

/* «Профиль»: the balance on a card green – big ink figures, a big coin, a white light in its corner; the number and
   «Скопировать» on a white white line. */
.purse { position: relative; display: grid; gap: 14px; padding: 20px 16px 16px; overflow: hidden; border-radius: var(--frame); background: var(--acc-soft); color: var(--ink); }
.purse-n { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font: 800 46px/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.purse-n .cr { width: 34px; height: 34px; }
.purse-label { font: 700 14px/1.2 var(--sans); letter-spacing: 0; color: var(--ink-2); }
.purse-id { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 16px; background: var(--white); }
.purse-id-text { display: grid; min-width: 0; }
.purse-id-text small { color: var(--ink-2); font-size: 12px; font-weight: 700; }
.purse-id .ghost { background: var(--paper); box-shadow: none; }
/* The account number whole: «Скопировать» goes under it when the two do not fit (a 320 px phone). */
.acc-number { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; }
.purse-note { margin: -4px 0 0; color: var(--ink-2); font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.acc-block { display: grid; gap: 10px; margin-top: 24px; }
.acc-title { margin: 0; font: 700 18px/1.2 var(--display); letter-spacing: -.025em; }
.acc-lead, .acc-hint { margin: 0; color: var(--mute); font-size: 13.5px; line-height: 1.45; }
.acc-warn { margin: 0; padding: 10px 14px; border-radius: 18px; background: var(--amber-soft); color: var(--amber-deep); font-size: 13.5px; font-weight: 700; }
[data-acc-can]:not([hidden]) { display: grid; gap: 10px; }
.acc-item { display: grid; gap: 8px; padding: 16px; border-radius: 22px; background: var(--white); box-shadow: var(--rim), var(--shadow); }
/* Its title and, once a code is out, «✓ Выдан» as a small chip beside it (empty – no chip). */
.acc-item-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.acc-item-title { font-size: 15px; font-weight: 800; }
.acc-item-state { min-width: 0; padding: 3px 10px; border-radius: var(--r); background: var(--acc-soft); color: var(--acc); font-size: 12.5px; font-weight: 800; line-height: 1.3; text-align: left; overflow-wrap: anywhere; }
.acc-item-state::before { content: "✓ "; }
.acc-item-state:empty { display: none; }
.acc-code { display: grid; gap: 8px; }
.code { margin: 0; padding: 14px; border-radius: 16px; background: var(--tint); font: 700 18px/1.2 var(--mono); letter-spacing: .08em; text-align: center; user-select: all; overflow-wrap: anywhere; }
.acc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acc-status { margin: 0; font-size: 13px; font-weight: 700; }
.acc-status:empty { display: none; }
.acc-status[data-tone="ok"] { color: var(--acc); }
.acc-status[data-tone="error"] { color: var(--red-deep); }
/* «Telegram» (partials/account.html; the kit's web/sites/kit-telegram.js): the paper plane in its buttons; while the bot's
   button is not pressed, «Ждём подтверждения в Telegram…» in the button's place with «Отмена»; «Отвязать» under the item. */
.tg-glyph { width: 18px; height: 18px; flex: 0 0 auto; fill: currentColor; stroke: none; }
.acc-tg-wait { display: flex; align-items: center; gap: 2px 10px; min-height: 48px; padding: 3px 4px 3px 16px; border: 1px dashed rgb(var(--ink-rgb) / .22); border-radius: var(--r);
  color: var(--mute); font-size: 14px; font-weight: 650; line-height: 1.3; }
.acc-tg-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px rgb(var(--acc-rgb) / .5); animation: acc-tg-wait 1.1s ease-in-out infinite alternate; }
.acc-tg-wait-text { flex: 1 1 auto; min-width: 0; }
.acc-tg-wait .text-btn { flex: 0 0 auto; min-height: 38px; padding: 0 10px; font-size: 14px; }
.acc-tg-off { justify-self: start; padding-inline: 0; }
@keyframes acc-tg-wait { from { opacity: 1; } to { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .acc-tg-dot { animation: none; } }
.acc-form { display: grid; gap: 8px; }
.label { color: var(--mute); font-size: 12.5px; font-weight: 700; }
.code-field { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.acc-pays-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.acc-pays-note { color: var(--mute); font-size: 12.5px; }
.kit-payments { display: grid; gap: 8px; }
.kit-payment { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-radius: 20px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.kit-payment::before { content: ""; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--silver); }
.kit-payment.is-pending::before { background: var(--amber); box-shadow: 0 0 0 4px rgb(240 160 32 / .2); animation: blink 1.6s steps(1) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.kit-payment.is-paid::before { background: var(--acc); }
.kit-payment.is-declined::before { background: var(--red); }
/* The payments side by side with their state: the sum and its line take what is left. */
.kit-payment-main { display: grid; flex: 1 1 0; gap: 2px; min-width: 0; }
.kit-payment-sum { font-weight: 800; font-variant-numeric: tabular-nums; }
.kit-payment-meta { color: var(--mute); font-size: 12.5px; }
.kit-payment-state { padding: 3px 10px; border-radius: var(--r); background: var(--tint); color: var(--ink-2); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.kit-payment.is-pending .kit-payment-state { background: var(--amber-soft); color: var(--amber-deep); }
.kit-payment.is-paid .kit-payment-state { background: var(--acc-soft); color: var(--acc); }
.kit-payment.is-declined .kit-payment-state { background: var(--red-soft); color: var(--red-deep); }
.kit-payment-pay { display: inline-flex; flex: 1 0 100%; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--r); background: var(--acc); color: var(--white); font-weight: 800; text-decoration: none; }
.kit-payments-empty { margin: 0; color: var(--mute); font-size: 14px; }
/* Help, language and the documents: rows of one white card. */
.menu { display: grid; margin: 22px 0 0; padding: 4px 16px; list-style: none; border-radius: var(--tile); background: var(--white); box-shadow: var(--rim); }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  color: var(--ink); font-size: 15px; font-weight: 700; text-align: left; text-decoration: none; }
.menu li:last-child .menu-row { border-bottom: 0; }
.menu-chev { color: var(--silver); }
.menu-go { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: 14px; }

/* «На главный экран» */
.inst-head { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 14px; }
.inst-icon { width: 60px; height: 60px; border-radius: 18px; box-shadow: 0 0 0 1px var(--line), 0 10px 22px -10px rgb(60 50 30 / .55); }
.inst-text { display: grid; gap: 4px; min-width: 0; }
.inst-title { margin: 2px 0 0; font: 800 20px/1.15 var(--display); letter-spacing: -.03em; }
.inst-lead { margin: 0; color: var(--mute); font-size: 14px; line-height: 1.4; }
.inst-lead strong { color: var(--ink); }
.inst-way { margin-top: 18px; }
.inst-way .go { width: 100%; }
.inst-steps { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; }
.inst-steps li { position: relative; min-height: 34px; padding: 6px 0 0 46px; font-size: 15px; line-height: 1.4; counter-increment: step; }
.inst-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--acc-soft); color: var(--acc);
  font: 700 14px/1 var(--display); }
.inst-key { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 0 2px; border-radius: 9px; background: var(--tint); vertical-align: -8px; }
.inst-key svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.inst-later { display: block; margin: 14px auto 0; }

/* Notes and the foot */
.notes { margin-top: 44px; }
.faq { display: grid; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 10px 0; font-size: 15.5px; font-weight: 800; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px; background: var(--acc); -webkit-mask: var(--plus) center / 14px no-repeat; mask: var(--plus) center / 14px no-repeat; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 14px; color: var(--mute); font-size: 14.5px; line-height: 1.6; }
.notes-text { max-width: 44em; margin: 18px 0 0; color: var(--mute); font-size: 14px; line-height: 1.6; }
.foot { max-width: 1240px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
/* The documents' links a finger high (their own padding: on a phone they stack, and boxes over them would overlap). A thin
   hairline over them. */
.foot-line { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; margin: 0; padding-top: 10px; color: var(--mute); font-size: 12.5px; }
.foot-line::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line-2); }
.foot-line a { display: inline-block; padding: 11px 0; color: var(--mute); text-underline-offset: 3px; }
body:has(.foot) .main { padding-bottom: 28px; }

/* With the dock (a phone, a tablet) the footer is compact (2026-11-30, the owner: a lot of empty space under it): the
   documents in a row that wraps – boxes 32 px high, 14 px apart, no gap between the rows – and under them only the dock
   (66 px) and 10 px. */
@media (max-width: 1099px) {
  .foot { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .foot-line { gap: 0 14px; }
  .foot-line a { display: inline-flex; align-items: center; min-height: 32px; padding: 0; }
}
/* A phone: the name and the year on one line, the documents and the rest on the next – never one of them alone after
   the year («Privacy Policy» under «… 18+ Terms of Service»). */
@media (max-width: 639px) {
  .foot-line::after { content: ""; flex-basis: 100%; order: 1; }
  .foot-line a { order: 2; }
}

/* The narrowest phones (320 px): the dock's words whole, the card's head tighter, the free try's line kept for a reader. */
@media (max-width: 359px) {
  .top { gap: 6px; padding: 0 12px; }
  .brand { gap: 8px; }
  .brand-mark, .brand-logo { width: 34px; height: 34px; }
  .brand-name { font-size: 15px; }
  .aud button { width: 30px; }
  .wallet { padding: 0 10px 0 8px; font-size: 14px; }
  .studio-foot > .studio-head { top: calc(var(--pad) + 8px); left: calc(var(--pad) + 8px); right: calc(var(--pad) + 8px); gap: 5px; }
  /* The card's name whole («Your own scenario»): smaller, and on two even lines if it still does not fit – never cut. */
  .studio-title { padding: 6px 8px; font-size: 11px; white-space: normal; text-wrap: balance; }
  .studio .toggle button { padding: 0 9px; font-size: 12px; }
  .ask { padding-left: 12px; gap: 8px; }
  .ask-text { font-size: 13.5px; }
  .dock { grid-template-columns: repeat(2, minmax(0, 1fr)) 64px repeat(2, minmax(0, 1fr)); padding: 0 2px env(safe-area-inset-bottom); }
  .dock-tab { font-size: 9.5px; letter-spacing: -.01em; }
  .dock-rec-ring { width: 48px; height: 48px; border-radius: 15px; }
  /* The free try: its line for a screen reader only, «Попробовать» on one line beside the name. */
  .offer { gap: 10px; padding-left: 12px; }
  .offer-text small { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .offer-text strong { font-size: 14px; letter-spacing: -.01em; }
  .offer-go { padding: 0 12px; font-size: 13.5px; }
  .take-title { font-size: 13px; }
  /* A card is 139 px wide here: its name gets the whole line, its price under it. */
  .card-title { font-size: 13px; }
  /* The foot bar's key on one line in 320 px. */
  .run-bar .run-go { padding: 0 14px; }
  /* The pay bar's sum line goes on two even lines, not «К оплате ≈ …»: the price in roubles is what it is there for; the
     key narrower to leave it room. */
  .bar-sub { white-space: normal; text-wrap: balance; line-height: 1.25; }
  .bar-sub [data-kit-text="payAmount"] { white-space: nowrap; }
  .pay-go { min-width: 0; padding: 0 16px; }
  .free-bar-title { font-size: 14px; }
  /* «1 фото бесплатно» on two even lines at most: «без регистрации» stays for a screen reader only. */
  .free-bar .run-sum small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .free-bar .free-go { padding: 0 14px; }
  .sheet-title { font-size: 21px; }
  .purse-n { font-size: 40px; }
}
/* Up to 400 px the bar at the foot: the price and the marks beside the key stay whole; the key keeps its words on one line
   («Оживить · 60», never «60» alone under it). */
@media (max-width: 399px) {
  .run-bar { gap: 10px; padding-left: 14px; padding-right: 14px; }
  .run-sum { min-width: 96px; }
  .run-go { flex: 0 0 auto; min-width: 0; gap: 8px; padding: 0 16px; font-size: 15px; }
  .run-marks span { white-space: normal; overflow-wrap: anywhere; }
}
/* A tablet: wider strips, three columns of cards. */
@media (min-width: 640px) {
  .main { padding-left: 24px; padding-right: 24px; }
  .top { padding: 0 24px; }
  .hero-title { font-size: 40px; -webkit-line-clamp: 3; }
  .studio { --pad: 10px; height: clamp(480px, 66vw, 600px); }
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .takes-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .cat-subs, .pills, .reels, .variants { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
  :is(.pills, .cat-subs) { scroll-padding-inline: 24px; }
  .kind { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 28px; }
  .kind-title { font-size: 32px; }
  .reels { grid-auto-columns: minmax(150px, 26%); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .foot { padding-left: 24px; padding-right: 24px; }
  .sheet { border-radius: var(--frame); margin-bottom: auto; }
  .sheet-full, .sheet-free, .sheet-compose { border-radius: 0; }
}
@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* A computer: the menu as plain words beside the brand, the current one underlined in green, «Создать» the green key, no
   dock. The home page in two columns, ~1200 px wide: on the left the site's own title big, its line, the free try and the
   four ways two by two; on the right «Свой сценарий» as a tall white card from the top to the foot of the left column.
   Then the characters, «Примеры» five columns wide, the notes. A scenario's page with its picture staying in sight. */
@media (min-width: 1100px) {
  :root { --top: 72px; }
  .top { padding: 0 max(24px, calc((100% - 1240px) / 2 + 24px)); gap: 10px; }
  .brand { margin-right: 22px; }
  .brand-mark, .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
  .brand-mark { font-size: 18px; }
  .brand-name { font-size: 18px; }
  .top-nav { display: flex; align-items: center; gap: 2px; margin-right: auto; }
  .top-nav a, .top-nav button { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 600;
    text-decoration: none; white-space: nowrap; }
  .top-nav [aria-current="page"] { color: var(--acc); font-weight: 700; }
  .top-nav [aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 2px; border-radius: 1px; background: var(--acc); }
  .top-make { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: 4px; padding: 0 18px 0 15px; border: 0; border-radius: 12px; background: var(--acc); color: var(--white);
    font-size: 14.5px; font-weight: 700; transition: transform .15s, background-color .15s; }
  .top-make:active { transform: scale(.98); }
  .aud button { width: 36px; height: 34px; }
  .wallet { height: 40px; }
  .dock { display: none; }
  .main { padding-top: 26px; padding-bottom: 56px; }
  body.is-detail .main { padding-bottom: 56px; }
  .foot { padding-bottom: 32px; }
  .home { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); grid-template-rows: minmax(0, 1fr) auto auto minmax(0, 1fr); gap: 0 56px; align-items: start;
    grid-template-areas: ". studio" "hero studio" "offer studio" ". studio" "takes takes" "avs avs" "catalog catalog" "notes notes"; }
  .home:not(:has(> .studio)) { grid-template-areas: "hero hero" "offer offer" "takes takes" "avs avs" "catalog catalog" "notes notes"; grid-template-rows: none; }
  .home > .hero { grid-area: hero; padding: 0; }
  .hero-title { margin: 0 0 14px; font-size: clamp(42px, 3.9vw, 54px); line-height: 1.04; letter-spacing: -.04em; -webkit-line-clamp: 4; }
  .hero-lead { font-size: 17px; line-height: 1.5; -webkit-line-clamp: 4; }
  .home > .offer { grid-area: offer; min-height: 72px; margin-top: 30px; padding: 12px 12px 12px 20px; border-radius: 18px; }
  .offer-text strong { font-size: 17px; }
  .offer-text small { font-size: 13.5px; }
  .offer-go { min-height: 48px; padding: 0 22px; font-size: 15px; }
  .home > .studio { --pad: 10px; --ask: 62px; grid-area: studio; align-self: stretch; height: clamp(540px, calc(100vh - var(--top) - 60px), 660px); margin: 0; }
  .studio-bg, .studio .out { border-radius: 16px; }
  .studio-foot > .studio-head { top: calc(var(--pad) + 14px); left: calc(var(--pad) + 14px); right: calc(var(--pad) + 14px); }
  .studio-title { padding: 9px 14px; border-radius: 11px; font-size: 14px; }
  .studio .toggle button { min-height: 34px; padding: 0 15px; font-size: 13.5px; }
  .ask { padding: 0 7px 0 18px; border-radius: 15px; }
  .ask-text { font-size: 15.5px; }
  .ask-price { font-size: 16px; }
  .ask .rec-btn { width: 48px; height: 48px; }
  html:is([data-site-step="processing"], [data-site-step="preview"], [data-site-step="result"]):not([data-site-mode="effect"]) .home > .studio { height: auto; }
  .home > .takes { grid-area: takes; margin: 56px 0 0; }
  .takes .row-title { font-size: 26px; }
  .takes-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .take { gap: 10px; padding: 8px 8px 14px; }
  .take-text { padding: 0 8px; }
  .take-title { font-size: 15.5px; }
  .take .cost { font-size: 13px; }
  .home > .catalog { grid-area: catalog; margin-top: 64px; }
  .home > .notes { grid-area: notes; }
  .home.is-kind { grid-template-rows: none; grid-template-areas: "catalog catalog" "notes notes"; }
  .catalog-title { font-size: 30px; }
  .cards { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 14px; }
  .cat-bar { top: calc(var(--top) + 8px); width: fit-content; max-width: 100%; margin: 0; }
  .catalog.is-searching .cat-bar { width: min(620px, 100%); }
  .item { grid-template-columns: auto minmax(0, 1fr); gap: 0 52px; align-items: start; }
  .item > .shot { position: sticky; top: calc(var(--top) + 24px); width: auto; height: min(calc(100vh - var(--top) - 60px), 720px); max-height: none; aspect-ratio: 4 / 5; margin: 22px 0 8px; }
  .item-body { padding-top: 30px; }
  .item-title { font-size: 40px; }
  .item .run-bar { position: sticky; bottom: 18px; margin: 10px 0 4px; padding: 12px 14px 12px 22px; border-radius: var(--frame); box-shadow: var(--rim), var(--shadow-lg); }
  .page-title { font-size: 44px; }
  .reels { grid-auto-columns: minmax(160px, 16%); }
  .variants { grid-auto-columns: 120px; margin: 0; padding: 4px 2px; }
  .gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .sheet { --tall: min(88vh, 820px); --side: 440px; --wide: min(calc(var(--tall) * 3 / 4 + var(--side)), calc(100% - 48px)); margin: auto; border-radius: var(--frame); box-shadow: 0 30px 80px -30px rgb(30 25 15 / .45); }
  .sheet-full { height: fit-content; max-height: min(92vh, 900px); padding-bottom: 24px; border-radius: var(--frame); }
  .sheet-full .sheet-top { padding-top: 18px; }
  .topup-bar { bottom: -24px; margin-bottom: -24px; padding-bottom: 14px; }
  .sheet-free, .sheet-compose, #create { width: var(--wide); max-width: none; height: var(--tall); max-height: none; border-radius: var(--frame); }
  .sheet-free[open], .sheet-compose[open] { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); grid-template-rows: minmax(0, 1fr) auto; }
  .sheet-compose[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
  #popular, #history { width: var(--wide); max-width: none; }
  #account, #checkout { max-width: 620px; }
  /* The example on the left, rounded inside the card. */
  .free-shot, .cmp-shot { grid-column: 1; grid-row: 1 / -1; height: auto; min-height: 0; margin: 12px 0 12px 12px; border-radius: 16px; background: var(--tint); }
  .cmp-shot { position: relative; display: block; overflow: hidden; }
  .cmp-shot-mode, .cmp-shot-mode > img, .cmp-shot-mode > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
  .cmp-shot-mode > .before-chip { position: absolute; inset: auto auto 20px 20px; width: 23%; height: auto; }
  .free-media, .free-media > * { border-radius: 16px; }
  .free-shot .out-pic { object-position: 50% 50%; }
  .sheet-free .out::after { display: none; }
  .free-body, .sheet-free .run-bar, .cmp-top, .cmp-body, .sheet-compose .run-bar { grid-column: 2; }
  .free-body { gap: 9px; padding: 30px 28px 16px; align-content: safe center; }
  .free-close { top: 18px; right: 18px; background: var(--white); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .free-title { padding-right: 52px; font-size: 28px; }
  .sheet-free .run-bar, .sheet-compose .run-bar { padding: 14px 28px 18px; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 1px 0 var(--line); }
  .before-chip { left: 20px; bottom: 20px; max-width: 132px; }
  .cmp-top { padding: 24px 20px 10px 28px; }
  .cmp-body { padding: 10px 24px 20px 28px; }
  .sheet-compose .cmp-lead { max-width: 30em; }
  #create .create-panel { flex: 1 1 auto; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  #create .shots { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); min-height: 0; }
  #create .shotrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, 1fr) auto; align-items: end; gap: 12px; height: 100%; padding: 8px 14px 14px 8px; }
  #create .shotrow-media { grid-column: 1 / -1; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 13px; }
  #create .shotrow-text { padding-left: 6px; }
  #create .shotrow-title { font-size: 19px; }
}
@media (min-width: 1000px) and (max-height: 820px) {
  .sheet-compose .field-box textarea { min-height: 88px; }
  .sheet-compose .cmp-lead { display: none; }
}
@media (min-width: 1800px) {
  .main, .foot { max-width: 1440px; }
  .top { padding: 0 max(24px, calc((100% - 1440px) / 2 + 24px)); }
  .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
/* A mouse: a key goes a shade deeper; a card lifts a little, its shadow grows. */
@media (hover: hover) {
  .go:hover, .top-make:hover, .offer:hover .offer-go, .kit-payment-pay:hover { background-color: var(--acc-deep); }
  .ghost:hover, .close:hover, .cat-round:hover, .bar-back:hover { box-shadow: inset 0 0 0 1px var(--silver); }
  .idea-btn:hover, .promo-go:hover { background: #d4e7dd; }
  .rec-btn:hover { transform: scale(1.05); }
  .card:hover { transform: translateY(-3px); box-shadow: var(--rim), var(--shadow-lg); }
  .card:hover .card-media > img, .card:hover .card-media > video { transform: scale(1.03); }
  .take:hover { transform: translateY(-2px); box-shadow: var(--rim), var(--shadow-lg); }
  .cat-kinds button:hover, .top-nav a:hover, .top-nav button:hover { color: var(--ink); background: rgb(var(--ink-rgb) / .05); }
  .cat-kinds button[aria-pressed="true"]:hover { color: var(--white); background: var(--ink); }
  .cat-subs button:hover:not([aria-pressed="true"]), .chips button:hover:not([aria-pressed="true"]), .pill:hover:not([aria-current="page"]) { box-shadow: inset 0 0 0 1px var(--silver); }
  .shotrow:hover, .way:hover:not([aria-pressed="true"]), .coin:hover:not([aria-pressed="true"]), .pack:hover:not([aria-pressed="true"]), .opts button:hover:not([aria-pressed="true"]) {
    box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .5), var(--shadow); }
  .kit-chip:hover input:not(:checked) + span { box-shadow: inset 0 0 0 1px rgb(var(--acc-rgb) / .5); }
  .drop:hover { border-color: var(--acc); }
  .menu-row:hover { color: var(--acc); }
  .reel:hover .reel-media, .variant:hover .variant-media { transform: translateY(-2px); }
  .reel-media, .variant-media { transition: transform .2s; }
}
/* A phone: the page under an open card holds still (a mouse keeps its scrollbar: app.js keeps the wheel in the card). */
@media (pointer: coarse) { html:has(dialog[open]) { overflow: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .out-line::before, .kit-payment.is-pending::before { animation: none; }
  .sheet[open], .kind:not([hidden]), .create-panel, .field-box.is-asking, .consents.is-asking .consent { animation: none; }
  .card, .take, .offer, .go, .rec-btn, .dock-rec-ring, .top-make, .reel-media, .variant-media, .card-media > img, .card-media > video { transition: none; }
}

/* «Помощь» (partials/support.html): the visitor's requests to support, drawn by the kit as a messenger (web/sites/support.js, support.css, kit-chat-*) in the colours named here.
   The mark of an answer not read yet is a pink dot with a white edge. */
[data-kit="support"] { --kit-chat-bg: var(--paper); --kit-chat-surface: var(--white); --kit-chat-surface-2: var(--tint); --kit-chat-line: var(--line-2);
  --kit-chat-text: var(--ink); --kit-chat-muted: var(--mute); --kit-chat-accent: var(--acc); --kit-chat-on-accent: var(--white); --kit-chat-theirs: var(--white);
  --kit-chat-online: var(--acc); --kit-chat-warn: var(--amber-deep); --kit-chat-danger: var(--red-deep); }
.help-dot { position: absolute; top: 2px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--white); }
.help-dot[hidden] { display: none; }
.wallet .help-dot { top: -2px; right: -2px; }
.help-badge { padding: 3px 9px; border-radius: var(--r); background: var(--red-soft); color: var(--red-deep); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.help-badge[hidden] { display: none; }
.menu-row .menu-go { display: inline-flex; align-items: center; gap: 8px; }
.help-banner { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; padding: 14px 16px; border: 0; border-radius: var(--tile); background: var(--red-soft);
  box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / .3); color: var(--ink); font: 700 14.5px/1.35 var(--sans); text-align: left; }
.help-banner[hidden] { display: none; }
.help-banner b { margin-left: auto; color: var(--red-deep); white-space: nowrap; }
.help-banner-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.pay-help { display: block; width: 100%; min-height: 44px; margin-top: 10px; padding: 10px 18px; border: 0; border-radius: var(--r); background: var(--white); color: var(--ink); font: 700 14px/1.3 var(--sans); box-shadow: inset 0 0 0 1px var(--line-2); }
.help-other { margin: 18px 4px 0; color: var(--mute); font-size: 13.5px; }
.faq-more { margin: 20px 0 0; color: var(--mute); font-size: 14px; }
.faq-ask { padding: 0; border: 0; background: none; color: var(--acc); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.help-other a { color: var(--acc); }
/* A computer: «Помощь» as tall as a chat. */
@media (min-width: 760px) { #support.sheet-full { min-height: min(70vh, 640px); } }

/* A scenario's card on a phone or a tablet (2026-10-30, the owner's wish), and «Бесплатная проба» as it (2026-11-01): its
   example stays where it is and the name, the choices and the photo are one paper sheet over it; the bar with the price
   and the button stays at the bottom, the close button where it was. Folded, nothing covers the example, so a result's own
   controls keep working. A computer keeps the example whole on the left. */
@media (max-width: 999px) {
  /* Two places for the sheet (the owner's word): folded as it opens, or unfolded just as far as its end shows above the
     bar, never higher than 56 px under the top. assets/sheet.js moves it – under the finger, then on to its place in one
     move: the room it goes up into is laid out above it (--sheet-room) and it is pushed down from there (a transform).
     The card itself never scrolls (clip: not even to show a field) – the browser's scrolling, snapped or settled after,
     went, stopped and went on. Text longer than the unfolded sheet scrolls inside it. */
  .sheet-free[open] { overflow: hidden; overflow: clip; }
  .sheet-free .free-shot { position: relative; z-index: 0; }
  .sheet-free .free-body { position: relative; z-index: 1; margin-top: calc(-24px - var(--sheet-room, 0px)); padding-top: 20px; border-radius: var(--frame) var(--frame) 0 0; background: var(--paper);
    box-shadow: 0 -14px 34px -22px rgb(30 25 15 / .45); will-change: transform; }
  /* The handle at the sheet's top, as a sheet from the bottom has. */
  .sheet-free .free-body::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgb(var(--ink-rgb) / .14); }
  .sheet-free .run-bar { position: relative; z-index: 2; }
  /* «До» above the sheet's edge (it comes 24 px over the example), not under it. */
  .sheet-free .before-chip { bottom: 44px; }
}

/* A main screen on a phone or a tablet – «Популярное», «Создать», «История», «Профиль», the profile's «Помощь» and
   «Вопросы и ответы» (2026-11-02): app.js moves the dock into the open one. The dock stays where it was, so the screen's
   content comes up instead of the whole screen, and ends above the dock. A scenario's page has no dock of its own; its
   screens do. From 1000 px a screen is a card in the middle: no dock in it. A filter (the white blur) makes the screen
   the box a fixed dock is placed in, like a transform does: the dock then rides up with the content and ends off screen.
   So no blur and no animation on the screen itself; it is near opaque anyway. */
@media (max-width: 999px) {
  .sheet-full:has(> .dock) { padding-bottom: calc(112px + env(safe-area-inset-bottom)); animation: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .is-detail .sheet-full > .dock { display: grid; }
  /* From 541 px a screen is a 540 px column in the middle: the dock no wider. */
  .sheet-full > .dock { max-width: 516px; margin: 0 auto; }
}
@media (max-width: 999px) and (prefers-reduced-motion: no-preference) {
  .sheet-full:has(> .dock) > :not(.dock) { animation: rise .34s cubic-bezier(.3, .7, .2, 1); }
}
@media (min-width: 1000px) { .sheet-full > .dock { display: none; } }

/* «Очистить историю» under «История», «Удалить аккаунт» last in the profile (web/sites/kit-cleanup.js); the kit's question
   window in the site's own colours (web/sites/kit-confirm.css). */
:root { --kit-confirm-bg: #fff; --kit-confirm-text: var(--ink); --kit-confirm-muted: var(--mute); --kit-confirm-line: var(--line-2); --kit-confirm-danger: var(--red-deep); --kit-confirm-on-danger: var(--white);
  --kit-confirm-radius: var(--frame); --kit-accent: var(--acc); --kit-on-accent: var(--white); }
.history-clear { display: block; min-height: 44px; margin: 12px 0 0; padding: 8px 0; border: 0; background: none; color: var(--mute); font: inherit; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.menu-row.menu-danger { color: var(--red-deep); }

/* «ИИ-аватары» on the home page (pages/home.html .avs, 2026-11-22): a head – the title, «N онлайн», «Все ›» –
   over a strip of the site's first characters, a tall frame each with its live clip (or the cover), «онлайн», the name and
   age and the short line. A phone swipes the strip (the next frame peeks out), from 900 px the four stand side by side; a
   computer has the block across the page's whole width under the first screen. The design's own radius, type and colours
   come in through --avs-* (below). «Популярно» on «Оживить фото» is a small orange star that softly shimmers – a light
   running over it, never a blink (2026-11-22: the word took a lot of the card). Here the frames have a hairgreen line. */
:root { --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.6c.4 0 .7.2.9.6l2.3 4.7 5.2.8c.8.1 1.1 1.1.5 1.7l-3.7 3.6.9 5.1c.1.8-.7 1.4-1.4 1L12 17.7l-4.6 2.4c-.7.4-1.5-.2-1.4-1l.9-5.1-3.7-3.6c-.6-.6-.3-1.6.5-1.7l5.2-.8 2.3-4.7c.2-.4.5-.6.9-.6Z'/%3E%3C/svg%3E"); }
.take-tag.take-star { display: grid; place-items: center; width: 24px; height: 24px; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 8px;
  background: var(--star-bg, rgb(16 13 11 / .58)); box-shadow: 0 0 0 1.5px rgb(var(--white-rgb) / .9), 0 0 12px rgb(255 122 26 / .38); font-size: 0; line-height: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.take-tag.take-star::before { content: ""; width: 15px; height: 15px; background: linear-gradient(110deg, #ff6a00 15%, #ffa63d 38%, #ffe2ae 50%, #ffa63d 62%, #ff6a00 85%) 0 50% / 300% 100%;
  -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat; animation: star-sheen 3.2s ease-in-out infinite alternate; }
@keyframes star-sheen { to { background-position: 100% 50%; } }
.avs { margin-top: 30px; }
.home.is-kind > .avs { display: none !important; }
.avs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 12px; }
.avs-head .row-title { margin: 0; }
.avs-live { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--r); background: rgb(46 204 113 / .14); color: var(--avs-live, #3ddc84);
  font: 750 12px/1 var(--sans); white-space: nowrap; }
.avs-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgb(61 220 132 / .24); }
.avs-all { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; margin-left: auto; padding: 0 2px 0 8px; color: inherit; font: 750 14px/1 var(--sans); text-decoration: none;
  white-space: nowrap; }
.avs-all svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.avs-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(142px, 42%); gap: 10px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 0 16px; scrollbar-width: none; overscroll-behavior-x: contain; }
.avs-row::-webkit-scrollbar { display: none; }
.avs-card { position: relative; isolation: isolate; display: block; min-width: 0; aspect-ratio: 3 / 4.2; overflow: hidden; border-radius: var(--avs-r, 16px); background: var(--avs-bg, #1a1a1f);
  color: #fff; text-decoration: none; scroll-snap-align: start; }
.avs-media, .avs-media > img, .avs-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.avs-card::after { content: ""; position: absolute; inset: 42% 0 0; z-index: 1; background: linear-gradient(transparent, rgb(8 6 12 / .88)); pointer-events: none; }
.avs-text { position: absolute; left: 12px; right: 10px; bottom: 12px; z-index: 2; display: grid; gap: 3px; }
.avs-status { display: inline-flex; align-items: center; gap: 6px; color: #9af5c4; font: 750 11.5px/1.2 var(--sans); }
.avs-status .avs-dot { width: 6px; height: 6px; box-shadow: 0 0 0 2px rgb(61 220 132 / .3); }
.avs-name { font: var(--avs-name, 700 16px/1.15 var(--display)); font-style: var(--avs-name-style, normal); letter-spacing: var(--avs-name-ls, -.01em); text-transform: var(--avs-name-case, none);
  overflow-wrap: anywhere; }
.avs-line { display: -webkit-box; overflow: hidden; color: rgb(255 255 255 / .8); font: 500 12px/1.3 var(--sans); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (min-width: 640px) { .avs-row { grid-auto-columns: minmax(170px, 30%); margin: 0 -24px; padding: 0 24px 4px; scroll-padding: 0 24px; } }
@media (min-width: 900px) {
  .avs-row { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; overflow: visible; }
  .avs-card { aspect-ratio: 4 / 5; }
  .avs-text { left: 16px; right: 14px; bottom: 16px; }
  .avs-name { font-size: calc(var(--avs-name-size, 16px) + 3px); }
}
@media (hover: hover) {
  .avs-media > img, .avs-media > video { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
  .avs-card:hover .avs-media > img, .avs-card:hover .avs-media > video { transform: scale(1.04); }
  .avs-all:hover { text-decoration: underline; text-underline-offset: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .take-tag.take-star::before { animation: none; background-position: 50% 50%; }
  .avs-media > img, .avs-media > video { transition: none; }
}
/* «Простая»'s own: the star on a white chip, the frames rounded as the tiles are, the names in Onest, «онлайн» in the
   accent green that reads on paper. */
:root { --star-bg: rgb(255 255 255 / .92); }
.avs { --avs-r: var(--tile); --avs-bg: var(--tint); --avs-name: 700 16px/1.15 var(--display); --avs-name-size: 16px; --avs-name-ls: -.02em; --avs-live: var(--acc); }
.avs-live { background: var(--acc-soft); }
.avs-card { box-shadow: var(--shadow); }
@media (min-width: 1100px) {
  .home:not(.is-kind):has(> .avs) { grid-template-areas: ". studio" "hero studio" "offer studio" ". studio" "takes takes" "avs avs" "catalog catalog" "notes notes"; }
  .home > .avs { grid-area: avs; margin: 60px 0 0; }
}
/* (end of «ИИ-аватары» and the star) */

/* The top bar on a computer: a word of the menu never breaks in two, and the site's name keeps its room (2026-11-26:
   at 1100 px, with «ИИ-аватары» and «Партнёрам» in it, the menu took the name down to «S…» and broke «ИИ-аватары» over
   two lines; up to 1536 px it still cut the name). Until a big screen's wider bar (1800 px) the menu's words stand
   closer; up to 1279 px «Популярное» leaves it where «ИИ-аватары» are, as on a phone's dock – «Примеры» on the home page
   are the most run first. */
@media (min-width: 1100px) {
  .top-nav a, .top-nav button { white-space: nowrap; }
}
@media (min-width: 1100px) and (max-width: 1799px) {
  .top-nav { gap: 0; }
  .top-nav a, .top-nav button { padding-left: 8px; padding-right: 8px; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
  .top-nav:has(> a[href$="/avatars"]) > [data-kit-open="popular"] { display: none; }
}

/* The promo code's row in «Пополнить баланс» (2026-11-26): the field's own width (twenty letters) made the row wider than
   the sheet on a phone – at 375 px the sheet slid sideways by up to 25 px. The field takes the room the button leaves. */
.promo-row { min-width: 0; }
.promo-input { width: 100%; }

/* A scenario's picture on a tablet (2026-11-26): when the screen's height caps it (70 % of it, 4 : 5), it stands in the
   middle – it stood at the left with an empty band on the right, 163 px at 768 × 1024 and 567 px at 1024 × 768. */
@media (max-width: 1099px) {
  .item > .shot { margin-left: max(0px, calc((100% - 70vh * .8) / 2)); margin-right: max(0px, calc((100% - 70vh * .8) / 2));
    margin-left: max(0px, calc((100% - 70svh * .8) / 2)); margin-right: max(0px, calc((100% - 70svh * .8) / 2)); }
}
