/* VOICE   продуктовый сайт и рабочий инструмент для продавцов WB и Ozon: деловито, тепло, без шума
   IDEA    фотостудия: бумажный фон, видоискатель с уголками кадра и красная лампа REC; из кадра выходят слайды 3:4
   PICTURE фото товара превращается в веер настоящих слайдов, нарисованных движком приложения
   COLOUR  белый фон, чернила #151515, красный REC #FF4A2B — одно большое поле (первый экран) и главные кнопки, графит для тёмных полос
   TYPE    Unbounded 800 — заголовки и логотип, Onest — текст и элементы управления
   LAYOUT  ноутбук: заголовок с кнопками сверху, картинка во всю ширину под ним; инструмент — слайды слева, шаги справа.
           телефон: заголовок, картинка, кнопки; инструмент — слайды сверху, шаги ниже, нижняя панель вкладок */

:root {
  --bg: #FFFFFF; --ink: #151515; --muted: #5C5B57; --line: #E3E2DE; --panel: #F4F3F0; --panel2: #EAE9E5;
  --red: #FF4A2B; --btn: #D6341A; --btn-ink: #FFFFFF; --ok: #17844B; --warn: #A15C00;
  --hero: #FF4A2B; --hero-ink: #151515; --graph: #1B1B1B; --graph-ink: #F3F2EF; --graph-muted: #B9B8B2;
  --studio: #ECEBE7; --focus: #2D6BFF; --head: rgba(255,255,255,0.9);
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #111111; --ink: #F1F0EC; --muted: #A4A39D; --line: #2B2B29; --panel: #1A1A19; --panel2: #242423;
    --btn: #E2442A; --ok: #49C27F; --warn: #E8A23A; --hero: #C7361C; --hero-ink: #FFFFFF; --graph: #0A0A0A;
    --studio: #1C1C1B; --head: rgba(17,17,17,0.88); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme=dark] {
  --bg: #111111; --ink: #F1F0EC; --muted: #A4A39D; --line: #2B2B29; --panel: #1A1A19; --panel2: #242423;
  --btn: #E2442A; --ok: #49C27F; --warn: #E8A23A; --hero: #C7361C; --hero-ink: #FFFFFF; --graph: #0A0A0A;
  --studio: #1C1C1B; --head: rgba(17,17,17,0.88); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 28px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow-x: clip; -webkit-tap-highlight-color: transparent; }
img, canvas { max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2 { font-family: Unbounded, Onest, system-ui, sans-serif; font-weight: 800; letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: 19px; line-height: 1.25; margin: 0 0 6px; }
p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.band { padding-block: clamp(36px, 5vw, 76px); padding-left: max(5vw, 16px, env(safe-area-inset-left, 0px)); padding-right: max(5vw, 16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1240px; margin: 0 auto; }
.wrap.narrow { max-width: 860px; }
.sub { color: var(--muted); font-size: 17px; max-width: 62ch; margin: 12px 0 28px; }
.sub.small { font-size: 15px; margin: 0; }
.mt { margin-top: 36px; }
.tint { background: var(--panel); }
.dark { background: var(--graph); color: var(--graph-ink); }
.dark .sub { color: var(--graph-muted); }
.scroll { overflow-x: auto; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 600 16px/1.2 Onest, system-ui, sans-serif; text-decoration: none; cursor: pointer; transition: transform .12s ease, background-color .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-red { background: var(--btn); border-color: var(--btn); color: var(--btn-ink); }
.btn-red:hover { background: #B92B12; border-color: #B92B12; }
.btn-ink { background: #151515; border-color: #151515; color: #FFFFFF; }
.btn-ink:hover { background: #000; border-color: #000; }
.btn-line { background: transparent; border-color: currentColor; color: inherit; }
.btn-lg { min-height: 54px; padding: 14px 24px; font-size: 17px; border-radius: 14px; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 15px; border-radius: 10px; }
.btn.wide { width: 100%; margin-top: 18px; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--panel); color: var(--ink); cursor: pointer; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--bg); background: var(--head); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 800 18px/1 Unbounded, Onest, sans-serif; letter-spacing: -0.02em; text-decoration: none; color: inherit; white-space: nowrap; }
.logo i { width: 13px; height: 13px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255,74,43,.22); }
.site-nav, .app-nav { display: none; gap: 4px; }
.site-nav a, .app-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--muted); white-space: nowrap; }
.site-nav a:hover, .app-nav a:hover, .app-nav a.on { color: var(--ink); background: var(--panel); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance { display: none; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 999px; background: var(--panel); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.balance::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 8px; }
.top-cta { min-height: 40px; padding: 8px 14px; font-size: 15px; }
@media (min-width: 980px) { body[data-view=home] .site-nav { display: flex; } }
@media (min-width: 861px) { body:not([data-view=home]) .app-nav { display: flex; } }
body:not([data-view=home]) .balance { display: inline-flex; }
body:not([data-view=home]) .top-cta { display: none; }
@media (max-width: 420px) { body[data-view=home] .top-cta { padding: 8px 12px; font-size: 14px; } }

/* ---------- первый экран ---------- */
.hero { background: var(--hero); color: var(--hero-ink); }
.hero-in { max-width: 1240px; margin: 0 auto; display: grid; gap: 22px 48px; grid-template-areas: "t" "p" "c"; }
@media (min-width: 900px) { .hero-in { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-areas: "t c" "p p"; align-items: end; } }
.hero-t { grid-area: t; }
.hero h1 { font-size: clamp(34px, 5vw, 58px); max-width: 15ch; }
.hero .lead { font-size: clamp(17px, 1.5vw, 19px); max-width: 58ch; margin-top: 16px; }
.kicker { display: inline-block; margin: 0 0 20px; padding: 8px 16px; border-radius: 999px; background: var(--hero-ink); color: var(--hero); font: 700 15px/1.3 Unbounded, Onest, sans-serif; letter-spacing: -0.01em; }
@media (max-width: 420px) { .kicker { font-size: 13px; padding: 7px 12px; margin-bottom: 16px; } }
.hero-c { grid-area: c; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn-line { border-color: currentColor; }
.hero .btn-line:hover { background: rgba(0,0,0,.08); }
.hero-note { margin-top: 12px; font-size: 15px; font-weight: 500; }
.hero-pic { grid-area: p; position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(8px, 2vw, 28px); padding: clamp(40px, 5vw, 64px) clamp(10px, 3vw, 40px) clamp(28px, 4vw, 48px); min-height: clamp(270px, 34vw, 440px); }
.vf { --c: currentColor; --l: 30px; --w: 3px; background: linear-gradient(var(--c) 0 0) top left / var(--l) var(--w), linear-gradient(var(--c) 0 0) top left / var(--w) var(--l), linear-gradient(var(--c) 0 0) top right / var(--l) var(--w), linear-gradient(var(--c) 0 0) top right / var(--w) var(--l), linear-gradient(var(--c) 0 0) bottom left / var(--l) var(--w), linear-gradient(var(--c) 0 0) bottom left / var(--w) var(--l), linear-gradient(var(--c) 0 0) bottom right / var(--l) var(--w), linear-gradient(var(--c) 0 0) bottom right / var(--w) var(--l); background-repeat: no-repeat; }
.rec { position: absolute; top: 14px; left: 16px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.rec i { width: 11px; height: 11px; border-radius: 50%; background: currentColor; animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.src { margin: 0; flex: none; width: clamp(84px, 14vw, 190px); transform: rotate(-4deg); }
.src canvas { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.25); background: #EDEDEA; }
.src figcaption { font-size: 14px; font-weight: 600; text-align: center; margin-top: 10px; }
.arrow { display: grid; place-items: center; flex: none; }
.arrow svg { width: clamp(22px, 3vw, 40px); height: clamp(22px, 3vw, 40px); stroke-width: 2.6; }
.fan { position: relative; display: flex; justify-content: center; align-items: center; flex: 0 1 auto; padding-inline: 8px; }
.fan canvas { --w: clamp(88px, 15vw, 214px); width: var(--w); height: auto; display: block; border-radius: 10px; margin-left: calc(var(--w) * -0.4); box-shadow: 0 14px 34px rgba(0,0,0,.28); transform: rotate(var(--r, 0deg)) translateY(var(--y, 0px)); transition: transform .7s cubic-bezier(.2,.8,.2,1); background: #fff; }
.fan canvas:first-child { margin-left: 0; }
.fan.stacked canvas { transform: rotate(0deg) translateY(0); }
@media (max-width: 600px) { .fan canvas:nth-child(n+4) { display: none; } .hero-pic { justify-content: flex-start; } }
@media (prefers-reduced-motion: reduce) { .fan canvas { transition: none; } .rec i { animation: none; } }

.strip { border-bottom: 1px solid var(--line); padding: 14px max(5vw, 16px); }
.strip ul { max-width: 1240px; margin: 0 auto; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; font-size: 15px; }
.strip li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-right: 10px; vertical-align: middle; }

/* ---------- как это работает ---------- */
.steps3 { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); counter-reset: s; }
@media (min-width: 900px) { .steps3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps3 li { counter-increment: s; }
.steps3 h3::before { content: counter(s) ". "; color: var(--btn); }
.steps3 p { color: var(--muted); }
.pic { height: 230px; border-radius: 18px; background: var(--studio); margin-bottom: 16px; display: flex; align-items: center; justify-content: center; gap: 14px; overflow: hidden; padding: 18px; }
.pic canvas { height: 100%; width: auto; border-radius: 8px; }
.pic-photo canvas:first-child { box-shadow: var(--shadow); }
.cutout { background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 50% / 16px 16px; }
.pic-facts { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
.pic-facts span { background: var(--bg); border-radius: 10px; padding: 9px 12px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow); }
.pic-set canvas { height: 92%; box-shadow: var(--shadow); }
.pic-set canvas + canvas { margin-left: -46px; }

/* ---------- сравнение ---------- */
.cmp { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--bg); border-radius: 16px; overflow: hidden; }
.cmp th, .cmp td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp th { font-size: 14px; color: var(--muted); font-weight: 600; }
.cmp td:first-child { font-weight: 600; width: 22%; }
.cmp td:nth-child(2) { color: var(--muted); }
.cmp th:last-child, .cmp td:last-child { background: rgba(255,74,43,.08); font-weight: 600; }
.cmp tr:last-child td { border-bottom: 0; }
@media (max-width: 600px) {
  .stack thead { display: none; }
  .stack tr { display: grid; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .stack td { display: block; border: 0; padding: 3px 0; width: auto !important; background: none !important; }
  .stack td:not(:first-child)::before { content: attr(data-l) ": "; color: var(--muted); font-weight: 500; }
  .stack td:first-child { font-size: 17px; margin-bottom: 4px; }
}

/* ---------- примеры ---------- */
.head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.ex { margin-bottom: 30px; }
.ex h3 { font-size: 17px; }
.ex h3 span { color: var(--muted); font-weight: 500; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(138px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 14px; }
.gallery > * { scroll-snap-align: start; margin: 0; }
.gallery canvas { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: var(--shadow); background: var(--studio); }
.gallery figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }
.gallery .orig canvas { outline: 2px dashed var(--line); outline-offset: -2px; box-shadow: none; }

/* ---------- тарифы ---------- */
.free { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; background: rgba(255,74,43,.14); margin-bottom: 18px; }
.free i { width: 16px; height: 16px; border-radius: 50%; background: var(--red); flex: none; box-shadow: 0 0 0 6px rgba(255,74,43,.25); }
.free b { display: block; font-size: 18px; }
.free span { opacity: .85; }
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 18px; background: var(--bg); color: var(--ink); border: 1.5px solid var(--line); position: relative; }
.dark .plan { background: #232322; color: var(--graph-ink); border-color: #333331; }
.plan.hit { border-color: var(--red); box-shadow: 0 0 0 1.5px var(--red); }
.plan .badge { position: absolute; top: -12px; left: 18px; background: var(--red); color: #151515; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan h3 { font-size: 20px; margin: 0; }
.plan .price { font: 800 32px/1 Unbounded, Onest, sans-serif; letter-spacing: -0.02em; white-space: nowrap; }
.plan .price small { font: 500 15px Onest, sans-serif; letter-spacing: 0; opacity: .75; }
.plan .per { font-size: 15px; opacity: .8; }
.plan ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; flex: 1; }
.plan li { padding-left: 22px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.dark .plan li::before { border-color: #49C27F; }
.plan .btns { display: grid; gap: 8px; margin-top: 8px; }
.plan .btn { width: 100%; }
.dark .plan .btn:not(.btn-red) { background: transparent; color: inherit; border-color: #4A4A47; }
.ozon { display: grid; gap: 14px 28px; align-items: center; margin-top: 22px; padding: 22px; border-radius: 18px; border: 1.5px dashed currentColor; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .ozon { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; } }
.ozon p { opacity: .85; }
.ozon ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; font-weight: 600; }
.facts { padding-left: 20px; display: grid; gap: 6px; color: var(--muted); }

/* ---------- установка, вопросы, финал, подвал ---------- */
.inst { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.inst article { padding: 22px; border-radius: 18px; background: var(--panel); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.inst p { color: var(--muted); flex: 1; }
.inst .ic { width: 30px; height: 30px; color: var(--btn); }
.inl { width: 18px; height: 18px; vertical-align: -3px; }
details { border-bottom: 1px solid var(--line); padding: 4px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 17px; padding: 12px 0; list-style-position: outside; }
details p { color: var(--muted); padding: 0 0 14px; max-width: 70ch; }
.final-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.final .lead { margin-top: 10px; font-size: 18px; }
.foot { background: var(--graph); color: var(--graph-ink); padding: 34px max(5vw, 16px) calc(34px + env(safe-area-inset-bottom, 0px)); }
.foot-in { display: grid; gap: 18px 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .foot-in { grid-template-columns: minmax(0, 1fr) auto; } }
.foot p { color: var(--graph-muted); margin-top: 8px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.foot nav a { color: var(--graph-ink); text-decoration: none; }
.foot .demo-note { grid-column: 1 / -1; font-size: 14px; border-top: 1px solid #2E2E2C; padding-top: 14px; }

/* ---------- инструмент ---------- */
.tool { max-width: 1320px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left, 0px)) 24px; }
.tool-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.stepper { display: flex; gap: 6px; list-style: none; margin: 0; padding: 4px; border-radius: 14px; background: var(--panel); overflow-x: auto; }
.stepper button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 15px Onest, sans-serif; cursor: pointer; white-space: nowrap; }
.stepper b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--panel2); color: var(--ink); font-size: 13px; }
.stepper button.on { background: var(--bg); color: var(--ink); box-shadow: var(--shadow); }
.stepper button.on b { background: var(--red); color: #151515; }
.stepper button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) {
  .tool-head { flex-wrap: nowrap; }
  .stepper { flex: 1 1 auto; gap: 2px; }
  .stepper li { flex: 1 1 0; }
  .stepper button { width: 100%; justify-content: center; padding: 6px 4px; font-size: 14px; }
  .stepper b { display: none; }
  #newCard { flex: none; width: 48px; min-height: 48px; padding: 0; }
  #newCard span { display: none; }
  .row-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .row-btns .btn { white-space: normal; text-align: center; padding-inline: 10px; line-height: 1.2; }
  .sample-banner { padding: 10px 14px; font-size: 15px; }
}
.sample-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 16px; border-radius: 14px; background: rgba(255,74,43,.12); margin-bottom: 14px; }
.tool-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .tool-grid { grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr); align-items: start; } .stage-col { position: sticky; top: 76px; } }
.viewer { position: relative; width: min(100%, calc(62svh * 0.75)); margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 16px; background: var(--studio); overflow: hidden; }
@media (min-width: 900px) { .viewer { width: min(100%, calc((100svh - 230px) * 0.75)); } }
.car { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline-offset: -3px; }
.car::-webkit-scrollbar { display: none; }
.car .slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; }
.car canvas { width: 100%; height: auto; display: block; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #151515; display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.nav.prev { left: 10px; } .nav.next { right: 10px; }
.nav:disabled { opacity: 0; pointer-events: none; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.empty-frame { color: var(--muted); width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 24px; --c: var(--muted); }
.empty-frame svg { width: 40px; height: 40px; }
.empty-frame b { color: var(--ink); font-size: 18px; }
.gen { position: absolute; inset: 0; background: rgba(15,15,15,.78); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; font-weight: 600; }
.gen-photo { position: relative; width: 46%; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 34px rgba(0,0,0,.4); }
.gen-photo canvas { width: 100%; height: auto; display: block; }
.scan { position: absolute; left: 0; right: 0; height: 22%; top: -22%; background: linear-gradient(180deg, rgba(255,74,43,0), rgba(255,74,43,.55) 70%, #FF4A2B 72%, rgba(255,74,43,0) 74%); animation: scan 1.1s linear infinite; }
@keyframes scan { to { top: 100%; } }
@media (prefers-reduced-motion: reduce) { .scan { animation: none; display: none; } }
.slide-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 12px auto 0; width: min(100%, 640px); }
.counter { font-weight: 600; color: var(--muted); white-space: nowrap; }
.slide-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 6px; margin: 0 auto; width: min(100%, 640px); scrollbar-width: thin; }
.thumbs button { flex: none; width: 58px; padding: 0; border: 2px solid transparent; border-radius: 9px; background: none; cursor: pointer; position: relative; }
.thumbs button.on { border-color: var(--red); }
.thumbs canvas { width: 100%; height: auto; display: block; border-radius: 7px; }
.thumbs .paid::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
@media (max-width: 899px) { body[data-step=info] .thumbs, body[data-step=style] .thumbs { position: sticky; top: 60px; z-index: 5; background: var(--bg); width: 100%; } }

.panel { background: var(--panel); border-radius: 18px; padding: 20px; }
.panel h2 { font-size: 24px; margin-bottom: 12px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-h h2 { margin-bottom: 0; }
.hint { color: var(--muted); font-size: 15px; margin: 8px 0 12px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 2px dashed var(--muted); border-radius: 16px; background: var(--bg); cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop.over { border-color: var(--btn); background: rgba(255,74,43,.06); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop svg { width: 34px; height: 34px; color: var(--btn); }
.drop b { font-size: 17px; }
.drop span { color: var(--muted); font-size: 14px; }
.samples { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); font-size: 15px; }
#sampleBtns { display: flex; flex-wrap: wrap; gap: 8px; }
.sample-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 600 15px Onest, sans-serif; cursor: pointer; }
.sample-btn canvas { width: 30px; height: 39px; border-radius: 6px; }
.cut { margin-top: 18px; }
.cut-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cut-pair figure { margin: 0; }
.cut-pair canvas { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; display: block; border-radius: 12px; background: var(--bg); }
.checker canvas { background: repeating-conic-gradient(#d9d9d9 0 25%, #fff 0 50%) 50% / 18px 18px; }
.cut-pair figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-weight: 600; cursor: pointer; min-height: 44px; }
.switch input { width: 22px; height: 22px; accent-color: var(--btn); }
.range { display: grid; gap: 6px; font-weight: 600; margin-top: 4px; }
.range input { width: 100%; accent-color: var(--btn); min-height: 32px; }

.f { display: grid; gap: 6px; font-weight: 600; font-size: 15px; margin-top: 14px; }
.f small { font-weight: 400; color: var(--muted); }
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { width: 100%; font: 400 16px/1.4 Onest, system-ui, sans-serif; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; min-height: 44px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.row2 { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 480px) { .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.icon-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.icon-row button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 10px 4px 6px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 500 14px Onest, sans-serif; cursor: pointer; max-width: 100%; }
.icon-row button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 16ch; }
.icon-row svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--btn); color: #fff; stroke-width: 2.2; }
.suggest { margin-top: 10px; font-size: 14px; color: var(--muted); }
#suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
#suggest button { min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1.5px dashed var(--muted); background: transparent; color: var(--ink); font: 500 14px Onest, sans-serif; cursor: pointer; }
#suggest button:hover { border-style: solid; border-color: var(--btn); }
.dims { border: 0; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dims legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
.dims label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
.titles { margin-top: 14px; border: 0; }
.titles summary { font-size: 15px; padding: 8px 0; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 56px; height: 44px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); padding: 3px; cursor: pointer; flex: none; }

.themes { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 480px) { .themes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.themes button { padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; color: var(--ink); font: 600 14px Onest, sans-serif; text-align: center; }
.themes button canvas { width: 100%; height: auto; display: block; border-radius: 9px; }
.themes button span { display: block; padding: 6px 0 4px; }
.themes button.on { border-color: var(--red); }
.seg { border: 0; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: grid; gap: 2px; padding: 10px; min-height: 64px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); font-size: 13px; color: var(--muted); }
.seg b { font-size: 15px; color: var(--ink); white-space: nowrap; }
.seg input:checked + span { border-color: var(--red); box-shadow: 0 0 0 1.5px var(--red); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.slide-list { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.slide-list legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 6px; }
.slide-list label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; border-radius: 10px; background: var(--bg); cursor: pointer; }
.slide-list input { width: 20px; height: 20px; accent-color: var(--btn); flex: none; }
.slide-list small { color: var(--muted); margin-left: auto; text-align: right; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.checks svg { color: var(--ok); margin-top: 2px; }
.checks .warn svg { color: var(--warn); }
.checks small { display: block; color: var(--muted); }
.cost { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--bg); font-weight: 600; }
.cost span { display: block; font-weight: 400; color: var(--muted); font-size: 15px; }

/* ---------- тарифы и кабинет как вкладки ---------- */
.page-h { font-size: clamp(30px, 4vw, 44px); }
.cab-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-top: 22px; }
.cab-grid article { padding: 22px; border-radius: 18px; background: var(--panel); }
.cab-grid p { color: var(--muted); }
.cab-bal { background: var(--hero) !important; color: var(--hero-ink); }
.cab-bal p { color: inherit !important; opacity: .85; }
.cab-bal span { font-weight: 600; }
.cab-bal b { display: block; font: 800 clamp(48px, 7vw, 72px)/1 Unbounded, Onest, sans-serif; letter-spacing: -0.03em; margin: 6px 0; }
.cab-bal .btn:not(.btn-red) { background: rgba(255,255,255,.85); border-color: transparent; color: #151515; }
.cab-bal .btn-red { background: #151515; border-color: #151515; }
.projects { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: 16px; }
.projects button { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 600 14px/1.3 Onest, sans-serif; }
.projects img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; display: block; background: var(--panel); box-shadow: var(--shadow); margin-bottom: 8px; }
.projects small { display: block; color: var(--muted); font-weight: 400; }
.projects .none { color: var(--muted); grid-column: 1 / -1; }
.history { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 2px; }
.history li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history time { display: block; color: var(--muted); font-size: 14px; }
.history b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.history .plus { color: var(--ok); }

/* ---------- нижняя панель, окно, уведомления ---------- */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--head); background: var(--bg); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; min-height: 52px; border-radius: 12px; text-decoration: none; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { color: var(--btn); }
.tabbar svg { width: 24px; height: 24px; }
@media (max-width: 860px) {
  body:not([data-view=home]) .tabbar, body.standalone .tabbar { display: grid; }
  body:not([data-view=home]), body.standalone { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 60; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92svh; overflow-y: auto; background: var(--bg); color: var(--ink); border-radius: 22px 22px 0 0; padding: 18px max(18px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); box-shadow: 0 -10px 40px rgba(0,0,0,.25); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(560px, 92vw); border-radius: 22px; padding: 22px 24px 24px; animation: none; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }
.sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sheet-h h2 { font-size: 22px; }
.sheet-b p { color: var(--muted); margin: 8px 0; }
.sheet-b ol { padding-left: 22px; display: grid; gap: 8px; margin: 10px 0; }
.sheet-b .sum { font: 800 34px/1.1 Unbounded, Onest, sans-serif; margin: 6px 0 10px; }
.sheet-b .opts { display: grid; gap: 8px; margin: 12px 0; }
.sheet-b .opts label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; min-height: 48px; }
.sheet-b .opts input { width: 20px; height: 20px; accent-color: var(--btn); }
.sheet-b .demo { font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--panel); color: var(--muted); }
.sheet-b .codes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sheet-b .codes button { min-height: 36px; padding: 4px 10px; border-radius: 8px; border: 1.5px dashed var(--muted); background: transparent; color: var(--ink); font: 600 14px/1 ui-monospace, Menlo, Consolas, monospace; cursor: pointer; }
.sheet-b .err { color: var(--btn); font-weight: 600; min-height: 1.4em; margin-top: 8px; }
.sheet-b .big-ok { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; margin: 8px 0; }
.sheet-b .big-ok svg { width: 34px; height: 34px; stroke-width: 3; }
.sheet-b .mini-plans { display: grid; gap: 8px; margin: 12px 0; }
.sheet-b .mini-plans button { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; min-height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 600 16px Onest, sans-serif; cursor: pointer; text-align: left; }
.sheet-b .mini-plans button:hover { border-color: var(--btn); }
.sheet-b .mini-plans b { white-space: nowrap; }
.sheet-b .imgs { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.sheet-b .imgs img { width: 100%; border-radius: 10px; display: block; }
.code-in { font: 700 20px/1 ui-monospace, Menlo, Consolas, monospace !important; letter-spacing: .06em; text-transform: uppercase; text-align: center; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; z-index: 80; background: #151515; color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: opacity .2s, transform .2s; pointer-events: none; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 860px) { body:not([data-view=home]) .toast, body.standalone .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }
