/* Nano Banana preview — software / AI photo tool
   Tokens from taste-skill (software) + brand banana.
   Motion from emilkowalski: ease-out, <300ms, press scale.
   Anti-slop: no cream/terracotta, no purple, no Inter, no card soup. */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;600;700;800&family=Figtree:wght@400;500;600;700&display=swap");

:root {
    --bg: #f3f3ef;
    --surface: #ffffff;
    --ink: #111111;
    --mute: #5f5f5a;
    --line: #d9d9d2;
    --banana: #ffe135;
    --banana-deep: #f0c800;
    --banana-ink: #111111;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-move: cubic-bezier(0.77, 0, 0.175, 1);
    --radius: 12px;
    --btn-radius: 12px;
    --edge: clamp(20px, 4vw, 48px);
    --max: 1180px;

    /* Bridge to existing page CSS */
    --primary-color: var(--banana);
    --primary-hover: var(--banana-deep);
    --text-color: var(--ink);
    --text-secondary: var(--mute);
    --bg-color: var(--bg);
    --bg-light: var(--surface);
    --border-color: var(--line);
    --shadow: none;
    --shadow-hover: none;
    --transition: transform 180ms var(--ease-out), background-color 180ms ease, color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body.preview {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Figtree", system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    font-weight: 450;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: clip;
}

body.preview a { color: inherit; }
body.preview img { max-width: 100%; display: block; }

.wrap,
body.preview .container {
    width: min(var(--max), calc(100% - (var(--edge) * 2)));
    max-width: var(--max);
    margin-inline: auto;
    /* style.css задаёт padding: 0 20px — иначе двойной отступ и визуальный сдвиг влево */
    padding-inline: 0;
}

/* —— Header —— */

body.preview .header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    box-shadow: none;
}

body.preview .header.is-solid {
    border-bottom-color: var(--line);
}

body.preview .nav {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 64px;
    padding: 6px 0;
    min-width: 0;
}

body.preview .logo { flex: none; }

body.preview .logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

body.preview .logo-img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

body.preview .logo-text {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

body.preview .nav-menu {
    display: flex;
    gap: 22px;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
}

body.preview .nav-menu a {
    position: relative;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink);
}

body.preview .nav-menu a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 1.5px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 200ms var(--ease-out);
}

body.preview .nav-menu a:hover::after,
body.preview .nav-menu a[aria-current="page"]::after {
    transform: scaleX(1);
}

body.preview .user-balance {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    box-shadow: none;
    color: var(--ink);
    padding: 7px 12px;
    margin-right: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
}

body.preview .mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: 4px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

body.preview .mobile-menu-toggle span {
    display: block;
    width: 16px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 180ms var(--ease-out), opacity 180ms ease;
}

/* —— Buttons (Emil: press scale, ease-out) —— */

body.preview .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: var(--btn-radius);
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    transform: translateZ(0);
    will-change: transform;
}

body.preview .btn:hover {
    transform: translateY(-2px);
}

body.preview .btn:active {
    transform: scale(0.97);
}

body.preview .btn-primary:not(.btn-google):not(.btn-yandex):not(.btn-mail),
body.preview .btn-small.btn-primary:not(.btn-google):not(.btn-yandex):not(.btn-mail) {
    background: var(--banana) !important;
    color: var(--banana-ink) !important;
    border-color: var(--banana) !important;
}

body.preview .btn-primary:not(.btn-google):not(.btn-yandex):not(.btn-mail):hover,
body.preview .btn-small.btn-primary:not(.btn-google):not(.btn-yandex):not(.btn-mail):hover {
    background: var(--banana-deep) !important;
    box-shadow: none;
}

/* Telegram brand */
body.preview .btn-telegram {
    background: #2AABEE !important;
    color: #fff !important;
    border-color: #2AABEE !important;
}

body.preview .btn-telegram:hover {
    background: #229ED9 !important;
    border-color: #229ED9 !important;
    color: #fff !important;
    box-shadow: none;
}

/* MAX messenger brand (фиолетовый) */
body.preview .btn-max {
    background: #6C5CE7 !important;
    color: #fff !important;
    border-color: #6C5CE7 !important;
}

body.preview .btn-max:hover {
    background: #5A4BD1 !important;
    border-color: #5A4BD1 !important;
    color: #fff !important;
    box-shadow: none;
}

/* Кнопки OAuth: белые с иконками брендов, не banana */
body.preview .auth-buttons .btn-google,
body.preview .auth-buttons .btn-yandex,
body.preview .auth-buttons .btn-mail {
    width: 100%;
    justify-content: center;
    gap: 12px;
    background: #fff !important;
    color: #111 !important;
    border: 1px solid var(--line) !important;
}

body.preview .auth-buttons .btn-google:hover,
body.preview .auth-buttons .btn-yandex:hover,
body.preview .auth-buttons .btn-mail:hover {
    background: var(--bg) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.preview .auth-buttons .btn-yandex {
    border-color: #fc3f1d !important;
}

body.preview .auth-buttons .btn-mail {
    border-color: #005ff9 !important;
}

body.preview .auth-buttons .btn-google svg,
body.preview .auth-buttons .btn-yandex svg,
body.preview .auth-buttons .btn-mail svg {
    display: block;
    flex: none;
    width: 20px;
    height: 20px;
    max-width: none;
}

body.preview .auth-buttons .btn-mail svg {
    color: #005ff9;
}

body.preview .btn-secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

body.preview .btn-secondary:hover {
    border-color: var(--ink);
    background: var(--surface);
}

body.preview .btn-large {
    padding: 15px 24px;
    font-size: 1rem;
}

body.preview .btn-small {
    padding: 9px 14px;
    font-size: 0.875rem;
}

/* —— Hero: one composition —— */

.hero {
    /* Один экран: следующий раздел не торчит снизу */
    padding: 24px 0 40px;
    min-height: calc(100svh - 72px);
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(20px, 3vw, 36px);
    align-items: center;
    width: 100%;
}

.brand-mark {
    margin: 0 0 16px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(2.4rem, 5.6vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.95;
    color: var(--ink);
    max-width: 100%;
}

.brand-mark span {
    display: inline;
    background-image: linear-gradient(transparent 62%, var(--banana) 62%);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    padding: 0 0.04em;
}

.hero-copy { min-width: 0; }

.hero h1 {
    margin: 0;
    max-width: 12ch;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(2.4rem, 5.6vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.95;
}

.hero h1 span {
    display: inline;
    background-image: linear-gradient(transparent 62%, var(--banana) 62%);
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    padding: 0 0.04em;
}

.lede {
    margin: 16px 0 0;
    max-width: 38ch;
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--mute);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 20px;
    margin: 28px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
    max-width: 34rem;
}

.trust li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0;
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.35;
}

.trust li::before {
    content: "";
    flex: none;
    width: 7px;
    height: 7px;
    margin-top: 0.35em;
    border-radius: 2px;
    background: var(--banana);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--banana) 28%, transparent);
}

.hero-visual {
    margin: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
}

/* Hero stage: queue of prints + scan reveal */
.hero-stage {
    --stage-h: min(480px, calc(100svh - 160px));
    --stage-w: calc(var(--stage-h) * 3 / 4);
    --scan: 0%;
    /* Место под очередь справа: основной кадр + ~52% ширины */
    width: min(100%, calc(var(--stage-w) * 1.52));
    justify-self: end;
    align-items: stretch;
}

.stage-photo {
    position: relative;
    width: var(--stage-w);
    max-width: 66%;
    /* Основной кадр слева внутри stage — очередь веером вправо */
    margin-right: calc(var(--stage-w) * 0.52);
}

.stage-main {
    position: relative;
    z-index: 20;
    background: var(--surface);
    padding: 10px 10px 0;
    border-radius: 4px;
    box-shadow:
        0 1px 2px rgba(17, 17, 17, 0.06),
        0 18px 48px rgba(17, 17, 17, 0.14);
    transition:
        transform 420ms cubic-bezier(0.4, 0, 0.2, 1),
        opacity 320ms ease;
}

.stage-main.is-leave {
    transform: translateX(-62%) scale(0.86);
    opacity: 0;
}

.stage-main.is-back {
    transition: none;
}

.stage-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #dfdfdf;
    border-radius: 2px;
}

.stage-frame > picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.stage-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-after {
    z-index: 1;
}

.stage-before {
    z-index: 2;
    /* Луч идёт сверху вниз: выше линии — «после», ниже — «до» */
    clip-path: inset(var(--scan) 0 0 0);
    will-change: clip-path;
}

.stage-beam {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    top: var(--scan);
    height: 2px;
    transform: translateY(-50%);
    background: #fff;
    box-shadow:
        0 0 0 1px rgba(255, 225, 53, 0.55),
        0 0 18px rgba(255, 225, 53, 0.85),
        0 0 42px rgba(255, 225, 53, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.stage-beam::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px;
    background: linear-gradient(to top, rgba(255, 225, 53, 0.22), transparent);
    transform: translateY(100%);
    pointer-events: none;
}

.stage-glow {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(120% 60% at 50% var(--scan), rgba(255, 225, 53, 0.14), transparent 55%);
    transition: opacity 180ms ease;
}

.stage-frame.is-scanning .stage-glow {
    opacity: 1;
}

.stage-status {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    height: 40px;
    padding: 12px 2px 0;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.stage-status b {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-status em {
    font-style: normal;
    font-weight: 500;
    color: var(--mute);
    font-variant-numeric: tabular-nums;
}

.stage-status[data-state="done"] b {
    color: var(--ink);
}

.stage-status[data-state="done"] b::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: var(--banana);
    box-shadow: 0 0 0 3px rgba(255, 225, 53, 0.28);
    vertical-align: 1px;
}

.stage-queue {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.stage-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 10px 10px 40px;
    background: var(--surface);
    border-radius: 4px;
    transform-origin: 50% 50%;
    box-shadow:
        0 1px 2px rgba(17, 17, 17, 0.05),
        0 10px 28px rgba(17, 17, 17, 0.1);
    transition:
        transform 420ms cubic-bezier(0.4, 0, 0.2, 1),
        opacity 300ms ease;
}

.stage-card[data-slot="0"] { transform: none; z-index: 4; }
.stage-card[data-slot="1"] { transform: translateX(30%) scale(0.86); z-index: 3; }
.stage-card[data-slot="2"] { transform: translateX(52%) scale(0.74); z-index: 2; }
.stage-card[data-slot="3"] { transform: translateX(71%) scale(0.62); z-index: 1; }

.stage-card.is-jump {
    transition: none;
    opacity: 0;
}

.stage-card-pic {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #dfdfdf;
    border-radius: 2px;
}

.stage-card-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stage-task {
    position: relative;
    z-index: 21;
    display: block;
    width: var(--stage-w);
    max-width: 100%;
    margin: 14px 2px 0;
    min-height: 2.9em;
    font-family: "Figtree", system-ui, sans-serif;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.stage-task q {
    quotes: none;
}

.stage-caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin: 0 1px 0 2px;
    background: var(--banana-deep);
    vertical-align: -0.17em;
}

.stage-caret.is-wait {
    animation: stageCaret 1s steps(1) infinite;
}

@keyframes stageCaret {
    50% { opacity: 0; }
}

/* —— Sections —— */

.section {
    padding: 72px 0 24px;
}

/* Surface rhythm: full-bleed bands, no new cards */
body.preview .hero {
    background: transparent;
}

body.preview #examples,
body.preview #capabilities,
body.preview main > .faq {
    background: var(--surface);
}

body.preview #examples .prompt,
body.preview #capabilities .can-do li {
    background: var(--bg);
}

body.preview main > .faq .faq-item {
    background: var(--bg);
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.section-head h2 {
    margin: 0;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.section-head p {
    margin: 0;
    flex: 0 1 42ch;
    color: var(--mute);
    font-size: 0.9375rem;
    max-width: 42ch;
    text-align: right;
    text-wrap: pretty;
}

.models .section-head p {
    white-space: nowrap;
    max-width: none;
    flex: none;
}

.models-note {
    margin: -8px 0 22px;
    max-width: 62ch;
    color: var(--mute);
    font-size: 0.9375rem;
    line-height: 1.45;
}

.section-tight { padding-top: 56px; }

.examples-note {
    margin: 22px 0 0;
    max-width: 62ch;
    color: var(--mute);
    font-size: 0.875rem;
    line-height: 1.45;
}

.examples-note a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.can-do {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.can-do li {
    padding: 18px 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-width: 0;
    transition: transform 200ms var(--ease-out), border-color 200ms ease;
}

.can-do li:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
}

.can-do h3 {
    margin: 0 0 8px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.can-do p {
    margin: 0;
    color: var(--mute);
    font-size: 0.875rem;
    line-height: 1.45;
}

.can-do a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.can-do a:hover {
    color: var(--mute);
}

.lookbook {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 18px;
}

.look {
    margin: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.look .cmp {
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(17, 17, 17, 0.06),
        0 14px 36px rgba(17, 17, 17, 0.12);
    transition: transform 250ms var(--ease-out), box-shadow 250ms ease;
}

.look:hover .cmp {
    transform: translateY(-4px);
    box-shadow:
        0 2px 4px rgba(17, 17, 17, 0.06),
        0 22px 48px rgba(17, 17, 17, 0.16);
}

.look-meta h3 {
    margin: 0 0 8px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.prompt {
    margin: 0;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--mute);
    font-size: 0.875rem;
    line-height: 1.45;
    max-width: none;
}

.model-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.model-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 18px 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-width: 0;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: transform 200ms var(--ease-out), border-color 200ms ease;
}

a.model-card:hover,
.model-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
}

a.model-card:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}

.model-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    display: block;
    color: var(--ink);
}

.model-card h3 {
    margin: 0;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.model-cost {
    margin: 0;
    margin-top: auto;
    color: var(--mute);
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cta-band {
    padding-top: 24px;
    padding-bottom: 8px;
}

.cta-band-inner {
    padding: 36px 32px;
    background: var(--ink);
    color: #f2f2ef;
    border-radius: calc(var(--radius) + 6px);
}

.cta-band-inner h2 {
    margin: 0;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #fff;
}

.cta-band-inner p {
    margin: 10px 0 0;
    color: rgba(242, 242, 239, 0.7);
}

.cta-band-inner .hero-actions { margin-top: 22px; }

.cta-band-inner .btn-secondary {
    background: transparent;
    border-color: rgba(242, 242, 239, 0.28);
    color: #f2f2ef;
}

.cta-band-inner .btn-secondary:hover {
    border-color: #fff;
    background: transparent;
}

/* —— Compare —— */

.cmp {
    position: relative;
    aspect-ratio: 3 / 4;
    background: #cfcfc8;
    overflow: hidden;
    --pos: 52%;
    touch-action: pan-y;
    user-select: none;
}

.cmp > picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.cmp img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: transform 320ms var(--ease-out);
}

.cmp-before {
    z-index: 2;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.cmp-handle {
    position: absolute;
    z-index: 3;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    background: #fff;
    pointer-events: none;
    transform: translateX(-50%);
}

.cmp-handle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid rgba(17, 17, 17, 0.12);
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.cmp-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-left: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    transform: translate(-50%, -50%);
    opacity: 0.55;
}

.cmp input[type="range"] {
    position: absolute;
    z-index: 4;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
}

/* —— How —— */

.how {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.how li {
    padding: 22px 22px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-height: 100%;
    transition: transform 200ms var(--ease-out), border-color 200ms ease;
}

.how li:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
}

.how .n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--banana);
    color: var(--ink);
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.how h3 {
    margin: 0 0 8px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.how p {
    margin: 0;
    color: var(--mute);
    max-width: 36ch;
    font-size: 0.975rem;
}

.how a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.how a:hover {
    color: var(--mute);
}

.channels {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    justify-content: center;
}

.prices {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
}

.price-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 16px 10px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    text-align: center;
    color: var(--ink);
    transition: transform 200ms var(--ease-out), border-color 200ms ease, box-shadow 200ms ease;
}

.price-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

.price-card:active {
    transform: scale(0.97);
}

.price-card.is-featured {
    background: var(--banana);
    border-color: color-mix(in srgb, var(--banana-deep) 55%, var(--banana));
}

.price-card.is-featured:hover {
    border-color: var(--ink);
}

.price-tokens {
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.price-unit {
    color: var(--mute);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: lowercase;
}

.price-card.is-featured .price-unit {
    color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.price-sum {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    width: 100%;
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.price-card.is-featured .price-sum {
    border-top-color: color-mix(in srgb, var(--ink) 16%, transparent);
}

.price-per {
    margin-top: 6px;
    color: var(--mute);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.3;
    text-wrap: balance;
}

.price-per strong {
    color: var(--ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.price-card.is-featured .price-per {
    color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.price-card.is-featured .price-per strong {
    color: var(--ink);
}

.cta-band-inner .hero-actions {
    justify-content: center;
}

/* —— Tariffs page (3×2, премиум, stagger entrance) —— */

body.preview .tariffs-section {
    --tariff-ink: #0c0c0b;
    --tariff-stone: #ece8e1;
    --tariff-paper: #f7f4ef;
    --tariff-gold: #b08d57;
    --tariff-gold-soft: #d4b483;
    --tariff-mute: #6b655c;
    padding: 56px 0 80px;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(176, 141, 87, 0.14), transparent 55%),
        linear-gradient(180deg, var(--tariff-paper) 0%, var(--bg) 100%);
    min-height: calc(100vh - 200px);
}

body.preview .tariffs-title {
    margin: 0 0 12px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    text-align: center;
    color: var(--tariff-ink);
}

body.preview .tariffs-subtitle {
    margin: 0 auto 44px;
    max-width: 42ch;
    text-align: center;
    color: var(--tariff-mute);
    font-size: 1.0625rem;
    line-height: 1.5;
    text-wrap: pretty;
}

body.preview .tariffs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
    margin: 0 auto;
}

@keyframes tariffEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.preview .tariff-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 36px 26px 26px;
    background: #fffcf8;
    border: 1px solid color-mix(in srgb, var(--tariff-gold) 28%, var(--tariff-stone));
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    color: var(--tariff-ink);
    opacity: 0;
    animation: tariffEnter 520ms var(--ease-out) both;
    transition:
        transform 220ms var(--ease-out),
        border-color 220ms ease,
        box-shadow 220ms ease,
        background-color 220ms ease;
}

/* Lead first, then softer cascade — не метроном */
body.preview .tariff-card:nth-child(1) { animation-delay: 0ms; }
body.preview .tariff-card:nth-child(2) { animation-delay: 55ms; }
body.preview .tariff-card:nth-child(3) { animation-delay: 95ms; }
body.preview .tariff-card:nth-child(4) { animation-delay: 125ms; }
body.preview .tariff-card:nth-child(5) { animation-delay: 145ms; }
body.preview .tariff-card:nth-child(6) { animation-delay: 160ms; }

body.preview .tariff-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--tariff-gold) 55%, var(--tariff-stone));
    box-shadow:
        0 18px 40px rgba(12, 12, 11, 0.1),
        0 0 0 1px color-mix(in srgb, var(--tariff-gold) 22%, transparent);
}

body.preview .tariff-card:active {
    transform: translateY(-2px) scale(0.985);
}

body.preview .tariff-card.popular {
    background:
        linear-gradient(165deg, #1a1814 0%, #0c0c0b 55%, #16120e 100%);
    border-color: color-mix(in srgb, var(--tariff-gold) 55%, #1a1814);
    color: #f7f4ef;
    box-shadow:
        0 20px 48px rgba(12, 12, 11, 0.28),
        inset 0 1px 0 rgba(212, 180, 131, 0.18);
}

body.preview .tariff-card.popular:hover {
    border-color: var(--tariff-gold-soft);
    box-shadow:
        0 24px 52px rgba(12, 12, 11, 0.34),
        0 0 0 1px color-mix(in srgb, var(--tariff-gold-soft) 40%, transparent),
        inset 0 1px 0 rgba(212, 180, 131, 0.28);
}

body.preview .tariff-card.popular::before {
    content: "Популярный";
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--tariff-gold-soft), var(--tariff-gold));
    color: var(--tariff-ink);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(176, 141, 87, 0.35);
}

body.preview .tariff-header {
    text-align: center;
    margin-bottom: 22px;
}

body.preview .tariff-tokens {
    margin-bottom: 6px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(2.25rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: inherit;
}

body.preview .tariff-tokens-label {
    color: var(--tariff-mute);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.preview .tariff-card.popular .tariff-tokens-label {
    color: color-mix(in srgb, var(--tariff-gold-soft) 70%, #f7f4ef);
}

body.preview .tariff-price {
    text-align: center;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: inherit;
}

body.preview .tariff-card:not(.popular) .tariff-price {
    color: var(--tariff-ink);
}

body.preview .tariff-card.popular .tariff-price {
    background: linear-gradient(135deg, #f3e6c8, var(--tariff-gold-soft) 45%, var(--tariff-gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.preview .tariff-price-label {
    margin-top: 6px;
    text-align: center;
    color: var(--tariff-mute);
    font-size: 0.875rem;
}

body.preview .tariff-card.popular .tariff-price-label {
    color: color-mix(in srgb, #f7f4ef 55%, var(--tariff-gold-soft));
}

body.preview .tariff-price-per-image {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid color-mix(in srgb, var(--tariff-gold) 22%, var(--tariff-stone));
    text-align: center;
    color: var(--tariff-mute);
    font-size: 0.875rem;
    line-height: 1.45;
}

body.preview .tariff-card.popular .tariff-price-per-image {
    border-top-color: color-mix(in srgb, var(--tariff-gold) 28%, transparent);
    color: color-mix(in srgb, #f7f4ef 55%, var(--tariff-gold-soft));
}

body.preview .tariff-price-per-image strong {
    color: var(--tariff-ink);
    font-size: 1.125rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

body.preview .tariff-card.popular .tariff-price-per-image strong {
    color: var(--tariff-gold-soft);
}

body.preview .tariff-price-hint {
    font-size: 0.75rem;
}

body.preview .tariff-button {
    appearance: none;
    margin-top: 22px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--banana-deep) 55%, var(--banana));
    border-radius: var(--btn-radius);
    background: var(--banana);
    color: var(--ink);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition:
        transform 160ms var(--ease-out),
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        box-shadow 160ms ease;
}

body.preview .tariff-button:hover {
    background: var(--banana-deep);
    border-color: var(--banana-deep);
    box-shadow: 0 8px 20px rgba(240, 200, 0, 0.28);
}

body.preview .tariff-button:active {
    transform: scale(0.97);
}

body.preview .tariff-card.popular .tariff-button {
    background: var(--banana);
    border-color: color-mix(in srgb, var(--banana-deep) 55%, var(--banana));
    color: var(--ink);
}

body.preview .tariff-card.popular .tariff-button:hover {
    background: var(--banana-deep);
    border-color: var(--banana-deep);
    box-shadow: 0 8px 20px rgba(240, 200, 0, 0.28);
}

body.preview .tariff-button:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}

@media (max-width: 960px) {
    body.preview .tariffs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 640px) {
    body.preview .tariffs-section {
        padding: 32px 0 56px;
    }

    body.preview .tariffs-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    body.preview .tariff-card {
        padding: 28px 20px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.preview .tariff-card {
        animation: none;
        opacity: 1;
        transform: none;
    }

    body.preview .tariff-card:hover,
    body.preview .tariff-card:active,
    body.preview .tariff-button:active {
        transform: none;
    }
}

/* —— SEO / blog / ideas (preview) —— */

body.preview .seo-page {
    padding: 28px 0 56px;
}

body.preview .seo-page > .container,
body.preview .seo-page > .wrap {
    width: min(var(--max), calc(100% - (var(--edge) * 2)));
    max-width: var(--max);
    margin: 0 auto;
}

body.preview .seo-breadcrumbs {
    font-size: 0.875rem;
    color: var(--mute);
    margin-bottom: 20px;
}

body.preview .seo-breadcrumbs a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}

body.preview .seo-breadcrumbs a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

body.preview .seo-page h1 {
    margin: 0 0 12px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--ink);
}

body.preview .seo-page h2 {
    margin: 0 0 16px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

body.preview .seo-intro,
body.preview .seo-outro,
body.preview .seo-tips {
    color: var(--mute);
    font-size: 1.0625rem;
    line-height: 1.65;
    max-width: 62ch;
}

body.preview .seo-landing--split {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 28px 28px;
    align-items: start;
}

body.preview .seo-landing-main {
    min-width: 0;
}

body.preview .seo-landing-main .seo-intro,
body.preview .seo-landing-main .seo-tips,
body.preview .seo-landing-main .seo-outro,
body.preview .seo-landing-main .seo-settings-box,
body.preview .seo-landing-main .seo-faq-list {
    max-width: none;
}

body.preview .seo-landing-aside {
    min-width: 0;
    position: sticky;
    top: 80px;
    max-height: calc(100dvh - 96px);
    overflow: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
    scrollbar-gutter: stable;
}

body.preview .seo-landing-aside .seo-prompts {
    margin-bottom: 0;
}

body.preview .seo-landing-aside .seo-prompts > h2 {
    position: sticky;
    top: 0;
    z-index: 1;
    margin: 0 0 12px;
    padding: 4px 0 10px;
    background: linear-gradient(to bottom, var(--bg) 70%, transparent);
    font-size: 1.15rem;
}

body.preview .seo-landing--split .seo-prompts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.preview .seo-landing--split .seo-prompt-card {
    min-width: 0;
}

body.preview .seo-landing--split .seo-prompt-card-body {
    padding: 10px 12px 12px;
}

body.preview .seo-landing--split .seo-prompt-card h3 {
    margin: 0 0 6px;
    font-size: 0.8125rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

body.preview .seo-landing--split .seo-prompt-card p:empty {
    display: none;
}

body.preview .seo-landing--split .seo-prompt-card p {
    margin: 0 0 8px;
    font-size: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.preview .seo-landing--split .seo-prompt-actions {
    gap: 6px;
}

body.preview .seo-landing--split .seo-prompt-actions .btn {
    padding: 8px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
}

@media (max-width: 960px) {
    body.preview .seo-landing--split {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    body.preview .seo-landing-aside {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    body.preview .seo-landing-aside .seo-prompts > h2 {
        position: static;
        background: none;
        padding: 0;
    }

    body.preview .seo-landing--split .seo-prompts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    body.preview .seo-landing--split .seo-prompts-grid {
        grid-template-columns: 1fr;
    }
}

body.preview .seo-cta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 28px;
}

body.preview .seo-cta-bar input[type="search"] {
    flex: 1 1 240px;
    max-width: 420px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.9375rem;
}

body.preview .seo-cta-bar input[type="search"]:focus {
    outline: 2px solid color-mix(in srgb, var(--banana) 70%, transparent);
    outline-offset: 1px;
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
}

body.preview .seo-settings-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 28px;
    max-width: 62ch;
    box-shadow: none;
}

body.preview .seo-prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

body.preview .seo-prompt-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none;
    transition: transform 200ms var(--ease-out), border-color 200ms ease;
}

body.preview .seo-prompt-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    box-shadow: none;
}

body.preview .seo-prompt-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg);
}

body.preview .seo-prompt-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
    gap: 0;
}

body.preview .seo-prompt-card h3 {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

body.preview .seo-prompt-card p {
    margin: 0 0 12px;
    flex: 1;
    color: var(--mute);
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.preview .seo-prompt-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

body.preview .seo-prompt-actions .btn {
    width: 100%;
    justify-content: center;
}

body.preview .seo-grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

body.preview .seo-card-link {
    display: block;
    padding: 18px 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    box-shadow: none;
    transition: transform 200ms var(--ease-out), border-color 200ms ease;
}

body.preview .seo-card-link:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    box-shadow: none;
}

body.preview .seo-card-link img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    background: var(--bg);
}

body.preview .seo-card-link h2,
body.preview .seo-card-link h3 {
    margin: 0 0 8px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ink);
}

body.preview .seo-card-link p,
body.preview .seo-card-link span {
    color: var(--mute);
    font-size: 0.875rem;
    line-height: 1.45;
}

body.preview .seo-faq-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: none;
}

body.preview .seo-faq-item summary {
    color: var(--ink);
}

body.preview .seo-faq-item > div {
    color: var(--mute);
}

body.preview .seo-related-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
    color: var(--ink);
}

body.preview .seo-related-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    box-shadow: none;
}

body.preview .seo-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 36px 0 12px;
}

body.preview .seo-pagination-info,
body.preview .seo-empty {
    color: var(--mute);
    font-size: 0.875rem;
}

body.preview .seo-cover,
body.preview .blog-content .blog-figure img,
body.preview .blog-content img {
    border-color: var(--line);
}

body.preview .blog-content .blog-table-wrap {
    border-color: var(--line);
}

body.preview .blog-content thead th {
    background: var(--bg);
}

body.preview .blog-content tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--bg) 70%, #fff);
}

body.preview .blog-content tbody tr:hover {
    background: color-mix(in srgb, var(--banana) 18%, #fff);
}

/* —— FAQ (как на странице faq.html / style.css) —— */

body.preview .faq {
    padding: 64px 0 40px;
}

body.preview .faq .section-head {
    width: 100%;
    max-width: none;
}

body.preview .faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: none;
    min-width: 0;
}

body.preview .faq-item {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: clip;
    min-width: 0;
}

body.preview .faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    text-align: left;
    cursor: pointer;
}

body.preview .faq-icon {
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bg);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 200ms var(--ease-out), background-color 200ms ease;
}

body.preview .faq-item.active .faq-icon {
    transform: rotate(45deg);
    background: var(--banana);
}

body.preview .faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
}

body.preview .faq-item.active .faq-answer {
    grid-template-rows: 1fr;
}

body.preview .faq-answer-inner {
    min-height: 0;
    overflow: hidden;
}

body.preview .faq-item.active .faq-answer-inner {
    overflow: visible;
}

body.preview .faq-answer p {
    margin: 0;
    padding: 0 20px 18px;
    color: var(--mute);
    line-height: 1.6;
    width: 100%;
    max-width: none;
}

body.preview .faq-item.active .faq-answer p {
    padding-top: 4px;
}

body.preview .faq-answer a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* —— Footer —— */

body.preview .footer {
    margin-top: 40px;
    padding: 36px 0 120px;
    background: var(--ink);
    color: #f2f2ef;
    border-top: 0;
}

body.preview .footer a { color: #f2f2ef; }

body.preview .footer-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    gap: 20px;
    align-items: start;
}

body.preview .footer-center { text-align: center; }
body.preview .footer-right { text-align: right; }

body.preview .footer p {
    margin: 0 0 6px;
    font-size: 0.875rem;
    color: rgba(242, 242, 239, 0.72);
}

body.preview .footer a {
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 180ms ease, color 180ms ease;
}

body.preview .footer a:hover {
    color: #fff;
    border-bottom-color: var(--banana);
}

body.preview .draft-note {
    margin: 22px 0 0 !important;
    text-align: center;
    font-size: 0.75rem !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(242, 242, 239, 0.4) !important;
}

/* —— Auth modal bridge —— */

body.preview .auth-modal-content {
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

/* —— Generate / product pages —— */

body.preview .page-title,
body.preview h1.generate-title,
body.preview .generate-title {
    font-family: "Bricolage Grotesque", sans-serif !important;
    letter-spacing: -0.04em;
}

body.preview:has(.generate-section) {
    background: var(--bg);
}

body.preview .generate-section {
    padding: 20px 0 16px;
    background: transparent;
    min-height: calc(100dvh - 64px);
}

body.preview .generate-title {
    margin: 0 auto 14px;
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    color: var(--ink);
    max-width: 100%;
}

body.preview .generate-lede {
    margin: 0 auto 28px;
    color: var(--mute);
    max-width: 42ch;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
    text-wrap: pretty;
}

body.preview .generate-form {
    max-width: min(960px, 100%);
}

body.preview .generate-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}

body.preview .generate-box:focus-within {
    border-color: color-mix(in srgb, var(--banana-deep) 55%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--banana) 35%, transparent);
}

body.preview .generate-box.dragover {
    border-color: var(--banana-deep);
    background: color-mix(in srgb, var(--banana) 12%, #fff);
}

body.preview .generate-select {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
}

body.preview .generate-select:focus {
    outline: 2px solid color-mix(in srgb, var(--banana) 70%, transparent);
    outline-offset: 1px;
    border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
}

body.preview .generate-label-inline {
    color: var(--mute);
}

body.preview .generate-textarea {
    color: var(--ink);
    font-family: inherit;
}

body.preview .generate-textarea::placeholder {
    color: color-mix(in srgb, var(--mute) 75%, transparent);
}

body.preview .generate-prompt-clear {
    color: var(--mute);
    border-radius: 10px;
}

body.preview .generate-prompt-clear:hover {
    color: var(--ink);
    background: var(--bg);
}

body.preview .generate-box-bottom {
    border-top-color: var(--line);
}

body.preview .generate-btn-gallery,
body.preview .generate-btn-prompt-picker {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
    transition: transform 160ms var(--ease-out), border-color 160ms ease, background-color 160ms ease;
}

body.preview .generate-btn-gallery:hover,
body.preview .generate-btn-prompt-picker:hover {
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    background: var(--surface);
}

body.preview .generate-btn-gallery:active,
body.preview .generate-btn-prompt-picker:active {
    transform: scale(0.97);
}

body.preview .generate-btn-gallery-count {
    background: var(--ink);
    color: var(--banana);
}

body.preview .aspect-icon {
    border-color: var(--line);
}

body.preview .aspect-icon:hover,
body.preview .aspect-icon.active {
    border-color: var(--ink);
    background: color-mix(in srgb, var(--banana) 28%, transparent);
}

body.preview .btn-generate {
    margin-top: 8px;
    border-radius: var(--btn-radius);
    background: var(--banana);
    border: 1px solid color-mix(in srgb, var(--banana-deep) 55%, var(--banana));
    color: var(--ink);
    font-weight: 700;
}

body.preview .btn-generate:hover {
    background: var(--banana-deep);
}

/* История генераций — всегда видна в черновике; auth.js больше не прячет её */
body.preview .generate-history-link-wrap {
    display: block !important;
    margin-top: 12px;
    margin-bottom: 0;
    text-align: center;
    flex-shrink: 0;
}

body.preview .generate-history-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    background: var(--surface);
    color: var(--ink) !important;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: transform 160ms var(--ease-out), border-color 160ms ease, background-color 160ms ease;
}

body.preview .generate-history-link:hover {
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    background: var(--bg);
    color: var(--ink) !important;
}

body.preview .generate-history-link:active {
    transform: scale(0.97);
}

body.preview .result-container {
    max-width: min(960px, 100%);
    margin-top: 32px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}

body.preview .result-title {
    font-family: "Bricolage Grotesque", sans-serif;
    letter-spacing: -0.03em;
    color: var(--ink);
}

body.preview .result-image {
    border-radius: 10px;
    border: 1px solid var(--line);
}

body.preview .generate-loading-overlay {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(6px);
}

body.preview .loading-text {
    color: var(--ink);
    font-weight: 600;
}

body.preview .loading-hint {
    color: var(--mute);
}

body.preview .loading-spinner {
    border-color: var(--line);
    border-top-color: var(--banana-deep);
}

body.preview .prompt-library-box,
body.preview .tokens-modal-content,
body.preview .error-modal-content,
body.preview .prompt-modal-box {
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

/* —— Prompts library page —— */

body.preview:has(.prompts-section) {
    background: var(--bg);
}

body.preview .prompts-section {
    padding: 40px 0 72px;
    min-height: 60vh;
    background: transparent;
}

body.preview .prompts-page-title {
    margin: 0 0 10px;
    font-family: "Bricolage Grotesque", sans-serif;
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.05;
    color: var(--ink);
}

body.preview .prompts-page-description {
    margin: 0 0 28px;
    max-width: none;
    color: var(--mute);
    font-size: 1rem;
    line-height: 1.5;
    white-space: nowrap;
}

body.preview .prompts-filters {
    margin-bottom: 22px;
}

body.preview .prompts-categories {
    display: none !important;
}

body.preview .prompts-category-select {
    border: 1px solid var(--line);
    border-radius: 12px;
    background-color: var(--surface);
    color: var(--ink);
    font-family: inherit;
}

body.preview .prompts-category-select-label {
    color: var(--mute);
}

body.preview .prompts-toolbar {
    margin-bottom: 0;
}

body.preview .prompts-search-toggle,
body.preview .prompts-search-close,
body.preview .prompts-sort-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
    transition: transform 160ms var(--ease-out), border-color 160ms ease, background-color 160ms ease;
}

body.preview .prompts-search-toggle {
    border-radius: 12px;
}

body.preview .prompts-search-toggle:hover,
body.preview .prompts-search-close:hover,
body.preview .prompts-sort-btn:hover {
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    color: var(--ink);
}

body.preview .prompts-search-toggle.is-active,
body.preview .prompts-sort-btn.active {
    background: var(--banana);
    border-color: color-mix(in srgb, var(--banana-deep) 55%, var(--banana));
    color: var(--ink);
}

body.preview .prompts-search-drawer .prompts-search-input {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font-family: inherit;
}

body.preview .prompts-search-drawer .prompts-search-input:focus {
    outline: 2px solid color-mix(in srgb, var(--banana) 70%, transparent);
    outline-offset: 1px;
    border-color: color-mix(in srgb, var(--ink) 22%, var(--line));
    box-shadow: none;
}

body.preview .prompts-sort-btn {
    border-radius: 12px;
}

body.preview .prompts-grid {
    gap: 14px;
}

body.preview .prompts-grid .prompt-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
    transition: transform 200ms var(--ease-out), border-color 200ms ease, box-shadow 200ms ease;
}

body.preview .prompts-grid .prompt-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--ink) 28%, var(--line));
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

body.preview .prompts-grid .prompt-thumbnail-wrap,
body.preview .prompts-grid .prompt-thumbnail-placeholder {
    background: var(--bg);
}

body.preview .prompts-grid .prompt-card-title {
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.02em;
}

body.preview .prompts-grid .prompt-card-category {
    color: var(--mute);
    font-weight: 600;
}

body.preview .prompts-grid .prompt-card-desc {
    color: var(--mute);
}

body.preview .prompts-empty {
    color: var(--mute);
}

body.preview .prompt-modal-box {
    background: var(--surface);
}

body.preview .prompt-modal-title {
    font-family: "Bricolage Grotesque", sans-serif;
    letter-spacing: -0.03em;
    color: var(--ink);
}

body.preview .prompt-modal-close {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink);
}

body.preview .prompt-modal-description,
body.preview .prompt-modal-prompt-label,
body.preview .prompt-modal-category {
    color: var(--mute);
}

body.preview .prompt-modal-prompt-text {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
}

body.preview .prompt-modal-actions .btn-primary,
body.preview .copy-prompt-btn {
    background: var(--banana) !important;
    border-color: color-mix(in srgb, var(--banana-deep) 55%, var(--banana)) !important;
    color: var(--ink) !important;
}

/* —— Mobile bottom nav —— */

body.preview .mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    body.preview .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 60;
        height: calc(64px + env(safe-area-inset-bottom, 0));
        padding: 6px 8px env(safe-area-inset-bottom, 0);
        align-items: stretch;
        justify-content: space-around;
        background: color-mix(in srgb, var(--surface) 92%, transparent);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        border-top: 1px solid var(--line);
    }

    body.preview.has-mobile-bottom-nav {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
    }

    body.preview .mobile-bottom-nav__item {
        flex: 1 1 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: var(--mute);
        font-size: 10px;
        font-weight: 500;
    }

    body.preview .mobile-bottom-nav__item.is-active {
        color: var(--ink);
    }

    body.preview .mobile-bottom-nav__icon {
        display: flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
    }

    body.preview .mobile-bottom-nav__icon svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    body.preview .mobile-bottom-nav__item--create {
        flex: 0 0 auto;
        transform: translateY(-10px);
    }

    body.preview .mobile-bottom-nav__create-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--banana) !important;
        color: var(--ink) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    }

    body.preview .mobile-bottom-nav__create-btn svg {
        width: 26px;
        height: 26px;
        fill: currentColor;
        stroke: none;
    }
}

/* —— Responsive —— */

@media (max-width: 1100px) {
    .model-grid,
    .can-do {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .prices {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .hero {
        min-height: 0;
        padding: 18px 0 32px;
        align-items: start;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-visual {
        order: -1;
        align-items: center;
        justify-content: center;
        width: 100%;
    }

    .hero-stage {
        --stage-h: min(360px, 48svh);
        --stage-w: min(72vw, calc(var(--stage-h) * 3 / 4));
        width: min(100%, calc(var(--stage-w) * 1.42));
        align-self: center;
    }

    .stage-photo {
        max-width: none;
        margin-right: calc(var(--stage-w) * 0.42);
    }

    .stage-card[data-slot="3"] {
        display: none;
    }

    .stage-task {
        font-size: 0.9rem;
        width: 100%;
    }

    .hero h1 {
        max-width: none;
        font-size: clamp(2.15rem, 9.5vw, 3.2rem);
        margin-inline: auto;
        text-wrap: balance;
    }

    /* Мобильный hero: по центру, не прилипает к левому краю */
    .hero-copy {
        text-align: center;
        padding-inline: 4px;
    }

    .lede {
        margin-inline: auto;
        max-width: 34ch;
    }

    .hero-actions {
        justify-content: center;
    }

    .trust {
        grid-template-columns: 1fr;
        width: max-content;
        max-width: 100%;
        margin-inline: auto;
        gap: 12px;
        text-align: left;
    }

    .lookbook,
    .how,
    .model-grid,
    .can-do {
        grid-template-columns: 1fr;
    }

    .prices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-head {
        flex-direction: column;
        align-items: start;
    }

    .section-head p {
        text-align: left;
        max-width: none;
        flex: none;
    }

    .models .section-head p {
        white-space: normal;
    }

    .cta-band-inner { padding: 28px 20px; }

    body.preview .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
    }

    body.preview .footer-center,
    body.preview .footer-right { text-align: left; }
}

@media (max-width: 860px) {
    /* Больше воздуха у краёв на телефоне */
    :root {
        --edge: clamp(32px, 8vw, 44px);
    }

    body.preview .nav {
        gap: 8px;
        position: relative;
    }

    /* Перебиваем style.css: width:100% + left:0 → меню уезжало вправо */
    body.preview .nav-menu,
    body.preview .nav-menu.active {
        display: none;
        position: fixed;
        top: calc(64px + env(safe-area-inset-top, 0px));
        left: max(var(--edge), env(safe-area-inset-left, 0px));
        right: max(var(--edge), env(safe-area-inset-right, 0px));
        width: auto;
        max-width: none;
        flex-direction: column;
        gap: 0;
        padding: 8px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 16px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.1);
        z-index: 60;
        align-items: stretch;
    }

    body.preview .nav-menu.active { display: flex; }

    body.preview .nav-menu li { width: 100%; }

    body.preview .nav-menu a {
        display: block;
        padding: 12px 14px;
        border-radius: 10px;
    }

    body.preview .nav-menu a:hover {
        background: var(--bg);
    }

    body.preview .nav-menu a::after { display: none; }

    body.preview .mobile-menu-toggle {
        display: inline-flex;
        margin-left: 0;
    }

    /* После авторизации: баланс + «Создать фото» не влезают — короткая подпись */
    body.preview #profileButton {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 12px;
    }

    body.preview #profileButton .btn-label-extra {
        display: none;
    }

    body.preview .user-balance {
        padding: 6px 8px;
        font-size: 0.75rem;
        max-width: min(42vw, 11.5rem);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.preview .generate-title {
        font-size: clamp(1.2rem, 5vw, 1.4rem);
        letter-spacing: -0.035em;
        white-space: nowrap;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    body.preview .generate-section > .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding-inline: 0;
    }

    body.preview .generate-form {
        max-width: none;
        width: 100%;
        padding: 0;
    }

    body.preview .generate-box {
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: var(--surface);
    }

    body.preview .generate-box:focus-within {
        border-color: transparent !important;
        box-shadow: none !important;
    }

    body.preview .generate-box.dragover {
        background: color-mix(in srgb, var(--banana) 12%, transparent);
    }
}

@media (max-width: 768px) {
    /* Профиль / История: без карточки-рамки, меньше отступ сверху */
    body.preview .profile-section,
    body.preview .history-section {
        padding: 12px 0 24px;
        background: var(--bg);
    }

    body.preview .profile-section > .container,
    body.preview .history-section > .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding-inline: 0;
    }

    body.preview .profile-container,
    body.preview .history-container {
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 12px max(16px, var(--edge)) 20px;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    body.preview .profile-title,
    body.preview .history-title {
        margin-bottom: 16px;
        text-align: left;
        font-size: 1.5rem;
    }

    body.preview .history-notice {
        margin-bottom: 16px;
        text-align: left;
    }

    body.preview .profile-info {
        padding: 14px;
    }

    body.preview #userEmail {
        text-align: left;
        font-size: 0.9375rem;
    }

    body.preview .info-item {
        flex-wrap: wrap;
        gap: 4px 12px;
        align-items: flex-start;
    }

    /* База промптов: без подписи, категории — select */
    body.preview .prompts-section {
        padding: 16px 0 24px;
    }

    body.preview .prompts-page-title {
        margin-bottom: 14px;
        font-size: 1.5rem;
    }

    body.preview .prompts-page-description {
        display: none;
    }

    body.preview .prompts-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    body.preview .prompts-category-select-label {
        display: block;
    }

    body.preview .prompts-categories-wrap {
        max-width: none;
        height: auto;
    }

    body.preview .prompts-toolbar {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 560px) {
    .hero-actions .btn-large {
        width: 100%;
    }

    .cmp-handle::before {
        width: 42px;
        height: 42px;
    }

    /* Узкий экран + авторизация: освобождаем место под баланс и меню */
    body.preview .logo-text {
        display: none;
    }
}
