/* VHope — клиент ВК (Добрый Бобёр), светлый UI, mobile-first */

.vkc-kicker {
    margin: 0 0 0.35rem;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* system stack first — без блокирующего @import шрифтов */
body.page-vk-client {
    --bg: #f3f1fb;
    --bg-soft: #ebe7f8;
    --card: #ffffff;
    --text: #16122b;
    --muted: #6b6480;
    --line: rgba(79, 70, 229, 0.12);
    --brand: #6366f1;
    --brand-2: #4f46e5;
    --brand-soft: rgba(99, 102, 241, 0.12);
    --ok: #16a34a;
    --danger: #dc2626;
    --aside-w: 200px;
    --content-w: 860px;
    --radius: 18px;
    --shadow: 0 10px 30px rgba(49, 36, 110, 0.08);
    background:
        radial-gradient(900px 420px at 10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
        radial-gradient(700px 360px at 100% 0%, rgba(167, 139, 250, 0.16), transparent 55%),
        var(--bg) !important;
    font-family: "Segoe UI", Manrope, system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: var(--text);
}

body.page-vk-client .header,
body.page-vk-client header.header,
body.page-vk-client .market-announce,
body.page-vk-client aside.market-announce,
body.page-vk-client .site-staging-banner,
body.page-vk-client .live-plaque,
body.page-vk-client aside.live-plaque,
body.page-vk-client footer,
body.page-vk-client footer.footer,
body.page-vk-client .footer,
body.page-vk-client #notification,
body.page-vk-client .loading-overlay,
body.page-vk-client .halloween-layer,
body.page-vk-client .site-auth,
body.page-vk-client #site-auth,
body.page-vk-client .beaver-chat {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

body.page-vk-client .main {
    padding: 0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    background: transparent;
}

html.is-vkc-viewer,
body.page-vk-client.is-vkc-overlay,
body.page-vk-client.is-vkc-viewer {
    overflow: hidden;
}

.vkc-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.vkc-top {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--line);
}

.vkc-top__inner {
    width: min(calc(var(--aside-w) + var(--content-w) + 28px), 100%);
    margin: 0 auto;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vkc-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
}

.vkc-brand__logo,
.vkc-brand__icon {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: block;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.38);
    object-fit: cover;
    background: linear-gradient(135deg, #818cf8, #4f46e5);
}
.vkc-brand__icon {
    background: linear-gradient(135deg, #818cf8, #4f46e5);
}

.vkc-top__search { flex: 1; min-width: 0; }

.vkc-search {
    width: 100%;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.vkc-search:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.vkc-top__right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.vkc-top__link,
.vkc-top__btn,
.vkc-top__more {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    line-height: 1;
}

.vkc-top__more {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 22px;
    align-items: center;
    justify-content: center;
}

.vkc-top__link:hover,
.vkc-top__btn:hover,
.vkc-top__more:hover {
    background: var(--brand-soft);
    color: var(--brand-2);
}

.vkc-top__pill {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-2);
}

.vkc-top__pill--muted { opacity: 0.75; }
.vkc-top__pill.is-live {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
    opacity: 1;
}
.vkc-top__pill.is-off {
    background: rgba(100, 100, 120, 0.12);
    color: var(--muted);
}
.vkc-load-chip {
    border: 0;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    -webkit-tap-highlight-color: transparent;
}
.vkc-load-chip.is-ok {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}
.vkc-load-chip.is-busy {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}
.vkc-load-chip.is-hot {
    background: rgba(220, 38, 38, 0.14);
    color: #b91c1c;
    animation: vkc-load-pulse 1.4s ease-in-out infinite;
}
@keyframes vkc-load-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}
.vkc-load-tip {
    position: absolute;
    right: 12px;
    top: calc(100% + 6px);
    z-index: 60;
    width: min(300px, calc(100vw - 24px));
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 12px 28px rgba(49, 36, 110, 0.16);
}
.vkc-top__inner { position: relative; }
.vkc-load-tip[hidden] { display: none !important; }
.vkc-load-tip strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}
.vkc-load-tip p {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}
.vkc-load-tip__link {
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    color: var(--brand-2);
    text-decoration: none;
}

/* LOGIN */
.vkc-login {
    display: flex;
    justify-content: center;
    padding: 48px 14px 64px;
}

.vkc-login__card {
    width: min(480px, 100%);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.vkc-login__head {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    padding: 18px 18px 16px;
}

.vkc-login__head h1 { margin: 0; font-size: 20px; font-weight: 800; }
.vkc-login__head p { margin: 6px 0 0; opacity: 0.92; font-size: 13px; line-height: 1.4; }
.vkc-login__body { padding: 16px 18px 18px; }
.vkc-login__foot {
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    background: #faf9ff;
    color: var(--muted);
    font-size: 12px;
}

.vkc-field { margin-bottom: 12px; }
.vkc-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.vkc-input,
.vkc-textarea,
.vkc-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    padding: 10px 12px;
}

.vkc-textarea {
    min-height: 92px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.vkc-input:focus,
.vkc-textarea:focus,
.vkc-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.vkc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vkc-chip {
    border: 1px solid var(--line);
    background: #f7f5ff;
    color: var(--brand-2);
    border-radius: 999px;
    padding: 7px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.vkc-chip.is-active {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: #fff;
}

.vkc-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
}

.vkc-hint, .vkc-safe {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}
.vkc-safe {
    margin: 0 0 14px;
    padding: 12px 14px;
    background: var(--brand-soft);
    border-radius: 14px;
    color: #4338ca;
}
.vkc-safe strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: #3730a3;
}
.vkc-optional {
    font-weight: 500;
    color: var(--muted);
    text-transform: none;
}
.vkc-tips {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #faf9ff;
    border: 1px solid var(--line);
}
.vkc-tips p {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}
.vkc-tips p:last-child { margin-bottom: 0; }
.vkc-tips strong { color: var(--text); font-weight: 700; }
.vkc-tips em { font-style: normal; color: var(--brand-2); font-weight: 600; }

.vkc-chat__compose--locked {
    padding: 8px 12px;
    background: #faf9ff;
    border-top: 1px solid var(--line);
}
.vkc-compose-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--muted);
}
.vkc-compose-hint a {
    color: var(--brand-2);
    font-weight: 700;
    text-decoration: none;
}
.vkc-compose-hint a:hover { text-decoration: underline; }
.vkc-compose-hint--compact {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.vkc-compose-hint--compact .vkc-compose-ico {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.14);
    color: var(--brand-2);
    font-size: 12px;
    font-weight: 800;
}

.vkc-actions { display: flex; gap: 8px; margin-top: 8px; }
.vkc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}
.vkc-btn--primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
}
.vkc-btn--primary:disabled { opacity: 0.65; cursor: wait; }
.vkc-btn--ghost {
    background: #f3f0ff;
    border-color: var(--line);
    color: var(--brand-2);
}
.vkc-error { margin: 10px 0 0; color: var(--danger); font-size: 13px; font-weight: 700; }

/* APP LAYOUT */
.vkc-wrap {
    width: min(calc(var(--aside-w) + var(--content-w) + 28px), 100%);
    margin: 0 auto;
    padding: 16px 14px 40px;
    display: grid;
    grid-template-columns: var(--aside-w) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.vkc-aside {
    position: sticky;
    top: 72px;
    display: grid;
    gap: 10px;
}
.vkc-menu {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow);
}

.vkc-menu a,
.vkc-menu button,
.vkc-tool {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
}

.vkc-menu a:hover,
.vkc-menu button:hover,
.vkc-tool:hover { background: var(--brand-soft); color: var(--brand-2); }
.vkc-menu .is-active {
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(79,70,229,0.12));
    color: var(--brand-2);
}
.vkc-menu__sep { height: 1px; background: var(--line); margin: 8px 4px; }
.vkc-menu__note {
    margin: 8px 8px 4px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.35;
}

/* Мобильное «Ещё» — сервис отдельно от вкладок аккаунта */
.vkc-more[hidden] { display: none !important; }
.vkc-more {
    position: fixed;
    inset: 0;
    z-index: 280;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.vkc-more__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 12, 30, 0.45);
    cursor: pointer;
}
.vkc-more__sheet {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: min(78vh, 520px);
    overflow: auto;
    margin: 0;
    padding: 10px 12px calc(14px + env(safe-area-inset-bottom, 0));
    border-radius: 20px 20px 0 0;
    background: #fff;
    box-shadow: 0 -16px 40px rgba(22, 18, 43, 0.22);
}
.vkc-more__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 4px 4px 10px;
    border-bottom: 1px solid var(--line);
}
.vkc-more__head strong { font-size: 15px; font-weight: 800; }
.vkc-more__x {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: #f3f0ff;
    color: var(--brand-2);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.vkc-more__item {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 14px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #faf8ff;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}
.vkc-more__item:hover { background: var(--brand-soft); color: var(--brand-2); }
.vkc-more__note {
    margin: 12px 4px 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.vkc-content { min-width: 0; max-width: var(--content-w); }

.vkc-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    overflow: hidden;
}

.vkc-block__head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.vkc-block__head h2 { margin: 0; font-size: 16px; font-weight: 800; }
.vkc-block__head span { color: var(--muted); font-size: 12px; font-weight: 700; }

.vkc-page {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
}
.vkc-page__ava img,
.vkc-page__ava-ph {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 18px;
    background: var(--bg-soft);
    display: block;
}
.vkc-page__ava-actions { margin-top: 10px; display: grid; gap: 6px; }
.vkc-page__ava-actions a,
.vkc-page__ava-actions button {
    display: block;
    text-align: center;
    background: var(--brand-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--brand-2);
    text-decoration: none;
    font: inherit;
    font-weight: 700;
    font-size: 12px;
    padding: 9px 10px;
    cursor: pointer;
}
.vkc-page__main h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.vkc-page__status { margin: 0 0 12px; color: var(--muted); }

.vkc-counters {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 0 0 14px;
}
.vkc-counters span {
    background: #f7f5ff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
}
.vkc-counters b { display: block; font-size: 18px; font-weight: 800; }
.vkc-counters i { font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; }

.vkc-info-rows { margin: 0; }
.vkc-info-rows dt {
    float: left;
    clear: left;
    width: 110px;
    color: var(--muted);
    padding: 5px 0;
    font-weight: 700;
    font-size: 12px;
}
.vkc-info-rows dd { margin: 0 0 0 110px; padding: 5px 0; font-weight: 700; }
.vkc-info-rows::after { content: ""; display: block; clear: both; }

.vkc-list { list-style: none; margin: 0; padding: 0; }
.vkc-row-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f2effa;
    cursor: pointer;
}
.vkc-row-item:hover { background: #faf8ff; }
.vkc-row-item.is-unread { background: #f5f3ff; }
.vkc-row-item img,
.vkc-ava50,
.vkc-ava40 {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--bg-soft);
    flex-shrink: 0;
}
.vkc-ava40 { width: 40px; height: 40px; border-radius: 12px; }
.vkc-row-item__body { min-width: 0; flex: 1; }
.vkc-row-item__top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}
.vkc-row-item__name { color: var(--text); font-weight: 800; font-size: 14px; }
.vkc-row-item__time { color: var(--muted); font-size: 11px; white-space: nowrap; font-weight: 700; }
.vkc-row-item__text {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vkc-online { color: var(--ok); font-size: 11px; font-weight: 800; }
.vkc-unread {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    line-height: 18px;
}
.vkc-mini-btn {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand-2);
    border-radius: 999px;
    padding: 5px 10px;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.vkc-post {
    padding: 14px 16px;
    border-bottom: 1px solid #f2effa;
}
.vkc-post__head { display: flex; gap: 10px; margin-bottom: 8px; }
.vkc-post__author { font-weight: 800; }
.vkc-post__date { color: var(--muted); font-size: 11px; font-weight: 700; }
.vkc-post__text { white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.vkc-post__actions { margin-top: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.vkc-post__actions span { margin-right: 12px; color: var(--brand-2); }

.vkc-empty,
.vkc-status {
    margin: 0;
    padding: 18px 16px;
    color: var(--muted);
    font-weight: 700;
}
.vkc-status.is-error { color: var(--danger); }
.vkc-footnote { display: none; }

/* CHAT */
.vkc-chat {
    display: flex;
    flex-direction: column;
    min-height: min(72vh, 720px);
}
.vkc-chat__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.vkc-chat__back,
.vkc-chat__tool {
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand-2);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.vkc-chat__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    flex: 1;
    min-width: 120px;
}
.vkc-chat__search {
    width: min(220px, 100%);
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
}
.vkc-chat__msgs {
    flex: 1;
    overflow-y: auto;
    max-height: none;
    min-height: 320px;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(99,102,241,0.04), transparent 120px),
        #faf9ff;
}
.vkc-msg { display: flex; margin-bottom: 10px; }
.vkc-msg--out { justify-content: flex-end; }
.vkc-msg__bubble {
    max-width: min(78%, 520px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px 16px 16px 6px;
    padding: 10px 12px;
    box-shadow: 0 4px 14px rgba(49, 36, 110, 0.05);
}
.vkc-msg--out .vkc-msg__bubble {
    background: linear-gradient(160deg, #eef2ff, #e0e7ff);
    border-color: rgba(99, 102, 241, 0.22);
    border-radius: 16px 16px 6px 16px;
}
.vkc-msg__text { white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.vkc-msg__time { margin-top: 5px; font-size: 11px; color: var(--muted); font-weight: 700; }

/* альбом как в мессенджерах — не раздувать чат на полэкрана */
.vkc-att {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    width: min(100%, 268px);
    min-width: 0;
}
.vkc-att:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
    width: min(100%, 240px);
}
.vkc-att-photo,
.vkc-att-media {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: zoom-in;
    background: #1c1830;
    line-height: 0;
    text-decoration: none !important;
    position: relative;
}
.vkc-att:has(> :only-child) .vkc-att-photo,
.vkc-att:has(> :only-child) .vkc-att-media {
    aspect-ratio: 4 / 3;
    max-height: 220px;
}
.vkc-att img,
.vkc-att-photo img,
.vkc-att-media img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    display: block;
    border-radius: 0;
    background: #1c1830;
}
.vkc-att-media--video {
    position: relative;
}
.vkc-att-media--circle {
    border-radius: 50%;
    aspect-ratio: 1;
    width: min(100%, 220px);
    max-width: 220px;
    justify-self: start;
}
.vkc-att:has(> .vkc-att-media--circle:only-child) {
    grid-template-columns: 220px;
    width: 220px;
}
.vkc-att-media--video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vkc-att-media__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, transparent 40%, rgba(12, 10, 24, 0.55));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}
.vkc-att-media__play span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    line-height: 1.2;
}
.vkc-att-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 8px 12px !important;
    border-radius: 12px;
    border: 1px solid var(--line) !important;
    background: #f7f5ff !important;
    color: var(--brand-2);
    font-weight: 700;
    font: inherit;
    text-align: left;
    cursor: pointer;
    word-break: break-word;
    line-height: 1.35;
}
.vkc-att a:not(.vkc-att-photo):not(.vkc-att-media),
.vkc-att button:not(.vkc-att-media):not(.vkc-att-action) {
    color: var(--brand-2);
    font-weight: 700;
    word-break: break-word;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.vkc-att__sticker { width: 128px; height: 128px; object-fit: contain; }
.vkc-att audio { width: 100%; max-width: 280px; margin-top: 4px; }
.vkc-voice { font-size: 13px; font-weight: 700; color: #4338ca; }
.vkc-fwd {
    margin-top: 6px;
    padding-left: 10px;
    border-left: 3px solid rgba(99, 102, 241, 0.35);
}
.vkc-fwd__text { font-size: 13px; color: #445; white-space: pre-wrap; word-break: break-word; }

.vkc-chat__compose {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    background: #fff;
}
.vkc-chat__tools {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
}
.vkc-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f5ff;
    color: var(--brand-2);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    font-weight: 500;
}
.vkc-attach-sheet {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.vkc-attach-sheet[hidden] { display: none !important; }
.vkc-attach-sheet button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 64px;
    padding: 8px 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7f5ff;
    color: var(--text);
    font: inherit;
    cursor: pointer;
}
.vkc-attach-sheet b { font-size: 13px; font-weight: 800; }
.vkc-attach-sheet span { font-size: 10px; color: var(--muted); font-weight: 700; }
.vkc-attach-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vkc-chat__row { display: flex; gap: 8px; }
.vkc-chat__compose textarea {
    flex: 1;
    min-height: 44px;
    max-height: 140px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px 12px;
    font: inherit;
}
.vkc-chat__compose button#vkc-chat-send {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border: 0;
    color: #fff;
    border-radius: 14px;
    padding: 0 16px;
    min-height: 44px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.25);
}
.vkc-chat__compose button#vkc-chat-send:disabled { opacity: 0.65; cursor: wait; }

/* attachments panel */
.vkc-media-panel {
    border-top: 1px solid var(--line);
    background: #faf9ff;
    padding: 12px 14px 14px;
}
.vkc-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}
.vkc-media-grid a,
.vkc-media-grid button {
    display: block;
    border: 0;
    padding: 0;
    background: #1c1830;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: zoom-in;
    border: 1px solid var(--line);
    width: 100%;
}
.vkc-media-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.vkc-media-grid .vkc-media-file {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: #c4b5fd;
    cursor: pointer;
    position: relative;
    background: #1c1830;
}
.vkc-media-grid .vkc-media-file--video span {
    position: absolute;
    inset: auto 6px 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 11px;
}
.vkc-media-grid .vkc-media-file--video img {
    position: absolute;
    inset: 0;
}
.vkc-media-grid .vkc-media-file--circle {
    border-radius: 50%;
}

/* Вложения чата — на весь экран, вкладки как в клиенте VK */
.vkc-albums {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    background: #0b0914;
    color: #fff;
}
.vkc-albums[hidden] { display: none !important; }
.vkc-albums__bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: calc(8px + env(safe-area-inset-top, 0)) 10px 8px;
    background: rgba(0, 0, 0, 0.55);
}
.vkc-albums__bar strong { font-size: 16px; font-weight: 800; }
.vkc-albums__tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 10px 10px;
    background: #120f1e;
    -webkit-overflow-scrolling: touch;
}
.vkc-albums__tabs button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font: inherit;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}
.vkc-albums__tabs button.is-on { background: #6366f1; }
.vkc-albums__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 8px calc(12px + env(safe-area-inset-bottom, 0));
}
.vkc-albums .vkc-empty { color: #c4b5fd; }
.vkc-albums .vkc-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* viewer — на весь видимый экран, без -webkit-fill-available (на iPhone даёт полэкрана) */
.vkc-viewer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10050;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: none;
    background: #0b0914;
    display: flex;
    flex-direction: column;
    overscroll-behavior: none;
}
.vkc-viewer[hidden] { display: none !important; }
.vkc-viewer__bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: calc(10px + env(safe-area-inset-top, 0)) 10px 10px;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.vkc-viewer__title {
    flex: 1;
    min-width: 0;
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vkc-viewer__nav,
.vkc-viewer__close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.14);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.vkc-viewer__link {
    flex: 0 0 auto;
    color: #c4b5fd;
    font-weight: 800;
    text-decoration: none;
    padding: 10px 8px;
    font-size: 13px;
}
.vkc-viewer__stage {
    flex: 1 1 0;
    position: relative;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    background: #000;
}
.vkc-viewer__stage img {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}
.vkc-viewer__stage video.vkc-viewer__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    object-fit: contain;
    background: #000;
}
.vkc-viewer__stage video.vkc-viewer__video--circle {
    width: min(86vmin, 420px);
    height: min(86vmin, 420px);
    border-radius: 50%;
    object-fit: cover;
    margin: auto;
}
.vkc-viewer__stage iframe.vkc-viewer__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    background: #000;
}
.vkc-viewer__stage audio {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100% - 32px));
}
.vkc-viewer__doc {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0));
    color: #fff;
    text-align: center;
    background:
        radial-gradient(600px 280px at 50% 20%, rgba(99, 102, 241, 0.28), transparent 70%),
        #0b0914;
}
.vkc-viewer__doc p {
    margin: 0;
    max-width: 28rem;
    line-height: 1.4;
    font-size: 15px;
}
.vkc-viewer__doc-poster {
    width: min(100%, 420px);
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    background: #1a1528;
    position: relative;
}
.vkc-viewer__doc-poster img {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    display: block;
}
.vkc-viewer__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    background: #6366f1;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none !important;
    font-size: 15px;
    border: 0;
    cursor: pointer;
}
.vkc-viewer__cta--ghost {
    background: rgba(255, 255, 255, 0.12);
}
.vkc-viewer__wait {
    color: #c4b5fd;
    font-weight: 700;
}

.vkc-dump {
    margin: 14px 0 6px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(255, 255, 255, 0.7));
}
.vkc-dump__btn,
.vkc-nav--dump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: #6366f1;
    color: #fff;
    font-weight: 750;
    font-size: 0.9rem;
    cursor: pointer;
}
.vkc-dump__btn:disabled {
    opacity: 0.65;
    cursor: wait;
}
.vkc-dump__btn:hover:not(:disabled),
.vkc-nav--dump:hover {
    background: #4f46e5;
}
.vkc-nav--dump {
    width: 100%;
    margin: 2px 0 6px;
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
    border-color: rgba(99, 102, 241, 0.28);
}
.vkc-nav--dump:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #3730a3;
}
.vkc-dump__hint {
    margin: 8px 0 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #64748b;
}
.vkc-dump__panel {
    margin-top: 10px;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    font-size: 0.84rem;
    line-height: 1.4;
}
.vkc-dump__panel.is-run {
    background: rgba(99, 102, 241, 0.1);
    color: #3730a3;
}
.vkc-dump__panel.is-ok {
    background: rgba(16, 185, 129, 0.12);
    color: #065f46;
}
.vkc-dump__panel.is-err {
    background: rgba(248, 113, 113, 0.12);
    color: #991b1b;
}
.vkc-dump__dl {
    display: inline-flex;
    margin-top: 8px;
    margin-left: 0;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #065f46;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.82rem;
}

@media (max-width: 860px) {
    .vkc-top {
        padding-top: env(safe-area-inset-top, 0);
    }
    .vkc-top__inner {
        padding: 6px 10px;
        gap: 8px;
    }
    .vkc-brand__logo { width: 28px; height: 28px; border-radius: 9px; }
    .vkc-top__more { display: inline-flex; width: 34px; height: 34px; }
    .vkc-top__btn { padding: 6px 8px; font-size: 12px; }
    .vkc-wrap {
        grid-template-columns: 1fr;
        padding: 0 0 12px;
        gap: 0;
    }
    .vkc-aside {
        position: sticky;
        top: calc(44px + env(safe-area-inset-top, 0));
        z-index: 40;
        gap: 0;
        background: rgba(243, 241, 251, 0.94);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
        padding: 4px 8px;
    }
    .vkc-menu--tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px;
        padding: 2px;
        box-shadow: none;
        border-radius: 12px;
    }
    .vkc-menu--tabs .vkc-nav {
        width: 100%;
        text-align: center;
        padding: 7px 4px;
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-radius: 10px;
    }
    .vkc-menu--tools { display: none !important; }
    .vkc-content {
        max-width: none;
        padding: 6px 8px 12px;
    }
    .vkc-page { grid-template-columns: 1fr; }
    .vkc-page__ava img,
    .vkc-page__ava-ph { width: 112px; height: 112px; }
    .vkc-counters { grid-template-columns: repeat(2, 1fr); }
    /* на мобилке оставляем только значок нагрузки */
    .vkc-top__pill:not(.vkc-load-chip) { display: none; }
    .vkc-load-chip { display: inline-flex !important; font-size: 11px; padding: 4px 8px; }
    .vkc-block:has(.vkc-chat) { margin-bottom: 0; }
    .vkc-chat {
        height: calc(100dvh - 118px - env(safe-area-inset-top, 0));
        min-height: 320px;
        max-height: none;
    }
    .vkc-chat__head {
        flex-shrink: 0;
        background: #fff;
        flex-wrap: nowrap;
        gap: 6px;
        padding: 8px 10px;
    }
    .vkc-chat__title {
        font-size: 14px;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .vkc-chat__back,
    .vkc-chat__tool {
        padding: 6px 10px;
        font-size: 11px;
    }
    .vkc-chat__search {
        display: none;
        width: 100%;
        order: 5;
        flex: 1 1 100%;
    }
    .vkc-chat.is-search .vkc-chat__search { display: block; }
    .vkc-chat__msgs {
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 10px;
    }
    .vkc-chat__compose {
        flex-shrink: 0;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0));
        background: #fff;
    }
    .vkc-chat__compose--locked { padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0)); }
    .vkc-media-panel {
        max-height: 36%;
        overflow: auto;
    }
    .vkc-dump { padding: 11px 12px; }
    .vkc-viewer__bar {
        gap: 4px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .vkc-viewer__link { padding: 10px 4px; }
    .vkc-info-rows dt { float: none; width: auto; }
    .vkc-info-rows dd { margin-left: 0; padding-top: 0; }

    /* режим диалога: убираем вкладки и глобальный поиск — больше места чату */
    body.is-vkc-chat .vkc-top__search { display: none; }
    body.is-vkc-chat .vkc-aside { display: none; }
    body.is-vkc-chat .vkc-content { padding: 0; }
    body.is-vkc-chat .vkc-block { border-radius: 0; border: 0; box-shadow: none; }
    body.is-vkc-chat .vkc-chat {
        height: calc(100dvh - 48px - env(safe-area-inset-top, 0));
        min-height: 0;
        border-radius: 0;
    }
}

@media (max-width: 560px) {
    .vkc-top__link { display: none; }
    .vkc-brand span { display: none; }
    .vkc-row { grid-template-columns: 1fr; }
    .vkc-msg__bubble { max-width: 92%; }
    .vkc-top__inner { gap: 6px; }
    .vkc-top__search { order: 3; flex: 1 1 100%; }
    body:not(.is-vkc-chat) .vkc-aside { top: calc(84px + env(safe-area-inset-top, 0)); }
    body:not(.is-vkc-chat) .vkc-chat {
        height: calc(100dvh - 150px - env(safe-area-inset-top, 0));
    }
    .vkc-dump__btn { width: 100%; }
    .vkc-dump__dl { width: 100%; justify-content: center; }
    .vkc-att {
        width: min(100%, 72vw);
        max-width: 268px;
    }
    .vkc-att:has(> :only-child) {
        width: min(100%, 68vw);
        max-width: 240px;
    }
    .vkc-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Недавние профили на входе VHope */
.vkc-recent__list { display: flex; flex-direction: column; gap: 6px; }
.vkc-recent__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    border: 1px solid var(--line);
    background: #faf9ff;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    font: inherit;
    color: var(--text);
}
.vkc-recent__item:hover { border-color: rgba(99, 102, 241, 0.45); background: #f3f1ff; }
.vkc-recent__ava {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--brand-soft);
}
.vkc-recent__ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vkc-recent__ava--empty { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.vkc-recent__meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.vkc-recent__name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vkc-recent__id { color: var(--muted); font-size: 11px; }
.vkc-recent__pick {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-2);
    background: var(--brand-soft);
    border-radius: 999px;
    padding: 4px 9px;
}
.vkc-recent__del {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
}
.vkc-recent__del:hover { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
