/* ============================================================================
   CherryChats v3 — дизайн-система нового макета.

   Подключается ПОСЛЕ style.css и по ходу переезда вытесняет его: старые
   правила остаются рабочими, пока соответствующий экран не переписан.
   Когда переедут все экраны, style.css выпиливается целиком.

   Токены взяты один в один из макета Claude Design (design/cherrychats-v3.html):
   фон #0a070c, вишня #e8455f, роза #ff9ab0, золото #f0cf9a.

   Три гарнитуры с разными ролями:
     Unbounded          — заголовки и имена, крупно и характерно;
     Onest              — весь остальной интерфейс;
     Cormorant Garamond — ТОЛЬКО действия персонажа в чате, курсивом.
   Это ключевая находка макета: действие визуально отделено от речи не цветом,
   а сменой гарнитуры на серифную. Не заменять на italic обычного шрифта.
   ========================================================================== */

/* ------------------------------- шрифты --------------------------------- */

@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap;
    src: url('../fonts/unbounded-cyrillic-600.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 600; font-display: swap;
    src: url('../fonts/unbounded-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap;
    src: url('../fonts/unbounded-cyrillic-700.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 700; font-display: swap;
    src: url('../fonts/unbounded-latin-700.woff2') format('woff2'); }

@font-face { font-family: 'Onest'; font-weight: 400; font-display: swap;
    src: url('../fonts/onest-cyrillic-400.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 400; font-display: swap;
    src: url('../fonts/onest-latin-400.woff2') format('woff2'); }
@font-face { font-family: 'Onest'; font-weight: 600; font-display: swap;
    src: url('../fonts/onest-cyrillic-600.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 600; font-display: swap;
    src: url('../fonts/onest-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Onest'; font-weight: 700; font-display: swap;
    src: url('../fonts/onest-cyrillic-700.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-weight: 700; font-display: swap;
    src: url('../fonts/onest-latin-700.woff2') format('woff2'); }

@font-face { font-family: 'CherryFict'; font-weight: 400; font-style: italic; font-display: swap;
    src: url('../fonts/cormorant-cyrillic-400-italic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'CherryFict'; font-weight: 400; font-style: italic; font-display: swap;
    src: url('../fonts/cormorant-latin-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'CherryFict'; font-weight: 600; font-style: italic; font-display: swap;
    src: url('../fonts/cormorant-cyrillic-600-italic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'CherryFict'; font-weight: 600; font-style: italic; font-display: swap;
    src: url('../fonts/cormorant-latin-600-italic.woff2') format('woff2'); }

/* ------------------------------- токены --------------------------------- */

:root {
    --bg: #0a070c;
    --panel: #15101a;
    --panel2: #1d1622;
    --cherry: #e8455f;
    --rose: #ff9ab0;
    --gold: #f0cf9a;
    --ink: #fff;
    --dim: rgba(255, 255, 255, .62);
    --faint: rgba(255, 255, 255, .36);
    --line: rgba(255, 255, 255, .09);
    --line2: rgba(255, 255, 255, .16);

    --disp: 'Unbounded', system-ui, sans-serif;
    --ui: 'Onest', system-ui, sans-serif;
    --fict: 'CherryFict', Georgia, serif;

    /* Радиусы макета: экранные блоки 24, карточки 20, чипы 999 */
    --r-sheet: 24px;
    --r-card: 20px;
    --r-tile: 18px;
    --r-ctl: 14px;

    /* Старые переменные проекта приводим к новой палитре, чтобы ещё не
       переписанные экраны не светили прежним фиолетово-розовым */
    --text-color: var(--ink);
    --muted-color: var(--dim);
    --border-color: var(--line);
    --card-border-radius: var(--r-card);
}

/* --------------------------- базовая типографика ------------------------- */

body.cherry-v3,
body.cherry-v3 input,
body.cherry-v3 textarea,
body.cherry-v3 button,
body.cherry-v3 select {
    font-family: var(--ui);
}

body.cherry-v3 {
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.cherry-v3 .v3-disp {
    font-family: var(--disp);
    font-weight: 700;
    letter-spacing: -.035em;
}

/* Мелкие подписи-метки: везде в макете одинаковые, 9.5–10px, капсом,
   с большим трекингом. Вынесено, чтобы не повторять в каждом блоке. */
.cherry-v3 .v3-label {
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
}

/* ----------------------------- общие элементы ---------------------------- */

.cherry-v3 .v3-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .09em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.cherry-v3 .v3-chip.is-on {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}

.cherry-v3 .v3-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--r-sheet);
}

.cherry-v3 .v3-btn {
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: var(--r-ctl);
    background: var(--cherry);
    color: #fff;
    font-family: var(--ui);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: opacity .18s ease, transform .12s ease;
}
.cherry-v3 .v3-btn:active { transform: scale(.985); }
.cherry-v3 .v3-btn:disabled {
    background: var(--panel2);
    color: var(--faint);
    cursor: not-allowed;
}

/* Баланс вишен: золотой чип с вишнёвой точкой, как в шапке витрины */
.cherry-v3 .v3-balance {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--r-ctl);
    border: 1px solid rgba(240, 207, 154, .3);
    background: rgba(240, 207, 154, .09);
    color: var(--gold);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.cherry-v3 .v3-balance::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cherry);
}

/* --------------------------- нижняя навигация ---------------------------- */
/* В макете это не иконки, а пять слов в тёмной капсуле. Активная вкладка
   подсвечена панелью, остальные приглушены. Иконок нет намеренно. */

.cherry-v3 .v3-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-bottom, 0px));
    z-index: 60;
    display: flex;
    gap: 2px;
    padding: 6px;
    border-radius: 22px;
    background: rgba(21, 16, 26, .92);
    border: 1px solid var(--line);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.cherry-v3 .v3-nav-item {
    flex: 1;
    padding: 11px 0;
    border: 0;
    border-radius: 16px;
    background: none;
    color: var(--faint);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: color .18s ease, background .18s ease;
}
.cherry-v3 .v3-nav-item.is-on {
    background: var(--panel2);
    color: var(--ink);
}

/* Экраны с нижним меню оставляют под него воздух */
.cherry-v3 .v3-screen {
    padding-bottom: 104px;
}

/* ------------------------------- статусбар ------------------------------- */
/* Верхняя строка макета: время слева, cherrychats по центру, 18+ справа.
   В Telegram время рисует система, поэтому оставляем только середину. */

.cherry-v3 .v3-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .22);
}


/* ============================== ВИТРИНА ==================================== */
/* Экран «Кто сегодня». Сверху заголовок с поиском и балансом, под ним три
   плитки категорий (активная шире остальных за счёт flex), большая «сцена
   ночи», подборка сеткой 2 в ряд и кнопка создания своего персонажа. */

.cherry-v3 .v3-vitrina {
    display: flex;
    flex-direction: column;
    gap: 18px;
    /* Панель навигации висит fixed поверх контента: 104px не хватало,
       имя и подпись последнего ряда карточек уезжали под неё */
    padding-bottom: 132px;
}

.cherry-v3 .v3-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 20px 0;
}
.cherry-v3 .v3-head-title {
    flex: 1;
    font-family: var(--disp);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -.035em;
}
/* Логотип в шапке витрины: круглая марка из аватарки бота + название */
.cherry-v3 .v3-head-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.cherry-v3 .v3-head-logo {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 110, 230, .45);
}
.cherry-v3 .v3-icon-btn {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--r-ctl);
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    font-size: 15px;
    cursor: pointer;
}

/* --- плитки категорий: активная раздаётся вширь --- */
.cherry-v3 .v3-cats {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    height: 92px;
}
.cherry-v3 .v3-cat {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--r-tile);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    display: block;
    text-align: left;
    transition: flex .35s cubic-bezier(.2, .8, .2, 1);
    background:
        repeating-linear-gradient(108deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 8px, transparent 8px, transparent 16px),
        radial-gradient(120% 110% at 50% 0%, #2a2233, #17101f);
}
.cherry-v3 .v3-cat.is-on { flex: 1.7; border-color: rgba(232, 69, 95, .6); }
.cherry-v3 .v3-cat[data-cat="female"] { background:
    repeating-linear-gradient(108deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 8px, transparent 8px, transparent 16px),
    radial-gradient(120% 110% at 30% 0%, #8d2c48, #1c0f16); }
.cherry-v3 .v3-cat[data-cat="male"] { background:
    repeating-linear-gradient(108deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 8px, transparent 8px, transparent 16px),
    radial-gradient(120% 110% at 60% 0%, #512f66, #171020); }
.cherry-v3 .v3-cat[data-cat="world"] { background:
    repeating-linear-gradient(108deg, rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 8px, transparent 8px, transparent 16px),
    radial-gradient(120% 110% at 50% 0%, #27455b, #101820); }

.cherry-v3 .v3-cat::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,7,12,.92), rgba(10,7,12,.55));
}
.cherry-v3 .v3-cat.is-on::before {
    background: linear-gradient(to top, rgba(10,7,12,.88), rgba(10,7,12,.1));
}
.cherry-v3 .v3-cat-body {
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.cherry-v3 .v3-cat-name {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -.03em;
    color: var(--dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cherry-v3 .v3-cat.is-on .v3-cat-name { color: #fff; }
.cherry-v3 .v3-cat-count {
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255,255,255,.34);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cherry-v3 .v3-cat.is-on .v3-cat-count { color: var(--rose); }
.cherry-v3 .v3-cat-dot {
    position: absolute;
    right: 11px;
    top: 11px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cherry);
    box-shadow: 0 0 0 4px rgba(232, 69, 95, .25);
}

/* --- «сцена ночи» --- */
.cherry-v3 .v3-hero-wrap { padding: 0 20px; }
.cherry-v3 .v3-hero {
    width: 100%;
    height: 300px;
    padding: 0;
    border: 0;
    border-radius: var(--r-sheet);
    overflow: hidden;
    position: relative;
    display: block;
    text-align: left;
    cursor: pointer;
    background-size: cover;
    background-position: center top;
}
.cherry-v3 .v3-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10,7,12,.96) 2%, rgba(10,7,12,.25) 55%, transparent);
}
.cherry-v3 .v3-hero-tag {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(10,7,12,.62);
    backdrop-filter: blur(10px);
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rose);
}
.cherry-v3 .v3-hero-body {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cherry-v3 .v3-hero-name {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -.035em;
}
.cherry-v3 .v3-hero-desc {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,.72);
}
.cherry-v3 .v3-hero-meta {
    display: flex;
    gap: 9px;
    align-items: center;
    margin-top: 3px;
}
.cherry-v3 .v3-hero-author {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.22);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.8);
}
.cherry-v3 .v3-hero-likes {
    font-weight: 600;
    font-size: 11.5px;
    color: var(--rose);
}

/* --- строка раздела --- */
.cherry-v3 .v3-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 20px;
    /* На 320px заголовок выдавливал чипы за экран: пусть переносится сам */
    flex-wrap: wrap;
}
.cherry-v3 .v3-section-title {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -.03em;
    min-width: 0;
}
.cherry-v3 .v3-section-tabs {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: auto;
}

/* --- сетка карточек --- */
.cherry-v3 .v3-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 20px;
}
.cherry-v3 .v3-card {
    padding: 0;
    border: 0;
    background: var(--panel);
    border-radius: var(--r-card);
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
}
.cherry-v3 .v3-card-img {
    position: relative;
    display: block;
    /* Обложка — span внутри flex-колонки: без явной ширины он схлопывался
       в ноль, и аватарки персонажей не показывались вовсе */
    width: 100%;
    flex: 0 0 auto;
    height: 172px;
    background-size: cover;
    background-position: center top;
}
.cherry-v3 .v3-card-likes {
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(10,7,12,.68);
    backdrop-filter: blur(8px);
    font-weight: 600;
    font-size: 10px;
    color: var(--rose);
}
.cherry-v3 .v3-card-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(10,7,12,.72);
    backdrop-filter: blur(8px);
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gold);
}
.cherry-v3 .v3-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 13px 14px;
}
.cherry-v3 .v3-card-name {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 15px;
    line-height: 1.15;
    letter-spacing: -.03em;
    color: var(--ink);
}
/* Высота описания зафиксирована: иначе соседние карточки разной высоты */
.cherry-v3 .v3-card-desc {
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--faint);
    height: 32px;
    overflow: hidden;
}
.cherry-v3 .v3-card-src {
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- кнопка «свой персонаж» --- */
.cherry-v3 .v3-create-row { display: flex; gap: 10px; padding: 2px 20px 0; }
.cherry-v3 .v3-create {
    flex: 1;
    height: 52px;
    border-radius: 16px;
    border: 1px solid var(--line2);
    background: var(--panel);
    color: var(--ink);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cherry-v3 .v3-create em { color: var(--cherry); font-size: 16px; font-style: normal; }

.cherry-v3 .v3-empty {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: var(--faint);
    font-size: 13px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
}


/* ================================ ПОИСК ==================================== */
/* Оверлей поверх витрины: поле, теги «часто ищут» и список строками.
   Список именно строками, а не плиткой: в поиске важно быстро пробежать
   глазами имена, а не рассматривать картинки. */

.cherry-v3 .v3-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: calc(12px + var(--tg-safe-area-top, 0px));
    overflow-y: auto;
    animation: v3-fade .18s ease both;
}
@keyframes v3-fade { from { opacity: 0; } to { opacity: 1; } }

.cherry-v3 .v3-search-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}
.cherry-v3 .v3-search-input {
    flex: 1;
    height: 44px;
    padding: 0 16px;
    border-radius: var(--r-ctl);
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-family: var(--ui);
    font-size: 14px;
    outline: none;
}
.cherry-v3 .v3-search-input::placeholder { color: var(--faint); }
.cherry-v3 .v3-search-input:focus { border-color: rgba(232, 69, 95, .45); }

.cherry-v3 .v3-search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 20px;
}

.cherry-v3 .v3-search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 20px 40px;
}
.cherry-v3 .v3-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    cursor: pointer;
    text-align: left;
}
.cherry-v3 .v3-search-art {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background-size: cover;
    background-position: center top;
}
.cherry-v3 .v3-search-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.cherry-v3 .v3-search-name {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -.03em;
    color: var(--ink);
}
.cherry-v3 .v3-search-desc {
    font-size: 11.5px;
    line-height: 1.35;
    color: var(--faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cherry-v3 .v3-search-meta {
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--dim);
}


/* ================================= ЧАТ ===================================== */
/* Самый нестандартный экран макета. Отличия от обычного мессенджера:
   - пузырей нет вообще, реплики лежат прямо на фоне;
   - фон — размытый портрет персонажа под плотной вуалью;
   - действия персонажа набраны серифным курсивом по центру, речь слева;
   - свои реплики прижаты вправо и отбиты вишнёвой чертой справа;
   - три шкалы отношений стоят вертикальными полосами у правого края;
   - под лентой лента подсказок-действий, у части из них указана цена.
   Правый отступ ленты 92px — это место под шкалы, трогать осторожно. */

.cherry-v3 .v3-chat {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    overflow: hidden;
}

/* Фон: портрет персонажа и вуаль поверх него */
.cherry-v3 .v3-chat-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    filter: blur(2px);
    transform: scale(1.04);
}
.cherry-v3 .v3-chat-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(10,7,12,.5) 0%, rgba(10,7,12,.9) 30%, rgba(10,7,12,.97) 100%);
}

/* --- шапка --- */
.cherry-v3 .v3-chat-head {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 22px;
    margin-top: var(--tg-safe-area-top, 0px);
}
.cherry-v3 .v3-chat-back {
    background: none;
    border: 0;
    color: var(--dim);
    font-size: 17px;
    cursor: pointer;
    padding: 0;
}
/* Имя — кнопка (открывает меню сцены), поэтому сбрасываем вид кнопки */
.cherry-v3 .v3-chat-name {
    background: none;
    border: 0;
    padding: 0;
    color: var(--ink);
    cursor: pointer;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
    text-align: left;
}
.cherry-v3 .v3-chat-spacer { flex: 1; }
/* Модель и её цена за реплику — подчёркнутая золотая надпись, не кнопка */
.cherry-v3 .v3-chat-model {
    background: none;
    border: 0;
    border-bottom: 1px solid rgba(240, 207, 154, .5);
    color: var(--gold);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0 0 3px;
    white-space: nowrap;
}

/* --- шкалы отношений: вертикальные полосы у правого края --- */
.cherry-v3 .v3-bars {
    position: absolute;
    right: 20px;
    top: calc(110px + var(--tg-safe-area-top, 0px));
    bottom: 172px;
    display: flex;
    gap: 11px;
    z-index: 2;
    pointer-events: none;
}
.cherry-v3 .v3-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
/* Заливка задаётся инлайново через градиент с точкой перелома в проценте */
.cherry-v3 .v3-bar-line {
    flex: 1;
    width: 2px;
    display: block;
    transition: background .5s ease;
}
.cherry-v3 .v3-bar-value {
    font-weight: 600;
    font-size: 8.5px;
}
.cherry-v3 .v3-bar-label {
    font-weight: 600;
    font-size: 7.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
    writing-mode: vertical-rl;
    height: 62px;
    overflow: hidden;
}

/* --- лента сообщений --- */
/* Короткий диалог прижимаем к низу, как в макете. Но именно
   justify-content: flex-end при длинной переписке съедает верх ленты
   (прокрутить к началу невозможно), поэтому прижим делает margin-top: auto
   у первого сообщения — см. .v3-feed > *:first-child ниже */
.cherry-v3 .v3-feed {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 10px 92px 14px 24px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
/* Прижимаем содержимое ленты к низу, не ломая прокрутку */
.cherry-v3 .v3-feed > *:first-child { margin-top: auto; }

.cherry-v3 .v3-msg {
    display: flex;
    flex-direction: column;
    gap: 9px;
    /* Лента — flex-колонка, и по умолчанию дети сжимаются: 29 реплик
       складывались в один экран вместо прокрутки, старые были недоступны */
    flex: 0 0 auto;
    animation: v3-msg-in .4s ease both;
}
@keyframes v3-msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.cherry-v3 .v3-msg.from-char { align-items: flex-start; }
.cherry-v3 .v3-msg.from-user { align-items: flex-end; }

/* Действие персонажа: серифный курсив по центру. Не менять на italic
   обычного шрифта — на этом держится всё разделение речи и действия. */
.cherry-v3 .v3-act {
    font-family: var(--fict);
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    color: var(--rose);
    text-align: center;
    width: 100%;
}

.cherry-v3 .v3-say {
    border: 0;
    background: none;
    color: #fff;
    padding: 0;
    font-family: var(--ui);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    text-align: left;
    cursor: pointer;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
}
/* Своя реплика: мельче, приглушена и отбита вишнёвой чертой справа */
.cherry-v3 .v3-msg.from-user .v3-say {
    border-right: 2px solid var(--cherry);
    color: rgba(255,255,255,.68);
    padding: 2px 13px 2px 0;
    font-size: 15px;
    font-weight: 400;
    text-align: right;
}

.cherry-v3 .v3-meta {
    display: flex;
    gap: 9px;
    align-items: center;
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint);
}
/* Дельта отношений у своей реплики: сразу видно, что сказал не то */
.cherry-v3 .v3-delta { color: rgba(240, 207, 154, .8); }
.cherry-v3 .v3-delta.is-up { color: var(--rose); }
.cherry-v3 .v3-meta-voice { color: var(--rose); }

.cherry-v3 .v3-msg img {
    max-width: 100%;
    border-radius: var(--r-card);
    display: block;
}

/* Кнопки над сообщением появляются по тапу, а не висят всегда */
.cherry-v3 .v3-msg-tools {
    display: none;
    gap: 14px;
    align-items: center;
}
.cherry-v3 .v3-msg.is-open .v3-msg-tools { display: flex; }
.cherry-v3 .v3-msg-tool {
    background: none;
    border: 0;
    padding: 0;
    color: var(--faint);
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}
.cherry-v3 .v3-msg-tool:active { color: var(--rose); }

/* --- подсказки-действия --- */
.cherry-v3 .v3-hints {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    display: flex;
    gap: 18px;
    padding: 0 24px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cherry-v3 .v3-hints::-webkit-scrollbar { display: none; }
.cherry-v3 .v3-hint {
    flex: 0 0 auto;
    background: none;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.2);
    padding: 0 0 4px;
    cursor: pointer;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.6);
    white-space: nowrap;
}
/* Подсказка с ценой выделена: за неё спишут вишни */
.cherry-v3 .v3-hint.is-paid {
    border-bottom-color: var(--cherry);
    color: #fff;
}

/* --- композер --- */
.cherry-v3 .v3-composer {
    position: relative;
    z-index: 3;
    flex: 0 0 auto;
    padding: 0 24px calc(26px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.cherry-v3 .v3-composer-row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    border-top: 1px solid var(--line2);
    padding-top: 14px;
}
.cherry-v3 .v3-input {
    flex: 1;
    min-height: 32px;
    max-height: 120px;
    border: 0;
    background: none;
    color: var(--ink);
    font-family: var(--ui);
    font-size: 15px;
    outline: none;
    resize: none;
    line-height: 1.4;
    padding: 4px 0;
}
.cherry-v3 .v3-input::placeholder { color: var(--faint); }
.cherry-v3 .v3-send {
    flex: 0 0 auto;
    background: none;
    border: 0;
    color: var(--cherry);
    font-size: 21px;
    cursor: pointer;
    padding: 0 0 4px;
}
.cherry-v3 .v3-send:disabled { color: var(--faint); cursor: default; }
.cherry-v3 .v3-composer-foot {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .v3-composer-balance { color: var(--gold); }

/* Индикатор набора: те же три точки, но без пузыря */
.cherry-v3 .v3-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .v3-typing i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rose);
    display: inline-block;
    animation: v3-dot 1.2s infinite;
}
.cherry-v3 .v3-typing i:nth-child(3) { animation-delay: .15s; }
.cherry-v3 .v3-typing i:nth-child(4) { animation-delay: .3s; }
@keyframes v3-dot { 0%, 60%, 100% { opacity: .22; } 30% { opacity: 1; } }


/* ============================== ПЕРСОНАЖ =================================== */
/* Портрет на 440px, поверх него назад и счётчик симпатий, снизу бейдж автора
   и крупное имя. Дальше три плитки статистики, описание, чипы черт, блок
   автора с подпиской и «первая реплика». CTA прижат к низу поверх градиента,
   рядом с ним модель и её цена за реплику. */

.cherry-v3 .v3-char {
    display: flex;
    flex-direction: column;
    /* min-height: 100vh запирал содержимое: карточка не прокручивалась,
       и всё ниже чипов характера было недоступно */
    min-height: 100%;
    background: var(--bg);
}

/* --- портрет --- */
.cherry-v3 .v3-char-hero {
    position: relative;
    height: 440px;
    flex: 0 0 auto;
    background-size: cover;
    background-position: center top;
}
.cherry-v3 .v3-char-hero-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg) 2%, rgba(10,7,12,.3) 52%, rgba(10,7,12,.45));
}
.cherry-v3 .v3-char-initial {
    position: absolute;
    left: 50%;
    top: 30%;
    transform: translate(-50%, -50%);
    font-family: var(--disp);
    font-weight: 700;
    font-size: 64px;
    color: rgba(255,255,255,.2);
}
/* Кнопки поверх портрета: стекло с блюром, чтобы читались на любом фото */
.cherry-v3 .v3-char-back,
.cherry-v3 .v3-char-like {
    position: absolute;
    top: calc(12px + var(--tg-safe-area-top, 0px));
    height: 40px;
    border-radius: var(--r-ctl);
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(10,7,12,.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    z-index: 2;
}
.cherry-v3 .v3-char-back {
    left: 18px;
    width: 40px;
    font-size: 16px;
    padding: 0;
}
.cherry-v3 .v3-char-like {
    right: 18px;
    padding: 0 14px;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cherry-v3 .v3-char-like.is-on { color: var(--cherry); border-color: rgba(232,69,95,.55); }
.cherry-v3 .v3-char-like:disabled { opacity: .55; cursor: default; }

.cherry-v3 .v3-char-cap {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
}
.cherry-v3 .v3-char-author-badge {
    align-self: flex-start;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(232,69,95,.2);
    border: 1px solid rgba(232,69,95,.5);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rose);
}
.cherry-v3 .v3-char-title {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.02;
    letter-spacing: -.04em;
    margin: 0;
}

/* --- тело --- */
.cherry-v3 .v3-char-body {
    /* снизу место под CTA-панель (86px) и навигацию (70px): иначе кнопка
       «Начать сцену» ложится поверх чипов характера */
    padding: 18px 20px 250px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Три плитки статистики в ряд */
.cherry-v3 .v3-char-stats {
    display: flex;
    gap: 8px;
}
.cherry-v3 .v3-stat {
    flex: 1;
    padding: 13px;
    border-radius: 16px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.cherry-v3 .v3-stat-value {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -.03em;
}
.cherry-v3 .v3-stat-label {
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--faint);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cherry-v3 .v3-char-desc {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255,255,255,.84);
    text-wrap: pretty;
    margin: 0;
}
.cherry-v3 .v3-char-desc + .v3-char-desc { color: var(--dim); font-size: 13.5px; }

.cherry-v3 .v3-char-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.cherry-v3 .v3-trait {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    padding: 8px 12px;
    font-size: 11.5px;
    color: var(--dim);
}

/* Блок автора с подпиской */
.cherry-v3 .v3-char-author {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: 18px;
    background: var(--panel);
    cursor: pointer;
}
.cherry-v3 .v3-char-ava {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(140deg, #8d2c48, #1d101a);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cherry-v3 .v3-char-ava img { width: 100%; height: 100%; object-fit: cover; }
.cherry-v3 .v3-char-author-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.cherry-v3 .v3-char-author-name {
    font-weight: 600;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cherry-v3 .v3-char-author-subs { font-size: 11px; color: var(--faint); }
/* Белая кнопка — единственная такая на экране, поэтому и заметна */
.cherry-v3 .v3-follow {
    flex: 0 0 auto;
    border: 1px solid #fff;
    background: #fff;
    color: var(--bg);
    border-radius: 12px;
    padding: 11px 14px;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}
.cherry-v3 .v3-follow.is-on {
    background: none;
    color: var(--dim);
    border-color: var(--line2);
}

/* Первая реплика — та же типографика, что в чате */
.cherry-v3 .v3-char-first {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
}
.cherry-v3 .v3-char-first-label {
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .v3-char-first-act {
    font-family: var(--fict);
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
    color: var(--rose);
}
.cherry-v3 .v3-char-first-say { font-size: 15px; line-height: 1.5; }

/* Плашка модерации на месте CTA */
.cherry-v3 .v3-char-warn {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(240,207,154,.09);
    border: 1px solid rgba(240,207,154,.3);
    font-size: 13px;
    line-height: 1.5;
    color: var(--gold);
}

/* --- нижняя панель с CTA --- */
/* fixed, а не sticky: тело экрана скроллится под ней, а кнопка всегда на месте */
.cherry-v3 .v3-char-cta-bar {
    position: fixed;
    /* left/right + margin:auto не центрируют fixed-блок, поэтому ширину
       задаём через left:50% и сдвиг — иначе панель уезжает влево */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    bottom: 0;
    z-index: 30;
    /* над навигацией: таббар фиксирован снизу и перекрывал кнопку */
    padding: 16px 20px calc(86px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-bottom, 0px));
    background: linear-gradient(to top, var(--bg) 62%, transparent);
    display: flex;
    gap: 11px;
    align-items: center;
    box-sizing: border-box;
}
.cherry-v3 .v3-char-cta {
    flex: 1;
    height: 56px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(100deg, var(--cherry), #b23a8f);
    color: #fff;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.02em;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(232,69,95,.32);
}
.cherry-v3 .v3-char-cta:disabled { opacity: .55; cursor: default; box-shadow: none; }
.cherry-v3 .v3-char-cta.is-locked {
    background: none;
    border: 1px solid var(--line2);
    color: var(--dim);
    box-shadow: none;
}
.cherry-v3 .v3-char-price {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.6;
    color: var(--faint);
}
.cherry-v3 .v3-char-price b { display: block; color: var(--gold); font-weight: 600; }


/* =============================== СЦЕНЫ ===================================== */
/* Список диалогов. Строка — обложка 62×82, имя, время, последняя реплика
   и три тонкие шкалы отношений. Если последним говорил персонаж, строка
   подсвечена вишнёвым и реплика набрана серифным курсивом: сразу видно,
   где ждут ответа. */

.cherry-v3 .v3-scenes {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 96px;
}

.cherry-v3 .v3-scenes-head {
    flex: 0 0 auto;
    padding: 8px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cherry-v3 .v3-scenes-title {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -.035em;
}
.cherry-v3 .v3-scenes-count {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
    white-space: nowrap;
}

.cherry-v3 .v3-scenes-list {
    flex: 0 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cherry-v3 .v3-scene {
    position: relative;
    display: flex;
    gap: 13px;
    align-items: stretch;
    padding: 12px;
    border: 0;
    border-radius: 20px;
    background: var(--panel);
    cursor: pointer;
    text-align: left;
    color: inherit;
    font-family: var(--ui);
    width: 100%;
    box-sizing: border-box;
}
/* Ждут ответа — вишнёвая подложка вместо серой панели */
.cherry-v3 .v3-scene.is-unread { background: rgba(232, 69, 95, .1); }
.cherry-v3 .v3-scene.is-pressed { opacity: .6; }
.cherry-v3 .v3-scene.is-gone {
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity .22s ease, transform .22s ease;
}

.cherry-v3 .v3-scene-ava {
    flex: 0 0 auto;
    position: relative;
    width: 62px;
    height: 82px;
    border-radius: 14px;
    display: block;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.cherry-v3 .v3-scene-ava img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cherry-v3 .v3-scene-initial {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--disp);
    font-weight: 700;
    font-size: 24px;
    color: rgba(255,255,255,.4);
}
/* Счётчик непрочитанного вылезает за угол обложки */
.cherry-v3 .v3-scene-badge {
    position: absolute;
    right: -4px;
    top: -4px;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    background: var(--cherry);
    border: 2px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    color: #fff;
    z-index: 2;
}

.cherry-v3 .v3-scene-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    align-self: center;
}
.cherry-v3 .v3-scene-top {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}
.cherry-v3 .v3-scene-name {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 15.5px;
    letter-spacing: -.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cherry-v3 .v3-scene-time {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint);
    white-space: nowrap;
}
.cherry-v3 .v3-scene-last {
    flex: 0 0 auto;
    font-size: 12.5px;
    line-height: 1.45;
    color: rgba(255,255,255,.62);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Реплика персонажа — тем же серифным курсивом, что и действия в чате */
.cherry-v3 .v3-scene-last.is-char {
    font-family: var(--fict);
    font-style: italic;
    color: var(--rose);
}

/* Три шкалы отношений полосками под репликой */
.cherry-v3 .v3-scene-bars {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    align-items: center;
}
.cherry-v3 .v3-scene-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,.1);
    display: block;
    overflow: hidden;
}
.cherry-v3 .v3-scene-bar i {
    display: block;
    height: 100%;
    transition: width .4s ease;
}

/* Удаление: крестик поверх строки, проявляется по наведению/тапу */
.cherry-v3 .v3-scene-del {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 9px;
    background: rgba(10,7,12,.55);
    color: var(--faint);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s ease;
}
.cherry-v3 .v3-scene:hover .v3-scene-del,
.cherry-v3 .v3-scene:focus-within .v3-scene-del { opacity: 1; }
.cherry-v3 .v3-scene-del:active { color: var(--cherry); }

/* Скелетоны первой загрузки */
.cherry-v3 .v3-scene-skel { pointer-events: none; }
.cherry-v3 .v3-scene-skel .v3-scene-ava,
.cherry-v3 .v3-skel-line {
    background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.1), rgba(255,255,255,.05));
    background-size: 200% 100%;
    animation: v3-skel 1.3s infinite linear;
}
.cherry-v3 .v3-skel-line { height: 10px; border-radius: 5px; }
@keyframes v3-skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Пустое состояние */
.cherry-v3 .v3-scenes-empty {
    padding: 56px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.cherry-v3 .v3-scenes-empty-title {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 19px;
    letter-spacing: -.03em;
}
.cherry-v3 .v3-scenes-empty-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--dim);
}


/* ============================== СОЗДАНИЕ =================================== */
/* Пять шагов по одному на экран. Сверху шапка с ценой и полоска прогресса,
   дальше «шаг N из 5», заголовок, подсказка и поля. Снизу «Назад/Дальше»,
   на последнем шаге — «Создать». Поля формы и их id не менялись: submit
   собирает форму по id, поэтому шаги только показывают и прячут секции. */

.cherry-v3 .v3-create-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity .25s ease;
}
.cherry-v3 .v3-create-screen.show { opacity: 1; }

.cherry-v3 .v3-cr-top {
    flex: 0 0 auto;
    padding: calc(6px + var(--tg-safe-area-top, 0px)) 20px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
}
.cherry-v3 .v3-cr-back {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    font-size: 15px;
    cursor: pointer;
    padding: 0;
}
.cherry-v3 .v3-cr-title {
    flex: 1;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -.03em;
    min-width: 0;
}
.cherry-v3 .v3-cr-price {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(240,207,154,.1);
    border: 1px solid rgba(240,207,154,.3);
    font-weight: 600;
    font-size: 11px;
    color: var(--gold);
    white-space: nowrap;
}

/* Полоска прогресса: одна черта на шаг */
.cherry-v3 .v3-cr-progress {
    flex: 0 0 auto;
    display: flex;
    gap: 5px;
    padding: 0 20px 20px;
}
.cherry-v3 .v3-cr-progress i {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,.12);
    transition: background .3s ease;
}
.cherry-v3 .v3-cr-progress i.is-on { background: var(--cherry); }

.cherry-v3 .v3-cr-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.cherry-v3 .v3-cr-scroll form {
    min-height: 100%;
    padding: 0 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Шаг: показан только текущий */
.cherry-v3 .v3-cr-step { display: none; flex-direction: column; gap: 22px; }
.cherry-v3 .v3-cr-step.is-on { display: flex; }

.cherry-v3 .v3-cr-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cherry-v3 .v3-cr-kicker {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--cherry);
}
.cherry-v3 .v3-cr-h {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.1;
    letter-spacing: -.04em;
}
.cherry-v3 .v3-cr-sub {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--faint);
}

.cherry-v3 .v3-cr-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.cherry-v3 .v3-cr-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cherry-v3 .v3-cr-field > label,
.cherry-v3 .v3-cr-label {
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .v3-cr-field input[type="text"],
.cherry-v3 .v3-cr-field input[type="url"],
.cherry-v3 .v3-cr-field textarea,
.cherry-v3 .v3-cr-field select {
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-family: var(--ui);
    font-size: 14px;
    padding: 14px 15px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
/* Имя набирается дисплейным шрифтом — это главное поле формы */
.cherry-v3 .v3-cr-field input#character-name {
    height: 52px;
    padding: 0 15px;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -.03em;
}
.cherry-v3 .v3-cr-field input:focus,
.cherry-v3 .v3-cr-field textarea:focus { border-color: var(--line2); }
.cherry-v3 .v3-cr-field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.cherry-v3 .v3-cr-field small,
.cherry-v3 .v3-cr-hint {
    font-size: 11px;
    line-height: 1.5;
    color: var(--faint);
}
.cherry-v3 .v3-cr-hint.is-warn { color: var(--gold); }

/* Сегменты «Девушка / Парень / Мир» */
.cherry-v3 .v3-cr-seg { display: flex; gap: 8px; }
.cherry-v3 .v3-cr-seg label {
    flex: 1;
    height: 46px;
    border-radius: 13px;
    cursor: pointer;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 13px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cherry-v3 .v3-cr-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cherry-v3 .v3-cr-seg label:has(input:checked) {
    border-color: #fff;
    background: #fff;
    color: var(--bg);
}

/* Выбор вселенной */
.cherry-v3 .v3-cr-universe {
    height: 52px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-family: var(--ui);
    font-size: 14px;
    padding: 0 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}
.cherry-v3 .v3-cr-universe span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-cr-universe-caret { color: var(--faint); flex: 0 0 auto; }

/* Обложка персонажа */
.cherry-v3 .v3-cr-ava-row { display: flex; gap: 14px; align-items: flex-start; }
.cherry-v3 .v3-cr-ava-frame {
    flex: 0 0 auto;
    width: 96px;
    height: 124px;
    border-radius: var(--r-tile);
    border: 1px dashed var(--line2);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.cherry-v3 .v3-cr-ava-frame img { width: 100%; height: 100%; object-fit: cover; }
.cherry-v3 .v3-cr-ava-frame.is-filled { border-style: solid; }
.cherry-v3 .v3-cr-ava-empty { font-size: 22px; opacity: .45; }
.cherry-v3 .v3-cr-ava-ctrl {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.cherry-v3 .v3-cr-file-input { display: none; }
.cherry-v3 .v3-cr-file-btn {
    height: 46px;
    border-radius: 13px;
    border: 1px solid var(--line2);
    background: none;
    color: var(--ink);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.cherry-v3 .v3-cr-spoiler summary {
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
    cursor: pointer;
    padding: 6px 0;
}
.cherry-v3 .v3-cr-spoiler input { margin-top: 8px; }

/* Переключатель публичности */
.cherry-v3 .v3-cr-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--panel);
    cursor: pointer;
}
.cherry-v3 .v3-cr-switch-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
    font-size: 13.5px;
    min-width: 0;
}
.cherry-v3 .v3-cr-switch-text em {
    font-style: normal;
    font-weight: 400;
    font-size: 11.5px;
    color: var(--faint);
}
/* Тумблер: дорожка и кружок, положение задаёт :checked у скрытого инпута */
.cherry-v3 .v3-cr-switch {
    flex: 0 0 auto;
    position: relative;
    width: 46px;
    height: 27px;
    display: block;
}
.cherry-v3 .v3-cr-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cherry-v3 .v3-cr-switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    transition: background .2s ease;
}
.cherry-v3 .v3-cr-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}
.cherry-v3 .v3-cr-switch input:checked + .v3-cr-switch-track { background: var(--cherry); }
.cherry-v3 .v3-cr-switch input:checked + .v3-cr-switch-track::after { transform: translateX(19px); }

/* Редактор подробного описания */
.cherry-v3 .v3-cr-quill .ql-toolbar {
    border-color: var(--line) !important;
    border-radius: 13px 13px 0 0;
    background: var(--panel);
}
.cherry-v3 .v3-cr-quill .ql-container {
    border-color: var(--line) !important;
    border-radius: 0 0 13px 13px;
    background: var(--panel);
    font-family: var(--ui);
    color: var(--ink);
}
.cherry-v3 .v3-cr-quill .ql-editor.ql-blank::before { color: var(--faint); font-style: normal; }
.cherry-v3 .v3-cr-quill .ql-stroke { stroke: var(--dim); }
.cherry-v3 .v3-cr-quill .ql-fill { fill: var(--dim); }
.cherry-v3 .v3-cr-quill .ql-picker-label { color: var(--dim); }

/* --- нижняя навигация шагов --- */
.cherry-v3 .v3-cr-foot {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px) + var(--tg-safe-area-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--bg);
}
.cherry-v3 .v3-cr-prev {
    flex: 0 0 auto;
    min-width: 96px;
    height: 54px;
    border-radius: 16px;
    border: 1px solid var(--line2);
    background: none;
    color: var(--dim);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.cherry-v3 .v3-cr-next {
    flex: 1;
    height: 54px;
    border-radius: 16px;
    border: 0;
    background: linear-gradient(100deg, var(--cherry), #b23a8f);
    color: #fff;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -.02em;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(232,69,95,.28);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}
.cherry-v3 .v3-cr-next:disabled { opacity: .55; cursor: default; box-shadow: none; }
.cherry-v3 .v3-cr-next b {
    font-family: var(--ui);
    font-weight: 600;
    font-size: 11px;
    opacity: .8;
}

/* --- редактирование: статус модерации --- */
/* Экран правки — та же форма, но одним скроллом: юзер обычно меняет одно
   поле, гонять его по пяти шагам незачем. Сверху статус проверки. */
.cherry-v3 .v3-cr-edit .v3-cr-step { display: flex; }
.cherry-v3 .v3-cr-mod {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
}
.cherry-v3 .v3-cr-badge {
    align-self: flex-start;
    padding: 6px 11px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.cherry-v3 .v3-cr-badge.is-approved {
    background: rgba(120, 220, 160, .14);
    border: 1px solid rgba(120, 220, 160, .38);
    color: #86e0b0;
}
.cherry-v3 .v3-cr-badge.is-pending {
    background: rgba(240, 207, 154, .12);
    border: 1px solid rgba(240, 207, 154, .34);
    color: var(--gold);
}
.cherry-v3 .v3-cr-badge.is-rejected {
    background: rgba(232, 69, 95, .14);
    border: 1px solid rgba(232, 69, 95, .42);
    color: var(--cherry);
}
.cherry-v3 .v3-cr-mod-comment p {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--dim);
}
.cherry-v3 .v3-cr-ghost {
    align-self: flex-start;
    border: 1px solid var(--line2);
    background: none;
    color: var(--ink);
    border-radius: 12px;
    padding: 11px 14px;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}


/* =============================== КЛУБ ====================================== */
/* Заголовок с подзаголовком, горизонтальная лента авторов с подпиской,
   дальше «свежее от авторов» — строки с обложкой 74×96 и лайком справа.
   Лента авторов собирается на фронте из тех же персонажей: отдельной
   ручки с топом авторов на бэке нет. */

.cherry-v3 .v3-club {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 96px;
}

.cherry-v3 .v3-club-head { flex: 0 0 auto; padding: 8px 20px 0; }
.cherry-v3 .v3-club-title {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -.035em;
}
.cherry-v3 .v3-club-sub {
    font-size: 12.5px;
    color: var(--faint);
    margin-top: 7px;
}

/* --- лента авторов --- */
.cherry-v3 .v3-authors {
    flex: 0 0 auto;
    display: flex;
    gap: 10px;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cherry-v3 .v3-authors::-webkit-scrollbar { display: none; }
.cherry-v3 .v3-author {
    flex: 0 0 auto;
    width: 132px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 9px;
    align-items: flex-start;
    color: inherit;
    text-align: left;
    font-family: var(--ui);
    box-sizing: border-box;
}
.cherry-v3 .v3-author-ava {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
    overflow: hidden;
    flex: 0 0 auto;
}
.cherry-v3 .v3-author-ava img { width: 100%; height: 100%; object-fit: cover; }
.cherry-v3 .v3-author-name {
    font-weight: 600;
    font-size: 13px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-author-meta { font-size: 10.5px; color: var(--faint); }
/* Кнопка подписки: белая, пока не подписан; контурная — когда уже да */
.cherry-v3 .v3-author-btn {
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid #fff;
    background: #fff;
    color: var(--bg);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 10.5px;
    cursor: pointer;
}
.cherry-v3 .v3-author-btn.is-on {
    border-color: rgba(255,255,255,.16);
    background: transparent;
    color: rgba(255,255,255,.5);
}

.cherry-v3 .v3-club-label {
    flex: 0 0 auto;
    padding: 0 20px;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}

/* --- строки персонажей --- */
.cherry-v3 .v3-club-list {
    flex: 0 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cherry-v3 .v3-club-row {
    display: flex;
    gap: 13px;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: var(--panel);
}
.cherry-v3 .v3-club-cover {
    flex: 0 0 auto;
    width: 74px;
    height: 96px;
    border-radius: 14px;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    position: relative;
}
.cherry-v3 .v3-club-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cherry-v3 .v3-club-initial {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--disp);
    font-weight: 700;
    font-size: 26px;
    color: rgba(255,255,255,.4);
}
.cherry-v3 .v3-club-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.cherry-v3 .v3-club-name {
    flex: 0 0 auto;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.03em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-club-desc {
    flex: 0 0 auto;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--faint);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Подпись прижата к низу строки: так она встаёт вровень с кнопкой лайка */
.cherry-v3 .v3-club-src {
    flex: 0 0 auto;
    margin-top: auto;
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-club-like {
    flex: 0 0 auto;
    align-self: flex-end;
    border: 1px solid var(--line2);
    border-radius: 14px;
    background: transparent;
    padding: 10px 11px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255,255,255,.5);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 10.5px;
}
.cherry-v3 .v3-club-like.is-on { color: var(--cherry); border-color: rgba(232,69,95,.45); }

/* Плашка «на проверке» у своих неодобренных */
.cherry-v3 .v3-club-badge {
    position: absolute;
    left: 4px;
    right: 4px;
    top: 4px;
    padding: 3px 5px;
    border-radius: 7px;
    background: rgba(10,7,12,.82);
    font-weight: 600;
    font-size: 7.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--gold);
    text-align: center;
    /* Обложка узкая: длинная подпись переносилась и наезжала на картинку */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =============================== КАССА ===================================== */
/* Баланс с пересчётом в реплики, сетка пакетов 2×2 с бейджами, блок Cherry+
   и способы оплаты. Пересчёт считается по цене за реплику выбранной модели:
   абстрактные «вишни» юзеру ничего не говорят, а «хватит на 413 реплик» —
   говорит. */

.cherry-v3 .v3-shop {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 96px;
}
.cherry-v3 .v3-shop-title {
    flex: 0 0 auto;
    padding: 8px 20px 0;
    font-family: var(--disp);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -.035em;
}

/* --- баланс --- */
.cherry-v3 .v3-balance-wrap { flex: 0 0 auto; padding: 0 20px; }
.cherry-v3 .v3-balance-card {
    padding: 18px;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(240,207,154,.25);
}
.cherry-v3 .v3-balance-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 140% at 0% 0%, rgba(232,69,95,.3), rgba(240,207,154,.05));
}
.cherry-v3 .v3-balance-row {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.cherry-v3 .v3-balance-label {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}
.cherry-v3 .v3-balance-value {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 34px;
    letter-spacing: -.04em;
    color: var(--gold);
    margin-top: 6px;
}
.cherry-v3 .v3-balance-note {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--dim);
    text-align: right;
}

.cherry-v3 .v3-shop-label {
    flex: 0 0 auto;
    padding: 0 20px;
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}

/* --- пакеты --- */
.cherry-v3 .v3-packs {
    flex: 0 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.cherry-v3 .v3-pack {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    cursor: pointer;
    text-align: left;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 7px;
    position: relative;
    font-family: var(--ui);
}
/* Выгодные пакеты обведены вишнёвым — на них и смотрят в первую очередь */
.cherry-v3 .v3-pack.is-best {
    border-color: rgba(232,69,95,.4);
    background: rgba(232,69,95,.09);
}
.cherry-v3 .v3-pack-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--cherry);
    color: #fff;
    font-weight: 700;
    font-size: 8.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.cherry-v3 .v3-pack-amount {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 21px;
    letter-spacing: -.04em;
    /* Место под бейдж «выгодно»: без отступа он наезжал на сумму */
    padding-right: 62px;
}
.cherry-v3 .v3-pack:not(.is-best) .v3-pack-amount { padding-right: 0; }
/* min-height держит цены на одной линии при разной длине подписи */
.cherry-v3 .v3-pack-note {
    font-size: 11px;
    line-height: 1.45;
    color: var(--faint);
    min-height: 32px;
}
.cherry-v3 .v3-pack-price {
    font-weight: 600;
    font-size: 14px;
    color: var(--gold);
}
/* Пока создаётся счёт — цена подменяется многоточием, повторные тапы глушим */
.cherry-v3 .v3-pack.is-buying { opacity: .6; pointer-events: none; }

/* --- Cherry+ --- */
.cherry-v3 .v3-plus-wrap { flex: 0 0 auto; padding: 0 20px; }
.cherry-v3 .v3-plus {
    padding: 20px;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(232,69,95,.4);
}
.cherry-v3 .v3-plus::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(108deg, rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 8px, transparent 8px, transparent 16px),
                radial-gradient(110% 100% at 5% 0%, #6d2140, #140c12);
}
.cherry-v3 .v3-plus-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cherry-v3 .v3-plus-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.cherry-v3 .v3-plus-name {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: -.04em;
}
.cherry-v3 .v3-plus-name em { font-style: normal; color: var(--cherry); }
.cherry-v3 .v3-plus-price {
    font-weight: 600;
    font-size: 13px;
    color: var(--gold);
    white-space: nowrap;
}
.cherry-v3 .v3-plus-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.cherry-v3 .v3-plus-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.cherry-v3 .v3-plus-item i {
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cherry);
    margin-top: 7px;
    display: block;
}
.cherry-v3 .v3-plus-item span {
    flex: 1;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,.86);
}
.cherry-v3 .v3-plus-cta {
    height: 52px;
    border-radius: 16px;
    border: 0;
    background: #fff;
    color: var(--bg);
    font-family: var(--disp);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -.02em;
    cursor: pointer;
}
.cherry-v3 .v3-plus-cta.is-active {
    background: transparent;
    border: 1px solid rgba(255,255,255,.3);
    color: var(--dim);
    cursor: default;
}

/* --- способы оплаты --- */
.cherry-v3 .v3-pay {
    flex: 0 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.cherry-v3 .v3-pay-row { display: flex; gap: 9px; }
.cherry-v3 .v3-pay-btn {
    flex: 1;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
    font-family: var(--ui);
}
.cherry-v3 .v3-pay-btn.is-on {
    border-color: #fff;
    background: #fff;
    color: var(--bg);
}
.cherry-v3 .v3-pay-btn b { font-weight: 600; font-size: 14px; }
.cherry-v3 .v3-pay-btn i { font-style: normal; font-size: 11px; color: var(--faint); }
.cherry-v3 .v3-pay-btn.is-on i { color: rgba(10,7,12,.55); }
.cherry-v3 .v3-pay-note {
    font-size: 11px;
    line-height: 1.6;
    color: var(--faint);
}
.cherry-v3 .v3-pay-note a { color: var(--rose); }


/* ============================== ПРОФИЛЬ ==================================== */
/* Шапка с ником, баланс с пополнением, ежедневный подарок со шкалой дней,
   модель по умолчанию, озвучка, промокод, рефералка, свои персонажи со
   статусами модерации и список ссылок. */

.cherry-v3 .v3-me {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 20px 96px;
}

/* --- шапка --- */
.cherry-v3 .v3-me-top {
    display: flex;
    align-items: center;
    gap: 13px;
    cursor: pointer;
}
.cherry-v3 .v3-me-ava {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #8d2c48, #1d101a);
    font-family: var(--disp);
    font-weight: 700;
    font-size: 21px;
}
.cherry-v3 .v3-me-ava img { width: 100%; height: 100%; object-fit: cover; }
.cherry-v3 .v3-me-info { min-width: 0; display: flex; flex-direction: column; }
.cherry-v3 .v3-me-name {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -.035em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-me-sub {
    font-size: 11.5px;
    color: var(--faint);
    margin-top: 4px;
}

/* --- баланс --- */
.cherry-v3 .v3-me-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border-radius: 18px;
    background: var(--panel);
}
/* Подпись и число — в колонку. span по умолчанию inline, поэтому колонку
   задаём явно на обёртке, иначе они встают в строку */
.cherry-v3 .v3-me-balance > div {
    display: flex;
    flex-direction: column;
}
.cherry-v3 .v3-me-balance-label {
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .v3-me-balance-value {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -.04em;
    color: var(--gold);
    margin-top: 4px;
}
.cherry-v3 .v3-me-topup {
    flex: 0 0 auto;
    border: 1px solid #fff;
    background: #fff;
    color: var(--bg);
    border-radius: 13px;
    padding: 12px 15px;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
}

/* --- ежедневный подарок --- */
.cherry-v3 .v3-me-gift {
    width: 100%;
    padding: 15px 16px;
    border-radius: 18px;
    border: 1px solid rgba(240,207,154,.28);
    background: rgba(240,207,154,.07);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 11px;
    font-family: var(--ui);
    color: inherit;
    text-align: left;
    box-sizing: border-box;
}
.cherry-v3 .v3-me-gift:disabled { opacity: .55; cursor: default; }
.cherry-v3 .v3-me-gift-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.cherry-v3 .v3-me-gift-text { font-weight: 600; font-size: 14px; }
.cherry-v3 .v3-me-gift-amount {
    font-weight: 600;
    font-size: 12.5px;
    color: var(--gold);
    white-space: nowrap;
}
/* Семь дней серии: пройденные залиты золотом, сегодняшний обведён */
.cherry-v3 .v3-me-days {
    display: flex;
    gap: 5px;
    width: 100%;
}
.cherry-v3 .v3-me-day {
    flex: 1 1 0;
    min-width: 0;
    height: 26px;
    border-radius: 8px;
    background: rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 10px;
    color: var(--faint);
}
.cherry-v3 .v3-me-day.is-done {
    background: rgba(240,207,154,.22);
    color: var(--gold);
}
.cherry-v3 .v3-me-day.is-now {
    background: var(--gold);
    color: var(--bg);
}

/* --- секции --- */
.cherry-v3 .v3-me-label {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .v3-me-sec {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.cherry-v3 .v3-me-hint {
    font-size: 11px;
    line-height: 1.5;
    color: var(--faint);
    margin: 0;
}

/* --- выбор модели --- */
.cherry-v3 .v3-model {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
    color: inherit;
    text-align: left;
    font-family: var(--ui);
    width: 100%;
    box-sizing: border-box;
}
.cherry-v3 .v3-model.is-on { border-color: var(--cherry); background: rgba(232,69,95,.09); }
/* Радио-точка: заливается вишнёвым у выбранной модели */
.cherry-v3 .v3-model-dot {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 1px solid var(--line2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cherry-v3 .v3-model.is-on .v3-model-dot { border-color: var(--cherry); }
.cherry-v3 .v3-model-dot i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: transparent;
    display: block;
}
.cherry-v3 .v3-model.is-on .v3-model-dot i { background: var(--cherry); }
.cherry-v3 .v3-model-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.cherry-v3 .v3-model-name { font-weight: 600; font-size: 14px; }
.cherry-v3 .v3-model-note {
    font-size: 11.5px;
    color: var(--faint);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-model-cost {
    flex: 0 0 auto;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--gold);
    white-space: nowrap;
}

/* --- промокод --- */
.cherry-v3 .v3-me-promo { display: flex; gap: 9px; }
.cherry-v3 .v3-me-promo input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--ink);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .06em;
    padding: 0 15px;
    outline: none;
    text-transform: uppercase;
}
.cherry-v3 .v3-me-promo input::placeholder { letter-spacing: .06em; color: var(--faint); }
.cherry-v3 .v3-me-promo button {
    flex: 0 0 auto;
    height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line2);
    background: none;
    color: var(--ink);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
}

/* --- рефералка --- */
.cherry-v3 .v3-me-ref {
    padding: 16px;
    border-radius: 20px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cherry-v3 .v3-me-ref-link {
    display: flex;
    align-items: center;
    gap: 9px;
}
.cherry-v3 .v3-me-ref-url {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-me-copy {
    flex: 0 0 auto;
    border: 1px solid var(--line2);
    background: none;
    color: var(--ink);
    border-radius: 11px;
    padding: 9px 12px;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 11.5px;
    cursor: pointer;
}
.cherry-v3 .v3-me-copy.is-done { color: var(--rose); border-color: rgba(255,154,176,.4); }
.cherry-v3 .v3-me-ref-stats { display: flex; gap: 9px; }
.cherry-v3 .v3-me-ref-stat {
    flex: 1;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.04);
}
.cherry-v3 .v3-me-ref-value {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -.03em;
}
.cherry-v3 .v3-me-ref-label {
    font-size: 10.5px;
    color: var(--faint);
    margin-top: 3px;
}

/* --- мои персонажи --- */
.cherry-v3 .v3-mine {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--panel);
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    border: 0;
    color: inherit;
    text-align: left;
    font-family: var(--ui);
}
.cherry-v3 .v3-mine-cover {
    flex: 0 0 auto;
    width: 38px;
    height: 48px;
    border-radius: 11px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.cherry-v3 .v3-mine-cover img { width: 100%; height: 100%; object-fit: cover; }
.cherry-v3 .v3-mine-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cherry-v3 .v3-mine-name {
    font-weight: 600;
    font-size: 13.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-mine-note {
    font-size: 11px;
    color: var(--faint);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-mine-status {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.cherry-v3 .v3-mine-status.is-approved {
    background: rgba(120,220,160,.14);
    color: #86e0b0;
}
.cherry-v3 .v3-mine-status.is-pending {
    background: rgba(240,207,154,.14);
    color: var(--gold);
}
.cherry-v3 .v3-mine-status.is-rejected {
    background: rgba(232,69,95,.16);
    color: var(--cherry);
}

/* --- ссылки --- */
.cherry-v3 .v3-me-links {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: var(--panel);
    overflow: hidden;
}
.cherry-v3 .v3-me-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    color: var(--ink);
    font-family: var(--ui);
    font-size: 13.5px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}
.cherry-v3 .v3-me-link:last-child { border-bottom: 0; }
.cherry-v3 a.v3-me-link { text-decoration: none; }
.cherry-v3 .v3-me-link span:last-child {
    color: var(--faint);
    font-size: 12px;
    white-space: nowrap;
}
.cherry-v3 .v3-me-link.is-danger { color: var(--cherry); }

/* --- секции озвучки и персон --- */
/* Эти две секции строятся общими хелперами settings2Section/settings2Row и
   переиспользуются как есть: переписывать TTS с его прослушкой голосов ради
   классов незачем. Здесь их старая вёрстка приводится к виду профиля v3. */
.cherry-v3 .settings2-section {
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.cherry-v3 .settings2-label {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .settings2-panel {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: var(--panel);
    overflow: hidden;
}
.cherry-v3 .settings2-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 13.5px;
    cursor: pointer;
    text-decoration: none;
}
.cherry-v3 .settings2-row:last-child { border-bottom: 0; }
.cherry-v3 .settings2-row.danger { color: var(--cherry); }
.cherry-v3 .settings2-value,
.cherry-v3 .settings2-row-value {
    color: var(--faint);
    font-size: 12px;
    white-space: nowrap;
}
.cherry-v3 .settings2-hint {
    font-size: 11px;
    line-height: 1.5;
    color: var(--faint);
    margin: 0;
    padding: 0 2px;
}
/* Чипы качества озвучки */
.cherry-v3 .settings2-tts-tiers {
    display: flex;
    gap: 8px;
    padding: 12px;
}
/* Чип качества озвучки: внутри три строки (название, описание, цена),
   поэтому фиксированная высота 42px ломала вёрстку — содержимое съезжало */
.cherry-v3 .settings2-tts-tier {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--dim);
    font-family: var(--ui);
    cursor: pointer;
    text-align: left;
}
.cherry-v3 .settings2-tts-tier b {
    font-weight: 600;
    font-size: 13px;
    color: var(--ink);
}
.cherry-v3 .settings2-tts-tier i {
    font-style: normal;
    font-size: 11px;
    color: var(--faint);
    line-height: 1.35;
}
.cherry-v3 .settings2-tts-tier em {
    font-style: normal;
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
}
.cherry-v3 .settings2-tts-tier.active b { color: var(--bg); }
.cherry-v3 .settings2-tts-tier.active i,
.cherry-v3 .settings2-tts-tier.active em { color: rgba(10,7,12,.65); }
.cherry-v3 .settings2-tts-tier.active {
    border-color: #fff;
    background: #fff;
    color: var(--bg);
}

/* Список голосов озвучки */
.cherry-v3 .settings2-voices {
    display: flex;
    flex-direction: column;
    padding: 0 0 8px;
}
.cherry-v3 .settings2-voices-group {
    padding: 12px 16px 6px;
    font-weight: 600;
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
}
.cherry-v3 .settings2-voice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 16px;
    font-size: 13.5px;
    cursor: pointer;
}
.cherry-v3 .settings2-voice.active { color: var(--rose); }
.cherry-v3 .tts-sample-btn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid var(--line2);
    background: none;
    color: var(--dim);
    font-size: 10px;
    cursor: pointer;
}
.cherry-v3 .tts-sample-btn.playing { color: var(--cherry); border-color: rgba(232,69,95,.45); }


/* ============================== КАДРЫ ====================================== */
/* Шапка с балансом, поле промта, пресеты-чипы, выбор модели с ценой и кнопка
   «Проявить». Галереи своих кадров нет: на бэкенде картинки нигде не
   хранятся, поэтому под кнопкой показывается результат последней генерации. */

.cherry-v3 .v3-frames {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0 20px 96px;
}

.cherry-v3 .v3-frames-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 6px 0 0;
}
.cherry-v3 .v3-frames-back {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    font-size: 15px;
    cursor: pointer;
    padding: 0;
}
.cherry-v3 .v3-frames-title {
    flex: 1;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -.03em;
    min-width: 0;
}
.cherry-v3 .v3-frames-balance {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(240,207,154,.1);
    border: 1px solid rgba(240,207,154,.3);
    font-weight: 600;
    font-size: 11px;
    color: var(--gold);
    white-space: nowrap;
}

/* --- промт --- */
.cherry-v3 .v3-frames-panel {
    padding: 14px;
    border-radius: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cherry-v3 .v3-frames-input {
    border: 0;
    background: none;
    color: var(--ink);
    font-family: var(--ui);
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    resize: none;
    min-height: 84px;
    max-height: 300px;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}
.cherry-v3 .v3-frames-input::placeholder { color: var(--faint); }

/* Пресеты дописываются к промту, а не заменяют его */
.cherry-v3 .v3-presets {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}
.cherry-v3 .v3-preset {
    border: 1px solid var(--line2);
    border-radius: 999px;
    background: none;
    color: var(--dim);
    padding: 7px 11px;
    font-family: var(--ui);
    font-weight: 600;
    font-size: 10.5px;
    cursor: pointer;
}
.cherry-v3 .v3-preset.is-on {
    border-color: var(--cherry);
    background: rgba(232,69,95,.12);
    color: #fff;
}

/* --- выбор модели --- */
.cherry-v3 .v3-frames-models { display: flex; gap: 8px; }
.cherry-v3 .v3-frames-model {
    flex: 1;
    padding: 13px 10px;
    border-radius: 15px;
    border: 1px solid var(--line);
    background: var(--panel);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    font-family: var(--ui);
    color: var(--dim);
    min-width: 0;
}
.cherry-v3 .v3-frames-model.is-on {
    border-color: var(--cherry);
    background: rgba(232,69,95,.1);
    color: #fff;
}
.cherry-v3 .v3-frames-model b {
    font-weight: 600;
    font-size: 12.5px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-frames-model i {
    font-style: normal;
    font-weight: 600;
    font-size: 11px;
    color: var(--gold);
}

.cherry-v3 .v3-frames-go {
    height: 54px;
    border-radius: 16px;
    border: 0;
    background: linear-gradient(100deg, var(--cherry), #b23a8f);
    color: #fff;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.02em;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(232,69,95,.28);
}
.cherry-v3 .v3-frames-go:disabled { opacity: .55; box-shadow: none; cursor: default; }
.cherry-v3 .v3-frames-quota {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--faint);
    text-align: center;
}
.cherry-v3 .v3-frames-tips summary {
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
    cursor: pointer;
    padding: 6px 0;
}
.cherry-v3 .v3-frames-tips p {
    font-size: 12px;
    line-height: 1.6;
    color: var(--dim);
    margin: 6px 0 0;
}
.cherry-v3 .v3-frames-result img {
    width: 100%;
    border-radius: var(--r-card);
    display: block;
}

/* ============================= ЗАСТАВКА ==================================== */
/* Экран 18+ перед входом: два подтверждения и кнопка. Без обоих галочек
   кнопка неактивна — согласие должно быть осознанным, а не «тапнул сквозь». */

.cherry-v3 .v3-gate,
.v3-gate {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg, #0a070c);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px 26px calc(34px + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
}
.v3-gate-bg {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(108deg, rgba(255,255,255,.035) 0, rgba(255,255,255,.035) 8px, transparent 8px, transparent 16px),
                radial-gradient(120% 80% at 50% 0%, #8d2c48, #2c1322 55%, #0a070c);
    opacity: .85;
}
.v3-gate-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.v3-gate-badge {
    align-self: flex-start;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(232,69,95,.2);
    border: 1px solid rgba(232,69,95,.5);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rose);
}
.v3-gate-title {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 38px;
    line-height: 1.05;
    letter-spacing: -.045em;
    color: #fff;
    margin: 0;
}
.v3-gate-title em { font-style: normal; color: var(--cherry); }
.v3-gate-text {
    font-family: var(--ui);
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,.62);
    margin: 0;
}
.v3-gate-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.v3-gate-check {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(21,16,26,.7);
    cursor: pointer;
    font-family: var(--ui);
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,.86);
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}
.v3-gate-check.is-on { border-color: rgba(232,69,95,.55); }
.v3-gate-box {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    margin-top: 1px;
}
.v3-gate-check.is-on .v3-gate-box {
    background: var(--cherry, #e8455f);
    border-color: var(--cherry, #e8455f);
    color: #fff;
}
.v3-gate-check a { color: var(--rose, #ff9ab0); }
.v3-gate-go {
    height: 56px;
    border-radius: 18px;
    border: 0;
    background: linear-gradient(100deg, var(--cherry, #e8455f), #b23a8f);
    color: #fff;
    font-family: var(--disp);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.02em;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(232,69,95,.32);
}
.v3-gate-go:disabled {
    background: none;
    border: 1px solid rgba(255,255,255,.16);
    color: rgba(255,255,255,.36);
    box-shadow: none;
    cursor: default;
}
.v3-gate-exit {
    text-align: center;
    font-family: var(--ui);
    font-size: 12px;
    color: rgba(255,255,255,.36);
}
.v3-gate-exit button {
    background: none;
    border: 0;
    color: var(--rose, #ff9ab0);
    font: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Готовый кадр: картинка появляется по загрузке, кнопки следом */
.cherry-v3 .v3-shot {
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.cherry-v3 .v3-shot-frame {
    border-radius: var(--r-card);
    overflow: hidden;
    background: var(--panel);
    min-height: 120px;
}
.cherry-v3 .v3-shot-img { width: 100%; display: block; }
.cherry-v3 .v3-shot-actions { display: flex; gap: 9px; }
.cherry-v3 .v3-shot-btn {
    flex: 1;
    height: 46px;
    border-radius: 14px;
    border: 1px solid var(--line2);
    background: none;
    color: var(--ink);
    font-family: var(--ui);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}
.cherry-v3 .v3-shot-btn.is-accent {
    border-color: var(--cherry);
    background: rgba(232,69,95,.14);
}

/* Блок заданий: та же строка, что у своих персонажей, но без обложки.
   Отдельный класс, чтобы его не считали персонажем при обходе списка. */
.cherry-v3 .v3-me-task { border: 1px solid var(--line); }

/* Пустое обязательное поле на шаге создания */
.cherry-v3 .v3-cr-field input.is-empty,
.cherry-v3 .v3-cr-field textarea.is-empty {
    border-color: var(--cherry);
    background: rgba(232,69,95,.07);
}


/* ========================== ПРОФИЛЬ АВТОРА ================================= */
/* Открывается из клуба по клику на автора. Шапка с аватаром и подпиской,
   две плитки статистики, дальше его персонажи строками клуба — отдельной
   карточки для них не заводим, вид тот же. */

.cherry-v3 .v3-user {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 20px 96px;
}
.cherry-v3 .v3-user-top {
    display: flex;
    align-items: center;
    gap: 13px;
}
.cherry-v3 .v3-user-back {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--dim);
    font-size: 15px;
    cursor: pointer;
    padding: 0;
}
.cherry-v3 .v3-user-head {
    display: flex;
    align-items: center;
    gap: 13px;
}
.cherry-v3 .v3-user-ava {
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, #8d2c48, #1d101a);
    font-family: var(--disp);
    font-weight: 700;
    font-size: 23px;
}
.cherry-v3 .v3-user-ava img { width: 100%; height: 100%; object-fit: cover; }
.cherry-v3 .v3-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cherry-v3 .v3-user-name {
    font-family: var(--disp);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -.035em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cherry-v3 .v3-user-stats { display: flex; gap: 8px; }
.cherry-v3 .v3-user-stat {
    flex: 1;
    padding: 13px;
    border-radius: 16px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cherry-v3 .v3-user-stat-value {
    font-family: var(--disp);
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -.03em;
}
.cherry-v3 .v3-user-stat-label {
    font-weight: 600;
    font-size: 9px;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--faint);
}

/* Правка своей реплики прямо в ленте */
.cherry-v3 .v3-edit {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line2);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    color: var(--ink);
    font-family: var(--ui);
    font-size: 15px;
    line-height: 1.45;
    padding: 10px 12px;
    outline: none;
    resize: none;
    min-height: 44px;
}
.cherry-v3 .v3-edit:focus { border-color: var(--cherry); }
.cherry-v3 .v3-edit-row {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    padding-top: 6px;
}

/* --- композер: перебиваем старый style.css --- */
/* Поле и кнопка отправки носят id (#message-input, #send-button) — на них
   завязана логика отправки, менять нельзя. Старый style.css вешает на этот
   id рамку, фон и псевдоэлемент-стрелку, и по специфичности id выигрывает
   у класса. Поэтому здесь v3-composer перебивает его теми же id. */
.cherry-v3 .v3-composer textarea#message-input,
.cherry-v3 textarea.v3-input {
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    padding: 4px 0 !important;
    min-height: 32px;
    max-height: 120px;
}
.cherry-v3 .v3-composer button#send-button,
.cherry-v3 button.v3-send {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--cherry) !important;
    padding: 0 0 4px !important;
    font-size: 21px;
}
/* Старый CSS дорисовывал кнопке собственную стрелку через ::before */
.cherry-v3 .v3-composer button#send-button::before,
.cherry-v3 button.v3-send::before { content: none !important; }
.cherry-v3 .v3-composer button#send-button:disabled,
.cherry-v3 button.v3-send:disabled { color: var(--faint) !important; }

/* Реплика — button (чтобы работал тап по сообщению), а старый style.css
   скругляет все кнопки на 16px: вишнёвая черта у своей реплики из-за этого
   выгибалась скобкой. Возвращаем прямые углы. */
.cherry-v3 .v3-msg .v3-say,
.cherry-v3 .v3-msg .v3-act {
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Строки-ссылки профиля и поле промта в кадрах — тоже button и textarea,
   и старый style.css скругляет их по-своему: ссылки внутри общей панели
   расходились углами, поле промта получало «хвостик» чат-пузыря */
.cherry-v3 .v3-me-links .v3-me-link {
    border-radius: 0 !important;
    background: none !important;
}
.cherry-v3 .v3-frames-panel .v3-frames-input {
    border-radius: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}


/* ======================== ПК И ШИРОКИЕ ЭКРАНЫ ============================== */
/* Интерфейс рисовался под телефон, на десктопе всё растягивалось во всю
   ширину: реплика персонажа у левого края, своя у правого, между ними
   полэкрана пустоты — читать невозможно. Здесь ограничиваем ширину колонок
   и сближаем реплики. */

@media (min-width: 720px) {
    /* Весь контент держим в колонке телефонной ширины по центру */
    .cherry-v3 .page-container {
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Чат занимает весь экран, поэтому центрируем его внутренности отдельно */
    .cherry-v3 .v3-chat-head,
    .cherry-v3 .v3-hints,
    .cherry-v3 .v3-composer {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .cherry-v3 .v3-feed {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        box-sizing: border-box;
        /* справа место под шкалы отношений, как на телефоне */
        padding: 10px 104px 14px 28px;
        gap: 20px;
    }

    /* Реплики не разъезжаются по краям: обе колонки уже и ближе к центру */
    .cherry-v3 .v3-msg.from-char,
    .cherry-v3 .v3-msg.from-user {
        max-width: 78%;
    }
    .cherry-v3 .v3-msg.from-char { align-self: flex-start; }
    .cherry-v3 .v3-msg.from-user { align-self: flex-end; }

    /* Действие персонажа центрируется по своей колонке, а не по всей ленте */
    .cherry-v3 .v3-act { text-align: left; }

    /* Шкалы прижимаем к колонке чата, а не к краю монитора */
    .cherry-v3 .v3-bars {
        right: calc(50% - 360px + 24px);
    }

    /* Нижняя навигация прижималась к краям монитора, растягиваясь на всю
       ширину — держим её в той же колонке, что и контент */
    .cherry-v3 .v3-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 560px;
    }

    /* Портрет персонажа в чате на широком экране перебивал текст: вуаль
       рассчитывалась под узкий телефон. Здесь гасим фон сильнее и сужаем
       его до колонки чата, чтобы реплики читались */
    .cherry-v3 .v3-chat-bg {
        left: 50%;
        transform: translateX(-50%) scale(1.04);
        width: 100%;
        max-width: 720px;
    }
    .cherry-v3 .v3-chat-veil {
        background: linear-gradient(rgba(10,7,12,.72) 0%, rgba(10,7,12,.94) 28%, rgba(10,7,12,.985) 100%);
    }
}

/* Сетка витрины расширяется только когда колонка реально шире: при
   max-width 560px три карточки давали 145px и обрезанную обложку */
@media (min-width: 1000px) {
    .cherry-v3 .page-container.v3-vitrina { max-width: 760px; }
    .cherry-v3 .v3-vitrina .v3-grid { grid-template-columns: repeat(3, 1fr); }
    .cherry-v3 .v3-vitrina ~ .v3-nav,
    .cherry-v3 .v3-nav { max-width: 760px; }
}

@media (min-width: 1360px) {
    .cherry-v3 .page-container.v3-vitrina { max-width: 980px; }
    .cherry-v3 .v3-vitrina .v3-grid { grid-template-columns: repeat(4, 1fr); }
    .cherry-v3 .v3-nav { max-width: 980px; }
}

/* Темперамент персонажа в карточке: насколько его легко расположить */
.cherry-v3 .v3-char-temper {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(240, 207, 154, .08);
    border: 1px solid rgba(240, 207, 154, .22);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--gold);
}

/* Вишенка рядом с суммами: без неё числа читаются как абстрактные очки */
.cherry-v3 .v3-cherry {
    display: inline-block;
    margin-right: 5px;
    font-size: .82em;
    line-height: 1;
    vertical-align: baseline;
}
.cherry-v3 .v3-balance-value .v3-cherry,
.cherry-v3 .v3-me-balance-value .v3-cherry { font-size: .55em; margin-right: 7px; }
.cherry-v3 .v3-pack-amount .v3-cherry { font-size: .6em; margin-right: 5px; }

/* Кружок-аватарка автора в подписи карточки */
.cherry-v3 .v3-card-src,
.cherry-v3 .v3-hero-author {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.cherry-v3 .v3-author-dot {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    display: inline-block;
}
.cherry-v3 .v3-hero-author .v3-author-dot { width: 16px; height: 16px; }

/* Лайк до 10 сообщений: кнопка кликается и объясняет правило,
   поэтому гасим её приглушением, а не disabled */
.cherry-v3 .v3-char-like.is-locked { opacity: .55; }
