* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* ---------- Ссылки без своего класса (UID 250) ----------
   UID 249 сделал их тёпло-жёлтыми (#f7d774) — Юрию не понравилось (в письме:
   «в разделе „О сайте“ все ссылки сделай белыми, жёлтый не нравится»).
   Базовый цвет — белый: на тёмном фоне читается, а подчёркивание (стиль браузера,
   у ссылок без класса оно остаётся) не даёт спутать с обычным текстом.
   У ссылок со своими классами (.nav-links a, .back-link, .support-line a, .btn…)
   свои цвета — они перекрывают этот базовый. */
a { color: #fff; }
a:visited { color: #b9bac6; }
a:hover { color: var(--accent-2); }

:root {
    --bg: #0f0f14;
    --panel: #1a1a24;
    --panel-2: #22222e;
    --line: #2c2c3a;
    --text: #f5f5f7;
    --muted: #9a9aac;
    --accent: #e11d48;
    --accent-2: #f43f5e;
    --ok: #22c55e;
}

body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ---------- Navbar ---------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: .5px; text-decoration: none; color: var(--text); cursor: pointer; }
.brand:hover { opacity: .85; }
.brand span { color: var(--accent-2); }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.user-chip { color: var(--text); font-weight: 600; font-size: 14px; }
.user-chip::before { content: '👤 '; }
.nav-link-chat { position: relative; }
/* Баланс монет в шапке: золотая монета-пиктограмма + золотой текст */
.nav-coins {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #f7d774;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.4;
    transition: background .15s;
}
.nav-coins:hover { background: rgba(247, 215, 116, .12); }
.nav-coins[hidden] { display: none; }
.coin-ico { display: inline-block; width: 16px; height: 16px; flex: none; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8c9, #f2c744 45%, #a97b16 100%); box-shadow: inset 0 1px 1px rgba(255, 255, 255, .55), 0 1px 2px rgba(0, 0, 0, .45); vertical-align: -2px; }
.coin-val { color: #f7d774; font-variant-numeric: tabular-nums; }
.nav-msg-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
    z-index: 5;
}
.nav-msg-badge[hidden] { display: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: transform .1s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-danger { background: var(--danger, #c9403a); color: #fff; }
.btn-danger:hover { filter: brightness(1.12); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ---------- Random brief cards ---------- */
.brief-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.brief-card { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; transition: transform .15s, border-color .15s; }
.brief-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.brief-card .avatar { width: 52px; height: 52px; min-width: 52px; font-size: 18px; border-radius: 10px; }
.b-name { font-weight: 700; font-size: 15px; }
.b-sub { font-size: 12px; color: var(--muted); }

/* ---------- Photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-bottom: 10px; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .del {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
}
.photo-thumb .del:hover { background: #000; }
.photo-thumb .main-btn {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(0, 0, 0, .68);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 0;
    font-size: 11px;
    cursor: pointer;
}
.photo-thumb .main-btn:hover { background: #000; color: var(--accent-2); }
.photo-thumb .photo-main-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(244, 63, 94, .92);
    color: #fff;
    border-radius: 6px;
    padding: 4px 0;
    font-size: 11px;
    text-align: center;
}
.e-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.e-photos .photo-thumb { aspect-ratio: 1; }

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 90px 20px 70px;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(225, 29, 72, .25), transparent 60%),
        var(--bg);
}
.hero h1 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 16px; }
.hero p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 auto 30px; }

/* ---------- Filters ---------- */
.filters {
    max-width: 980px;
    margin: 0 auto 24px;
    padding: 18px 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.filters label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.filters select, .filters input {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 14px;
    min-width: 150px;
}
.filters input[type="range"] { min-width: 160px; padding: 0; accent-color: var(--accent); }
.filters-chk { display: flex; align-items: center; gap: 16px; padding: 10px 2px; }
.filters-chk label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--text); text-transform: none; letter-spacing: 0; cursor: pointer; white-space: nowrap; }
.filters-chk input[type="checkbox"] { min-width: 0; width: 16px; height: 16px; margin: 0; padding: 0; background: transparent; border: none; accent-color: var(--accent); }

/* ---------- SEO-блок внизу (компактный, в подвале) ---------- */
.seo {
    margin-top: 28px;
    border-top: 1px solid var(--line);
    padding: 20px 0 6px;
}
.seo-inner { max-width: 860px; }
.seo h2 { font-size: 16px; margin: 0 0 10px; }
.seo h3 { font-size: 13px; margin: 14px 0 4px; color: var(--text); }
.seo p { color: var(--muted); font-size: 12px; line-height: 1.55; margin-bottom: 8px; }

/* ---------- Grid / cards ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px 60px; }
.section-title { font-size: 24px; margin: 40px 0 20px; }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
/* Навигация по страницам ленты (UID 126): дублируется сверху и снизу */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 24px 0 8px;
}
#pager-top { margin: 0 0 20px; }
.pager[hidden] { display: none; }
.pager-info { color: var(--muted); font-size: 13px; white-space: nowrap; }
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.avatar {
    position: relative;
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
    background: linear-gradient(135deg, var(--g1, #3b3b55), var(--g2, #1e1e2e));
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-count { position: absolute; bottom: 6px; right: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 10px; }
.avatar-lock { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .55); color: #ffd76a; font-size: 14px; padding: 2px 7px; border-radius: 10px; z-index: 2; }
.photo-lock { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; background: rgba(247, 215, 116, .08); border: 1px dashed rgba(247, 215, 116, .4); border-radius: 10px; color: #f7d774; font-size: 13px; }
.photo-lock span { flex: 1; min-width: 0; }
.card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.card-name { font-size: 18px; font-weight: 700; }
.card-meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.role-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(225, 29, 72, .15);
    color: var(--accent-2);
    border: 1px solid rgba(225, 29, 72, .35);
    white-space: nowrap;
}
/* Роль (позиционирование) в анкетах: Доминант — красный, Сабмиссив — синий, Свитч — серый */
.role-badge.role-dom { background: rgba(225, 29, 72, .15); color: var(--accent-2); border-color: rgba(225, 29, 72, .35); }
.role-badge.role-sub { background: rgba(59, 130, 246, .15); color: #60a5fa; border-color: rgba(59, 130, 246, .35); }
.role-badge.role-switch { background: rgba(148, 163, 184, .18); color: #9ca3af; border-color: rgba(148, 163, 184, .4); }
/* Текстовая роль в строках списков (модалка статов, чат): только слово роли цветное */
.role-txt { font-weight: 600; }
.role-txt.role-dom { color: var(--accent-2); }
.role-txt.role-sub { color: #60a5fa; }
.role-txt.role-switch { color: #9ca3af; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
#p-tag-add { margin-bottom: 8px; }
.tag {
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--panel-2);
    color: var(--muted);
    border: 1px solid var(--line);
}
.tag-edit { display: inline-flex; align-items: center; gap: 6px; }
.tag-click { cursor: pointer; transition: border-color .15s, color .15s; }
.tag-click:hover { border-color: var(--accent); color: var(--text); }
.tag-del { cursor: pointer; opacity: .65; font-size: 11px; }
.tag-del:hover { opacity: 1; color: var(--accent-2); }
.card-actions { display: flex; gap: 8px; margin-top: auto; }
.card-actions .btn { flex: 1; padding: 9px 6px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.card-actions .btn-fav { flex: 0 0 auto; min-width: 44px; padding: 9px 8px; }
/* Избранное в карточке: сердечко заливается красным (UID 130) */
.card-actions .btn-fav.active { border-color: rgba(225, 29, 72, .6); background: rgba(225, 29, 72, .14); color: #e11d48; }
.card-actions .btn-like.liked { filter: brightness(.9); }
.self-badge {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
}
.btn-like { background: var(--ok); color: #04260f; }
.btn-like:hover { filter: brightness(1.1); }
.btn-chat { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); text-align: center; text-decoration: none; }
.btn-chat:hover { border-color: var(--accent); color: var(--text); }
/* SVG-иконки действий на карточке/в анкете (UID 130) — без эмодзи-шрифтов */
.ico-heart, .ico-like, .ico-chat { display: inline-block; vertical-align: -3px; }
.view-actions .ico-heart, .view-actions .ico-like, .view-actions .ico-chat { vertical-align: -2px; }

.online { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 6px; }
.offline { background: var(--muted); }

/* ---------- Stats ---------- */
.stats { display: flex; gap: 16px; justify-content: center; margin-bottom: 40px; flex-wrap: wrap; }
.stat {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    padding: 14px 28px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform .12s, border-color .15s;
}
.stat-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
    z-index: 5;
}
.stat-badge[hidden] { display: none; }
.stat:hover { transform: translateY(-2px); border-color: var(--accent); }
.stat:active { transform: scale(.98); }
.stat b { display: block; font-size: 26px; color: var(--accent-2); }
.stat span { color: var(--muted); font-size: 13px; }

/* ---------- Forms ---------- */
.form-panel {
    max-width: 620px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px;
}
.form-panel h3 { margin-bottom: 18px; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 150px; margin-bottom: 14px; }
.form-group label, .auth-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea,
.auth-form input, .auth-form select, .auth-form textarea {
    width: 100%;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}

/* ---------- Auth page ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background:
        radial-gradient(ellipse at 50% -20%, rgba(225, 29, 72, .2), transparent 60%),
        var(--bg);
}
.auth-wrap {
    width: 100%;
    max-width: 420px;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
}
.auth-body .seo { width: 100%; }
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 30px;
}
.auth-brand { text-align: center; font-size: 26px; font-weight: 700; margin-bottom: 22px; }
.auth-brand span { color: var(--accent-2); }
/* Тот же шрифт, что и заголовок «Найди своего человека» на главной, но вдвое меньше и в одну строку */
.auth-title {
    text-align: center;
    font-size: clamp(14px, 2.2vw, 22px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 18px;
    color: var(--text);
    white-space: nowrap;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
    flex: 1;
    padding: 10px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.auth-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.auth-form .btn { margin-top: 6px; }
.auth-error { color: var(--accent-2); font-size: 14px; margin-top: 14px; min-height: 20px; text-align: center; }
@keyframes error-flash {
    0% { opacity: 0; transform: translateY(-2px); }
    15% { opacity: 1; transform: translateY(0); }
    100% { opacity: 1; }
}
.auth-error.flash { animation: error-flash .45s ease; }
.auth-link { display: block; text-align: center; margin-top: 14px; color: var(--muted); font-size: 14px; text-decoration: none; }
.auth-link:hover { color: var(--text); }

/* ---------- Chat ---------- */
.chat-wrap {
    max-width: 1000px;
    margin: 24px auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    height: calc(100vh - 140px);
    min-height: 420px;
}
.chat-side {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-side input {
    margin: 14px;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
}
.user-list { list-style: none; overflow-y: auto; flex: 1; }
.user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .12s;
}
.user-item:hover { background: var(--panel-2); }
.user-item.active { background: var(--panel-2); border-left-color: var(--accent); }
.user-item.empty { cursor: default; color: var(--muted); font-size: 13px; }
.user-item .u-name { font-weight: 600; font-size: 15px; }
.u-ava { display: none; } /* на мобильном — инициалы-аватар в списке диалогов (см. @media ≤720px) */
.user-item .u-sub { font-size: 12px; color: var(--muted); }
.user-item .u-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.user-item .u-dot.on { background: var(--ok); }
.user-item .unread {
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}
.user-item .env { color: var(--muted); opacity: .55; flex-shrink: 0; margin-left: 2px; }
.user-item .env.on { color: var(--accent-2); opacity: 1; }
.user-item .row-del {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .12s, background .12s;
}
.user-item .row-del:hover { color: var(--accent-2); background: var(--panel-2); }
.chat-main {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chat-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.chat-head small { color: var(--muted); font-weight: 400; }
.u-name-link { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); cursor: pointer; }
.u-name-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.chat-head .u-name-link { font-weight: 600; }
.chat-head-actions { display: flex; gap: 6px; align-items: center; }
.chat-head-actions .attach {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}
.chat-head-actions .attach:hover { color: var(--accent); border-color: var(--accent); }
.blocked-notice {
    padding: 28px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}
.btn-danger { background: transparent; color: #e5484d; border: 1px solid #e5484d; }
.btn-danger:hover { background: rgba(229, 72, 77, .12); color: #ff6b6f; border-color: #ff6b6f; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.msg {
    max-width: 72%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 15px;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.msg.mine { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg .m-time { display: block; font-size: 11px; opacity: .6; margin-top: 4px; }
/* Весёлое уведомление о подарке в чате (UID 202) */
.msg.gift-msg { max-width: 92%; padding: 0; background: transparent; border: 0; color: inherit; }
.gift-bubble {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e11d48, #f43f5e 55%, #a855f7);
    color: #fff;
    box-shadow: 0 6px 18px rgba(225, 29, 72, .35);
    animation: giftPop .45s cubic-bezier(.34, 1.56, .64, 1);
    position: relative;
    overflow: hidden;
}
.gift-bubble::after {
    content: '🎉';
    position: absolute; right: -4px; top: -8px;
    font-size: 42px; opacity: .28; transform: rotate(15deg);
    animation: giftSpin 6s linear infinite;
}
.gift-bubble-ico { font-size: 46px; line-height: 1; display: inline-flex; flex-shrink: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.gift-bubble-ico img { width: 54px; height: 54px; object-fit: contain; display: block; }
.gift-bubble-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gift-bubble-hl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; opacity: .95; }
.gift-bubble-name { font-weight: 800; font-size: 17px; line-height: 1.2; }
.gift-bubble-from { font-size: 12px; opacity: .85; }
.gift-anon { font-size: 11px; opacity: .85; font-style: italic; }
/* Уведомление о переводе в чате (UID 206) — как подарок, в своей зелёно-золотой гамме */
.msg.transfer-msg .gift-bubble,
.gift-bubble.transfer-bubble {
    background: linear-gradient(135deg, #0d9488, #10b981 55%, #f59e0b);
    box-shadow: 0 6px 18px rgba(16, 185, 129, .35);
}
.gift-bubble.transfer-bubble::after {
    content: '💸';
}
@keyframes giftPop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes giftSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.chat-input {
    display: flex;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid var(--line);
}
.chat-input input,
.chat-input textarea {
    flex: 1;
    min-width: 0;   /* чтобы поле могло сжиматься и не выталкивать кнопку «Отправить» на мобильных */
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 15px;
    font-family: inherit;
}
.chat-input textarea {
    resize: none;
    line-height: 1.35;
    overflow-y: auto;
    height: auto;
    min-height: 44px;
    max-height: 160px;
}
/* UID 145: кнопки (🎁/🗂/📎/Отправить) вынесены в .chat-input-btns. На десктопе
   обёртка «прозрачна» — кнопки стоят в одном ряду с инпутом, как раньше. */
.chat-input-btns { display: contents; }
.chat-input input,
.chat-input textarea { order: 1; }
.chat-input .btn { order: 2; }
.chat-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-top: 1px solid var(--line);
    background: var(--panel-2);
}
.chat-preview[hidden] { display: none; }
.chat-preview img {
    max-height: 64px;
    max-width: 96px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    border: 1px solid var(--line);
}
.chat-preview-del {
    background: none;
    border: none;
    color: var(--text);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
}
.chat-preview-del:hover { color: var(--accent-2); }
.chat-empty { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 16px; }
.chat-input .attach {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.chat-input .attach:hover { border-color: var(--accent); }
.chat-input .btn { flex-shrink: 0; white-space: nowrap; }
.chat-img {
    max-width: 240px;
    max-height: 240px;
    width: auto;
    border-radius: 10px;
    display: block;
    margin: 2px 0 4px;
    cursor: zoom-in;
    object-fit: cover;
}
.img-lightbox { z-index: 400; cursor: zoom-out; }
.lightbox-inner { position: relative; max-width: 94vw; max-height: 90vh; }
.lightbox-inner img {
    max-width: 94vw;
    max-height: 86vh;
    border-radius: 10px;
    display: block;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .5);
}
.lightbox-inner .modal-close { position: absolute; top: 8px; right: 8px; }

/* ---------- Toast / footer / misc ---------- */
.toast-click { cursor: pointer; }
.bot-online { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; white-space: nowrap; }
.lastseen { opacity: .9; }
.u-seen { opacity: .8; font-weight: 400; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%) translateY(80px);
    background: var(--accent);
    color: #fff;
    padding: 14px 26px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
    opacity: 0;
    transition: transform .3s, opacity .3s;
    /* 08.09: тост выше окон кошелька/модалок (.pay-overlay 1200, попап «кто подарил» 1250).
       Раньше z-index 100 — пока окно кошелька открыто, тост «покупка/перевод прошли» был
       ПОД тёмным оверлеем и не виден («в кошельке нет уведомления», хотя тост показывался). */
    z-index: 3000;
    max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
/* 08.09: варианты тоста — успех (зелёный) и ошибка (красный) для покупок и переводов */
.toast-ok { background: var(--ok, #22c55e); box-shadow: 0 8px 30px rgba(34, 197, 94, .4); }
.toast-err { background: #dc2626; box-shadow: 0 8px 30px rgba(220, 38, 38, .4); }

/* ---------- Уведомления о сообщениях (чат) ---------- */
.notify-stack {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
    max-width: 340px;
}
.notify {
    background: var(--panel);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
    animation: notify-in .25s ease;
}
.notify:hover { border-color: var(--accent-2); }
.notify .n-count {
    margin-left: 6px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    padding: 1px 8px;
    font-weight: 700;
    font-size: 12px;
}
@keyframes notify-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Админ ---------- */
.admin-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.btn-ghost.active { background: var(--panel-2); color: var(--text); border-color: var(--accent); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.admin-table th { background: var(--panel-2); color: var(--muted); font-size: 12px; text-transform: uppercase; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge-ban { color: var(--accent-2); font-weight: 600; }
.msg-conv { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.msg-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.msg-row:last-child { border-bottom: none; }
.msg-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.msg-ind { white-space: nowrap; font-size: 13px; }
.send-as { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.send-as select,
.send-as input {
    background: var(--panel-2); color: var(--text);
    border: 1px solid var(--line); border-radius: 8px;
    padding: 8px 10px; font-size: 14px;
}
.send-as select { max-width: 150px; }
.send-as input { flex: 1; min-width: 0; }
.send-as input::placeholder { color: var(--muted); }
.row-flash { animation: row-flash 1.2s ease-in-out 2; }
@keyframes row-flash {
    0%, 100% { background: transparent; }
    50% { background: rgba(255, 173, 66, 0.22); }
}
.edit-panel { background: var(--panel); border: 1px solid var(--accent); border-radius: 12px; padding: 16px; margin-bottom: 20px; }
.logs-list { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-height: 60vh; overflow: auto; font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; color: var(--text); }

footer {
    border-top: 1px solid var(--line);
    padding: 30px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}
footer .warn { color: var(--accent-2); font-weight: 600; }
/* SEO-блок внутри футера: убираем двойную линию (у footer уже есть border-top) */
footer .seo { margin-top: 26px; border-top: none; padding: 0; text-align: left; }
footer .seo .container { padding-bottom: 0; }
/* Строка поддержки под футером */
.support-line { text-align: center; color: var(--muted); font-size: 12px; padding: 12px 20px 28px; }
.support-line a { color: var(--accent-2); text-decoration: none; }
.support-line a:hover { text-decoration: underline; }

.empty { text-align: center; color: var(--muted); padding: 40px; }

/* ---------- Модальное окно списков (лайкнули / мэтчи / онлайн) ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    /* UID 203: модалка перевода открывается из пикера подарков (.gift-picker z-index 310)
       и должна быть ПОВЕРХ него — иначе поле ввода оказывается за карточкой подарков. */
    z-index: 320;
    padding: 16px;
    overflow-y: auto;
}
/* hidden-атрибут должен скрывать оверлей (display:flex его перебивал) */
.modal-overlay[hidden] { display: none; }
.modal {
    width: 100%;
    max-width: 460px;
    max-height: 80vh;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 18px; }
.modal-close {
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.modal-close:hover { border-color: var(--accent); }
.modal-list { overflow-y: auto; padding: 8px; min-height: 0; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--line); }
.stat-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .12s;
}
.stat-user:hover { background: var(--panel-2); }
.stat-user .avatar { width: 48px; height: 48px; min-width: 48px; border-radius: 10px; font-size: 18px; }
.modal-empty { text-align: center; color: var(--muted); padding: 30px; }

/* Избранное и ЧС в анкете (UID 126): ссылки → модалка со списком */
.p-fav-links { display: flex; gap: 10px; flex-wrap: wrap; }
#fl-list .stat-user { cursor: default; }
.p-fav-links .btn { display: inline-flex; align-items: center; gap: 8px; }
.p-list-count {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    min-width: 22px;
    padding: 1px 6px;
    font-size: 12px;
    text-align: center;
    color: var(--text);
}
.fl-avatar {
    width: 40px; height: 40px; min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--h, 320), 55%, 80%), hsl(calc(var(--h, 320) + 40), 60%, 72%));
    color: rgba(0, 0, 0, .55);
    font-size: 15px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Просмотр анкеты (view.html) ---------- */
.back-link { display: inline-block; margin-bottom: 18px; color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--accent); }
.view-card {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 28px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
}
.view-photos { min-width: 0; }
.carousel { display: flex; align-items: center; gap: 10px; }
.car-stage { flex: 1; min-width: 0; height: 480px; }
.car-stage img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); display: block; background: #000; }
.car-nav {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.car-nav:hover { border-color: var(--accent); color: var(--accent); }
.car-nav[hidden] { display: none; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid var(--line); background: var(--panel-2); padding: 0; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.active { border-color: var(--accent); }
.photo-count { margin-top: 8px; font-size: 12px; color: var(--muted); }
.view-avatar { height: 260px; font-size: 90px; border-radius: 12px; }
.view-info { display: flex; flex-direction: column; gap: 12px; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.view-bio { color: var(--text); line-height: 1.6; white-space: pre-wrap; }
.view-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.view-actions .btn { flex: 0 0 auto; padding: 10px 24px; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Мобильная адаптация (iPhone / Android) ---------- */
@media (max-width: 720px) {
    body { -webkit-tap-highlight-color: transparent; }

    /* Поля крупнее — иначе iOS зумит страницу при фокусе */
    input, select, textarea { font-size: 16px !important; }

    /* ---------- Навигация ---------- */
    .navbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
    .brand { font-size: 19px; }
    .nav-links { flex-wrap: wrap; gap: 8px 14px; }
    .nav-links a { font-size: 14px; }
    .user-chip { font-size: 13px; }

    /* ---------- Hero ---------- */
    .hero { padding: 44px 16px 36px; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 16px; }

    /* ---------- Контейнер / заголовки ---------- */
    .container { padding: 0 14px 40px; }
    .section-title { font-size: 20px; margin: 28px 0 14px; }

    /* ---------- Статистика ---------- */
    .stats { gap: 10px; margin-bottom: 24px; }
    .stat { padding: 10px 16px; border-radius: 10px; }
    .stat b { font-size: 22px; }
    .stat span { font-size: 12px; }

    /* ---------- Фильтры ---------- */
    .filters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 14px;
    }
    .filters > div:first-child { grid-column: 1 / -1; }
    .filters > div:nth-child(4) { grid-column: 1 / -1; }
    .filters > button { grid-column: 1 / -1; }
    .filters select, .filters input { min-width: 0; padding: 10px 10px; }
    .filters input[type="range"] { min-width: 0; width: 100%; }
    .filters-chk { grid-column: 1 / -1; flex-direction: column; align-items: flex-start; gap: 8px; }

    /* ---------- Лента (UID 130: 2 колонки, чтобы 4 анкеты влезали на экран) ---------- */
    .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .card .avatar { height: 120px; }
    .card-body { padding: 8px 10px; }
    .card-top { margin-bottom: 2px; }
    .card-name { font-size: 14px; }
    .card-meta { font-size: 11px; margin-bottom: 6px; }
    .card-bio, .card .tags, .card-gifts { display: none; }
    .role-badge { font-size: 10px; padding: 2px 6px; }
    .card-actions { gap: 6px; }
    .card-actions .btn { flex: 1; padding: 8px 4px; font-size: 13px; min-height: 38px; }
    .card-actions .btn-fav { flex: 0 0 auto; min-width: 40px; padding: 8px 6px; }

    /* ---------- Случайные анкеты ---------- */
    .brief-grid { grid-template-columns: 1fr; gap: 10px; }
    .brief-card { padding: 10px; gap: 10px; }
    .brief-card .avatar { width: 46px; height: 46px; min-width: 46px; font-size: 16px; border-radius: 8px; }
    .b-name { font-size: 14px; }

    /* ---------- Чат (мессенджер на весь экран) ----------
       UID 142: диалоги слева компактной колонкой иконок, чат справа на всю высоту,
       у сообщений видимый ползунок справа для прокрутки вверх/вниз.
       UID 145: колонка шире (108px), чтобы под иконкой помещался ник мелким шрифтом.
       UID 147: колонка иконок сжата вдвое (54px), диалоги стали шире. */
    .chat-wrap {
        grid-template-columns: 54px 1fr;
        grid-template-rows: 1fr;
        gap: 8px;
        height: calc(100vh - 68px);
        height: calc(100dvh - 68px);
        min-height: 0;
        padding: 0 8px;
        margin: 8px auto 12px;
    }
    .chat-side { max-height: none; }
    .chat-side input { display: none; } /* поиск не помещается в узкую колонку — скрыт на мобильном */
    .chat-main { min-height: 0; }
    .chat-messages {
        padding: 12px;
        gap: 8px;
        min-height: 0;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: var(--line) transparent;
    }
    .chat-messages::-webkit-scrollbar { width: 8px; }
    .chat-messages::-webkit-scrollbar-track { background: transparent; }
    .chat-messages::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
    .chat-messages::-webkit-scrollbar-thumb:hover { background: var(--muted); }
    .msg { max-width: 82%; padding: 9px 12px; font-size: 15px; }
    /* UID 145: поле ввода крупнее, кнопки (подарки/прикрепить/отправить) опущены вниз отдельным рядом.
       UID 146: поле ещё больше (min-height 72px), авто-рост до 160px. */
    .chat-input { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
    .chat-input input,
    .chat-input textarea { flex: 1 1 auto; width: 100%; order: -1; min-width: 0; font-size: 16px; padding: 14px 12px; min-height: 72px; border-radius: 12px; }
    .chat-input textarea { max-height: 160px; line-height: 1.4; }
    .chat-input-btns { display: flex; align-items: center; gap: 8px; }
    .chat-input-btns .btn { flex: 1 1 auto; padding: 12px 10px; font-size: 15px; min-height: 46px; }
    .chat-input-btns .attach { padding: 8px 12px; font-size: 18px; min-height: 46px; }
    .chat-img { max-width: 180px; max-height: 180px; }
    .chat-head { padding: 12px 14px; font-size: 15px; }
    /* UID 130: на мобильном фрейм «Выбери собеседника» скрыт.
       UID 247: иконки избранное/ЧС в шапке чата возвращены (пропадали на мобильном). */
    .chat-head.empty { display: none; }
    .user-item {
        position: relative;
        flex-direction: column;
        gap: 3px;
        padding: 8px 2px;
        align-items: center;
    }
    .user-item > div { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0; max-width: 100%; }
    .user-item .u-sub { display: none; } /* на мобильном под иконкой — только ник */
    .user-item .u-name { font-size: 9px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.15; }
    .user-item .u-name-link { font-size: 10px; border-bottom: none; }
    .user-item .row-del { display: none; }
    .user-item .u-dot { position: absolute; top: 6px; right: 6px; }
    .user-item.active { border-left-color: transparent; background: transparent; }
    .u-ava {
        display: flex;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--panel-2);
        border: 1px solid var(--line);
        color: var(--accent-2);
        font-weight: 700;
        font-size: 15px;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        overflow: hidden;
    }
    .u-ava-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
    .user-item.active .u-ava { border-color: var(--accent); color: var(--accent); }
    .user-item .unread {
        position: absolute;
        top: 2px;
        right: 2px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;
        border-radius: 8px;
        padding: 0 4px;
    }

    /* ---------- Просмотр анкеты ---------- */
    .view-card { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
    .car-nav { width: 34px; height: 34px; font-size: 18px; }
    .car-stage { height: 62vh; }
    .thumb { width: 52px; height: 52px; }
    .view-avatar { height: 220px; font-size: 70px; }
    .view-bio { font-size: 14px; }
    .view-actions .btn { padding: 10px 18px; font-size: 14px; }
    .back-link { margin-bottom: 12px; }

    /* ---------- Формы (редактирование анкеты) ---------- */
    .form-panel { padding: 18px 16px; }
    .form-row { gap: 10px; }
    .form-group { min-width: 120px; }

    /* ---------- Вход / регистрация ---------- */
    /* UID 134: на мобильном плавающая кнопка «Паника» (fixed, правый верх) не
       должна наезжать на заголовок/бренд. Сдвигаем контент ниже кнопки. */
    .auth-body { padding: 52px 12px 12px; }
    .auth-card { padding: 20px 16px; border-radius: 14px; }
    .auth-brand { font-size: 22px; margin-bottom: 18px; }

    /* ---------- Админ ---------- */
    .admin-tabs { gap: 6px; flex-wrap: wrap; }
    .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
    .admin-table th, .admin-table td { padding: 8px 10px; font-size: 13px; }
    .msg-row { flex-wrap: wrap; gap: 6px; }
    .msg-meta { white-space: normal; }
    .send-as { flex-wrap: wrap; }
    .send-as select { max-width: 120px; }
    .send-as input { flex-basis: 100%; }
    .logs-list { max-height: 50vh; }

    /* ---------- Тосты / уведомления ---------- */
    .toast { bottom: 16px; padding: 12px 18px; font-size: 14px; }
    .notify-stack { left: 10px; right: 10px; top: 74px; bottom: auto; max-width: none; }
    .notify { padding: 10px 12px; font-size: 13px; }

    /* ---------- Модальное окно списков ---------- */
    .modal-overlay { padding: 10px; }
    .modal { max-height: 86vh; }
    .stat-user { padding: 8px; }

    /* ---------- Подвал ---------- */
    footer { padding: 22px 16px; font-size: 12px; }
}

/* ---------- 18+ шлюз ---------- */
.agegate {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    background: rgba(10, 10, 14, .97);
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.agegate.hidden { display: none; }
.agegate-card {
    margin: auto;
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
}
.agegate-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 2px solid var(--accent-2);
    color: var(--accent-2);
    font-size: 22px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.agegate-title { margin: 0 0 10px; font-size: 20px; }
.agegate-text { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.agegate-warn { margin: 0 0 22px; font-size: 13px; color: var(--accent-2); }
.agegate-btns { display: flex; flex-direction: column; gap: 10px; }
.agegate-btns .btn { width: 100%; }

/* ---------- Подарки (анкета) — отдельный пункт, под фото ---------- */
.view-gifts {
    grid-column: 1 / -1;
    margin-top: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: var(--panel-2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.gift-low {
    border: 1px dashed var(--accent-2, #e0a53a);
    border-radius: 10px;
    padding: 8px 10px;
    color: #f7d774;
    font-size: 13px;
    background: rgba(247, 215, 116, .08);
}
.view-gifts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
}
.view-gifts-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.view-gifts-ico { font-size: 16px; line-height: 1; }
.gifts-received { display: flex; flex-wrap: wrap; gap: 8px; }
.gift-received {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 10px 6px 8px;
    cursor: pointer;
}
.gift-received:hover { border-color: var(--accent-2, #e0a53a); }
.gift-received .gift-icon { width: 44px; height: 44px; min-width: 44px; }
.gift-received-txt { display: flex; flex-direction: column; line-height: 1.15; gap: 1px; }
.gift-from { font-size: 10px; color: var(--muted); opacity: .85; }
.gift-icon {
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}
.gift-icon-ph { font-size: 44px; line-height: 1; }
/* Светлая подложка под прозрачные иконки в тёмном UI (пикер/чат/список/админка) — на фото оверлей без подложки */
.gift-item .gift-icon,
.gift-received .gift-icon,
.gift-bubble-ico img,
.gift-thumb {
    background: #fff;
    border-radius: 8px;
    padding: 3px;
    box-sizing: border-box;
}
.gift-icon-name { font-size: 12px; color: var(--muted); }
.gift-empty { font-size: 12px; color: var(--muted); }

/* ---------- Мои подарки в анкете (профиль) — UID 127 ---------- */
.p-gifts { display: flex; flex-direction: column; gap: 14px; }
.p-gifts-sec { display: flex; flex-direction: column; gap: 8px; }
.p-gifts-title { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.p-gift {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 8px;
}
.p-gift .gift-icon { width: 44px; height: 44px; min-width: 44px; background: #fff; border-radius: 8px; padding: 3px; box-sizing: border-box; }
.p-gift-info { display: flex; flex-direction: column; line-height: 1.15; gap: 1px; min-width: 0; flex: 1; }
.p-gift-actions { display: flex; gap: 6px; flex-shrink: 0; margin-left: auto; }
@media (max-width: 480px) {
    .p-gift { flex-wrap: wrap; }
    .p-gift-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
}

/* ---------- Подарки в карточке поиска ---------- */
.card-gifts {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 8px;
    cursor: pointer;
}
.card-gift-ico {
    width: 26px;
    height: 26px;
    min-width: 26px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
    padding: 2px;
    box-sizing: border-box;
}
.card-gift-ico-ph {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
}
.card-gift-more { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ---------- Попап «Кто подарил» (клик по подарку на анкете/в поиске) ---------- */
.gift-pop-overlay {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, .72);
    padding: 16px;
}
.gift-pop-overlay[hidden] { display: none; }
.gift-pop {
    background: var(--panel, #1a1a24);
    border: 1px solid var(--line, #2a2a35);
    border-radius: 14px;
    max-width: 380px;
    width: 100%;
    padding: 16px;
    color: var(--text, #e8e8ef);
    box-shadow: 0 12px 44px rgba(0, 0, 0, .55);
    max-height: 80vh;
    overflow-y: auto;
}
.gift-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.gift-pop-head b { font-size: 15px; }
.gift-pop-close { background: none; border: 0; color: var(--muted, #888); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.gift-pop-close:hover { color: var(--text, #e8e8ef); }
.gift-pop-list { display: flex; flex-direction: column; gap: 8px; }
.gift-pop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel-2, #23232f);
    border: 1px solid var(--line, #2a2a35);
    border-radius: 10px;
    padding: 8px 10px;
}
.gift-pop-item .gift-icon { width: 40px; height: 40px; min-width: 40px; }
.gift-pop-info { display: flex; flex-direction: column; line-height: 1.25; gap: 2px; min-width: 0; }
.gift-pop-name { font-size: 13px; font-weight: 600; }
.gift-pop-from { font-size: 12px; color: var(--muted, #888); }
.gift-pop-empty { font-size: 13px; color: var(--muted, #888); text-align: center; padding: 16px 0; }

/* ---------- Модалка выбора подарка ---------- */
.gift-picker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 310;
    padding: 16px;
    overflow-y: auto;
}
.gift-picker[hidden] { display: none; }
.gift-picker-card {
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gift-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
}
.gift-item + .gift-item { margin-top: 8px; }
.gift-item .gift-icon { width: 80px; height: 80px; min-width: 80px; }
.gift-item-name { flex: 1; font-size: 14px; }
.gift-item-price { color: var(--accent-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.gift-item .btn { flex-shrink: 0; }
.gift-item .btn:disabled { opacity: .45; cursor: not-allowed; }
/* Перевод монет (UID 201): без надписи «без комиссии», кнопка отцентрована */
.gift-item.gift-transfer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 14px 12px;
}
.gift-item.gift-transfer .gift-item-name { flex: 0 0 auto; }
.gift-item.gift-transfer .btn { align-self: center; }

/* Будущие платные функции («Подарки в разработке», UID 126) — серые, некликабельны */
.gift-coming-head {
    margin: 14px 0 8px;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}
.gift-item.gift-coming {
    opacity: .55;
    cursor: default;
    border-style: dashed;
    background: transparent;
    pointer-events: none;
    user-select: none;
}
.gift-item.gift-coming .gift-item-name { color: var(--muted); }
.gift-item.gift-coming .gift-item-price { color: var(--muted); }
.gift-coming-tag {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
}

/* ---------- Подарки (админка) ---------- */
.gift-thumb { width: 72px; height: 72px; min-width: 72px; object-fit: contain; vertical-align: middle; }
.gift-thumb-ph { width: 72px; height: 72px; display: inline-flex; align-items: center; justify-content: center; font-size: 36px; }
.gift-admin-section { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 16px; }
.gift-admin-section h4 { margin: 0 0 10px; font-size: 14px; }

/* ---------- Подарки: мобильная адаптация ---------- */
@media (max-width: 720px) {
    .gift-item-name { font-size: 13px; }
    .gift-item .gift-icon { width: 68px; height: 68px; min-width: 68px; }
    .gift-picker-card { padding: 14px; }
    .view-gifts-head { font-size: 12px; }
}

/* ---------- Экран подтверждения почты (auth) ---------- */
.auth-success {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .03);
    text-align: center;
}

/* ---------- Размытие по одному фото + цена + подарки на обложке (19.08.2026) ---------- */
/* Чекбокс «размыть» на миниатюре (профиль и админка) */
.thumb-blur {
    position: absolute;
    bottom: 4px;
    left: 4px;
    z-index: 2;
    background: rgba(0, 0, 0, .55);
    border-radius: 8px;
    padding: 2px 5px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
}
.thumb-blur input { margin: 0; width: 14px; height: 14px; accent-color: var(--accent-2, #f7d774); cursor: pointer; }

/* Карусель анкеты. Оверлей подарков на фото убран (19.08.2026) —
   подарки отдельным разделом внизу и отдельным рядом в карточке. */
.car-stage { position: relative; }

/* Приглушённые размытые миниатюры в карусели анкеты */
.thumb-locked { opacity: .45; position: relative; }
.thumb-locked::after {
    content: '🔒';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #ffd76a;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}

/* Плашка имперсонации (админ вошёл как бот/пользователь) */
.imp-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 14px;
    background: linear-gradient(90deg, #5b3a00, #7a4d00);
    color: #ffe9b3;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.imp-banner button {
    background: #fff;
    color: #5b3a00;
    border: 0;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Пополнение баланса (ЮMoney, Этап 3) ---------- */
/* Кнопка «Пополнить» совмещена с балансом: клик по .nav-coins открывает окно оплаты. */

.pay-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, .72);
    padding: 16px;
}
.pay-overlay[hidden] { display: none; }
.pay-modal {
    background: var(--panel, #1a1a24);
    border: 1px solid var(--line, #2a2a35);
    border-radius: 14px;
    max-width: 400px;
    width: 100%;
    padding: 18px;
    color: var(--text, #e8e8ef);
    box-shadow: 0 12px 44px rgba(0, 0, 0, .55);
    max-height: 90vh;
    overflow-y: auto;
}
.pay-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pay-modal-head b { font-size: 16px; }
.pay-close {
    background: none;
    border: 0;
    color: var(--muted, #888);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.pay-close:hover { color: var(--text, #e8e8ef); }
.pay-balance { font-size: 13px; color: var(--muted, #888); margin-bottom: 10px; }
.pay-balance b { color: #f7d774; }
.pay-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.pay-preset {
    background: var(--panel-2, #23232f);
    border: 1px solid var(--line, #2a2a35);
    border-radius: 10px;
    padding: 12px 8px;
    cursor: pointer;
    color: var(--text, #e8e8ef);
    font-size: 16px;
    font-weight: 700;
    transition: border-color .15s;
}
.pay-preset:hover { border-color: var(--accent-2, #e0a53a); }
.pay-preset small { display: block; font-weight: 400; font-size: 11px; color: var(--muted, #888); margin-top: 2px; }
.pay-qr {
    display: block;
    margin: 12px auto;
    width: 220px;
    height: 220px;
    border-radius: 10px;
    background: #fff;
    padding: 8px;
    object-fit: contain;
}
.pay-note { font-size: 12px; color: var(--muted, #888); line-height: 1.5; margin: 8px 0; }
.pay-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.pay-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.pay-info { text-align: center; font-size: 13px; color: var(--muted, #888); padding: 26px 10px; }
.pay-spin { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: pay-rot .8s linear infinite; }
@keyframes pay-rot { to { transform: rotate(360deg); } }
.pay-custom { display: flex; gap: 8px; margin: 10px 0; }
.pay-custom-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    background: var(--panel-2, #23232f);
    border: 1px solid var(--line, #2a2a35);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text, #e8e8ef);
    font-size: 15px;
}
.pay-custom-input:focus { outline: none; border-color: var(--accent-2, #e0a53a); }
.pay-custom-btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 400px) {
    .pay-custom { flex-direction: column; }
    .pay-custom-input { width: 100%; }
    .pay-custom-btn { width: 100%; }
    /* UID 145: на совсем узких экранах чат-фрейм компактнее, но поле ввода всё равно крупное.
       UID 146: поле ещё выше (min-height 64px). */
    .chat-input { padding: 8px 6px; gap: 6px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
    .chat-input input,
    .chat-input textarea { padding: 12px 10px; min-height: 64px; }
    .chat-input-btns .btn { padding: 10px 8px; font-size: 14px; min-height: 44px; }
    .chat-input-btns .attach { padding: 6px 8px; font-size: 16px; min-height: 44px; }
}

/* Последние операции (история монет) в окне пополнения */
.pay-history { margin-top: 14px; border-top: 1px solid var(--line, rgba(255, 255, 255, .08)); padding-top: 10px; }
.pay-history-head { font-size: 13px; font-weight: 700; color: var(--text, #e8e8ef); margin-bottom: 8px; }
.pay-history-list { display: flex; flex-direction: column; gap: 6px; max-height: 230px; overflow-y: auto; }
.pay-history-item { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 9px; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.ph-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text, #e8e8ef); }
.ph-time { flex: none; color: var(--muted, #888); font-size: 11px; }
.ph-amount { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.ph-plus { color: #7ee0a3; }
.ph-minus { color: #ff8d8d; }
.pay-history-empty { font-size: 12px; color: var(--muted, #888); padding: 8px 2px; }

/* ---------- Кошелёк: услуги для анкеты (UID 216) ---------- */
.wallet-svc-title { font-size: 13px; font-weight: 700; color: var(--text, #e8e8ef); margin: 4px 0 8px; }
.wallet-svc { padding: 11px 13px; border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 12px; background: rgba(255, 255, 255, .03); margin-bottom: 10px; }
.wallet-svc-active { border-color: rgba(247, 215, 116, .5); background: rgba(247, 215, 116, .07); box-shadow: 0 0 18px rgba(247, 215, 116, .12); }
.wallet-svc-soon { opacity: .8; }
.wallet-svc-soon .btn:disabled { opacity: .65; }
.wallet-svc-head { display: flex; align-items: center; gap: 12px; row-gap: 8px; flex-wrap: wrap; }
.wallet-svc-ico { font-size: 24px; line-height: 1; flex: none; }
.wallet-svc-body { flex: 1 1 0; min-width: 120px; }
.wallet-svc-name { font-size: 14px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; color: var(--text, #e8e8ef); }
.wallet-svc-tag { font-size: 10px; font-weight: 700; color: #6b5416; background: #f7d774; border-radius: 8px; padding: 1px 6px; vertical-align: 2px; white-space: nowrap; }
.wallet-svc-desc { font-size: 12px; color: var(--muted, #888); margin: 7px 0 0 36px; line-height: 1.45; }
.wallet-svc .btn-sm { flex: none; white-space: nowrap; }
.wallet-svc-ctl { display: flex; align-items: center; gap: 8px; margin: 9px 0 0 36px; flex-wrap: wrap; }
.wallet-inv-toggle { width: 100%; } /* UID 249: переключатель невидимости — на всю строку, ниже срок */
/* «Выключить невидимость» (услуга активна) — яркая заливка: ghost-стиль (серый текст
   на тёмном, без заливки) на мобильном сливался с фоном и выглядел блёклым. Пока
   невидимость включена — кнопка выключения золотая (как монеты и активная метка),
   тёмный текст #15131a — контрастно и на телефоне. */
.wallet-inv-off { background: #f7d774; border: 1px solid #f7d774; color: #15131a; }
.wallet-inv-off:hover { background: #ffe28a; border-color: #ffe28a; color: #15131a; }
.wallet-inv-off:disabled { opacity: .55; cursor: not-allowed; }
.wallet-svc-ctl-l { flex: none; font-size: 12px; color: var(--muted, #888); }
.wallet-svc-days { flex: 1; min-width: 0; padding: 7px 8px; font-size: 12px; color: var(--text, #e8e8ef); background: rgba(255,255,255,.05); border: 1px solid var(--line, rgba(255,255,255,.14)); border-radius: 8px; }
.wallet-svc-days:focus { outline: none; border-color: var(--accent-2, #e0a53a); }
.pay-topup-title { font-size: 13px; font-weight: 700; color: var(--text, #e8e8ef); margin: 10px 0 4px; }

/* ---------- «Подарки» внутри «Кошелька»: вкладки и каталог (07.09) ---------- */
.pay-modal-head { gap: 10px; }
.pay-tabs { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3px; padding: 3px; background: rgba(255,255,255,.05); border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 11px; }
.pay-tab { border: 0; background: transparent; color: var(--muted, #aaa); font-size: 14px; font-weight: 600; line-height: 1.2; padding: 9px 4px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.pay-tab:hover { color: var(--text, #e8e8ef); background: rgba(255,255,255,.06); }
.pay-tab-active { background: var(--accent-2, #e0a53a); color: #15131a; font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pay-tab-active:hover { color: #15131a; background: var(--accent-2, #e0a53a); }
.pay-tab:disabled { opacity: .5; cursor: default; }

.wallet-gift-to { font-size: 13px; color: var(--muted, #888); margin: 10px 0 2px; }
.wallet-gift-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; padding: 3px 6px 3px 10px; border-radius: 20px; background: rgba(224,165,58,.16); border: 1px solid rgba(224,165,58,.5); color: var(--text, #e8e8ef); font-weight: 700; vertical-align: middle; }
.wallet-gift-chip-x { border: 0; background: none; color: var(--muted, #999); cursor: pointer; font-size: 13px; line-height: 1; padding: 2px; border-radius: 50%; }
.wallet-gift-chip-x:hover { color: #fff; }
.wallet-gift-search { margin-top: 6px; }
.wallet-gift-users { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.wallet-gift-user { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 10px; padding: 8px 10px; cursor: pointer; color: var(--text, #e8e8ef); font-size: 13px; }
.wallet-gift-user:hover { border-color: var(--accent-2, #e0a53a); background: rgba(224,165,58,.08); }
.wallet-gift-user small { display: block; color: var(--muted, #888); font-size: 12px; }
.wallet-gift-user-ico { flex: none; font-size: 16px; }
.wallet-gift-hint { font-size: 12px; color: var(--muted, #888); padding: 4px 2px; }
.wallet-gift-title { font-size: 13px; font-weight: 700; color: var(--text, #e8e8ef); margin: 14px 0 8px; }
/* Компактные строки каталога в окне кошелька (в старом пикере иконка была крупнее) */
#pay-body .gift-item { padding: 7px 10px; }
#pay-body .gift-item .gift-icon { width: 44px; height: 44px; min-width: 44px; }
#pay-body .gift-item.gift-transfer .gift-icon { width: 28px; height: 28px; min-width: 28px; font-size: 18px; }

/* Перевод монет — строка-кнопка НАВЕРХУ вкладки «Подарки» (07.09, код258): видна всегда,
   до выбора получателя. Горизонтальная, кликабельна вся; старая колоночная (.gift-item.gift-transfer)
   была внизу каталога и появлялась только после выбора ника. */
#pay-body .wallet-transfer-slot { margin: 12px 0 2px; }
#pay-body .wallet-transfer-slot .gift-item.gift-transfer {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    transition: border-color .15s;
}
#pay-body .wallet-transfer-slot .gift-item.gift-transfer:hover,
#pay-body .wallet-transfer-slot .gift-item.gift-transfer:focus-visible {
    border-color: var(--accent-2, #e0a53a);
}
#pay-body .wallet-transfer-slot .gift-transfer .gift-icon { flex: none; }
#pay-body .wallet-transfer-slot .gift-transfer .gift-item-name { flex: 1; text-align: left; }
#pay-body .wallet-transfer-slot .gift-transfer .btn { align-self: center; }
#pay-body .wallet-transfer-slot .gift-transfer-to { flex: none; font-size: 12px; color: var(--muted, #888); white-space: nowrap; }
#pay-body .wallet-transfer-slot .gift-transfer-to b { color: var(--accent-2, #e0a53a); }

/* Кнопка «Одарить» 🎁 на карточке анкеты в ленте (объединение подарков и кошелька) */
.btn-gift { background: var(--panel-2, #23232f); color: var(--text, #e8e8ef); border: 1px solid var(--line, #2a2a35); }
.btn-gift:hover { border-color: var(--accent-2, #e0a53a); }
.card-actions .btn-gift { flex: 0 0 auto; min-width: 44px; padding: 9px 8px; font-size: 15px; }
@media (max-width: 480px) {
    .card-actions .btn-gift { min-width: 40px; padding: 8px 6px; }
}

/* ---------- Золотая анкета: подсветка в ленте и анкете (UID 216) ----------
   Окантовка вип-анкеты: заметная золотая рамка + мягкое «дышащее» свечение. */
@keyframes goldGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(247, 215, 116, .32), 0 0 22px rgba(247, 215, 116, .16), inset 0 0 0 1.5px rgba(247, 215, 116, .4); }
    50%      { box-shadow: 0 0 16px rgba(247, 215, 116, .55), 0 0 36px rgba(247, 215, 116, .3), inset 0 0 0 1.5px rgba(247, 215, 116, .6); }
}
.card-gold { border-color: rgba(247, 215, 116, .7); box-shadow: 0 0 8px rgba(247, 215, 116, .32), 0 0 22px rgba(247, 215, 116, .16), inset 0 0 0 1.5px rgba(247, 215, 116, .4); animation: goldGlow 3.2s ease-in-out infinite; }
.card-gold:hover { border-color: rgba(247, 215, 116, .95); box-shadow: 0 0 14px rgba(247, 215, 116, .5), 0 0 30px rgba(247, 215, 116, .28), inset 0 0 0 1.5px rgba(247, 215, 116, .6); animation: none; }
.view-card-gold { border-color: rgba(247, 215, 116, .8) !important; box-shadow: 0 0 10px rgba(247, 215, 116, .4), 0 0 26px rgba(247, 215, 116, .2), inset 0 0 0 1.5px rgba(247, 215, 116, .5); animation: goldGlow 3.2s ease-in-out infinite; }

/* ---------- Кнопка «Паника» и нейтральный оверлей-отчёт (UID 129) ---------- */
/* «Босс-кнопка»: справа вверху на любой странице. По клику — офисная таблица-отчёт,
   возврат через ячейку «вернуться» в правом верхнем углу (красный жирный шрифт). */

/* Серебряная глянцевая кнопка (UID 133): металлический градиент + верхний блик-глянец */
.panic-btn {
    display: inline-flex;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, .08) 48%, rgba(255, 255, 255, 0) 50%),
        linear-gradient(180deg, #fdfdfe 0%, #eef1f5 28%, #dbe1e8 50%, #c3cbd6 72%, #b4bdc9 100%);
    border: 1px solid #9aa5b1;
    color: #2b3138;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    padding: 3px 13px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, .95),
        inset 0 -2px 3px rgba(0, 0, 0, .14),
        0 1px 3px rgba(0, 0, 0, .28);
    transition: filter .15s, box-shadow .15s, transform .1s;
}
.panic-btn:hover {
    filter: brightness(1.07);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 1),
        inset 0 -2px 3px rgba(0, 0, 0, .12),
        0 2px 6px rgba(0, 0, 0, .33);
}
.panic-btn:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, .2),
        0 1px 2px rgba(0, 0, 0, .2);
}

/* Плавающая позиция для страниц без шапки (вход/сброс пароля) */
.panic-btn-float {
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 900;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, .95),
        inset 0 -2px 3px rgba(0, 0, 0, .14),
        0 2px 8px rgba(0, 0, 0, .38);
}

/* Полноэкранный оверлей: нейтральная офисная таблица, скрывает весь сайт */
.panic-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #eef0f3;
    padding: 24px 16px;
    overflow: auto;
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2933;
}
.panic-overlay[hidden] { display: none; }

.panic-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 28px rgba(15, 20, 30, .12);
    max-width: 980px;
    width: 100%;
    padding: 22px 24px;
}

/* Карточки-показатели над таблицей — чтобы отчёт выглядел «умным» */
.panic-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
.panic-kpi {
    background: #f7f8fa;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    padding: 12px 14px;
    min-width: 0;
}
.panic-kpi b { display: block; font-size: 20px; color: #111827; font-weight: 700; white-space: nowrap; }
.panic-kpi span { display: block; font-size: 12px; color: #6b7280; margin-top: 2px; white-space: nowrap; }

/* Сама таблица-отчёт */
.panic-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.panic-table th, .panic-table td {
    border: 1px solid #e3e6ea;
    padding: 8px 11px;
    text-align: left;
    vertical-align: middle;
}
.panic-table thead th { background: #f3f4f6; color: #374151; font-weight: 600; }
.panic-table tbody tr:nth-child(even) { background: #fafbfc; }
.panic-table tbody td { color: #374151; }

/* Верхняя строка: заголовок отчёта + ячейка возврата справа вверху */
.panic-head1 .panic-title {
    background: #fbfcfd;
    font-size: 15px;
    color: #111827;
    font-weight: 700;
}
.panic-back {
    background: #fbfcfd !important;
    color: #c90f1e !important;
    font-weight: 700 !important;
    font-size: 14px;
    text-align: center;
    width: 110px;
    cursor: pointer;
    user-select: none;
    transition: background .15s;
}
.panic-back:hover { background: #fdecee !important; }
.panic-head2 th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }

.panic-foot {
    margin-top: 14px;
    font-size: 12px;
    color: #9ca3af;
    text-align: right;
}

@media (max-width: 720px) {
    .panic-overlay { padding: 10px 8px; }
    .panic-card { padding: 14px 12px; border-radius: 10px; }
    .panic-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
    .panic-kpi b { font-size: 16px; }
    .panic-table { font-size: 12px; min-width: 520px; }
    .panic-back { width: 84px; }
}

/* ---------- Переключатель языка (UID 276) ---------- */
/* Иконка-флаг + выпадающий список языков. Флаги — inline SVG (эмодзи-флаги
   в Windows не отрисовываются). */
.lang-switch { position: relative; display: inline-flex; align-items: center; }
.lang-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 1px solid var(--line); border-radius: 8px;
    padding: 4px 8px; cursor: pointer; color: var(--muted);
    font-size: 13px; font-weight: 700; font-family: inherit;
    transition: color .15s, border-color .15s;
}
.lang-btn:hover { color: var(--text); border-color: var(--accent-2); }
.lang-flag {
    display: inline-flex; width: 20px; height: 14px; border-radius: 2px;
    overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.14);
    flex: 0 0 auto;
}
.lang-flag svg { width: 100%; height: 100%; display: block; }
.lang-code { letter-spacing: .5px; }
.lang-menu {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 10001;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    padding: 6px; min-width: 158px; display: flex; flex-direction: column; gap: 2px;
    box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.lang-item {
    display: flex; align-items: center; gap: 8px; width: 100%;
    background: none; border: 0; color: var(--muted); cursor: pointer;
    padding: 7px 8px; border-radius: 6px; font-size: 14px; text-align: left;
    font-family: inherit;
}
.lang-item:hover { background: var(--panel-2); color: var(--text); }
.lang-item.active { color: var(--text); font-weight: 600; }
/* На окне 18+ переключатель живёт в правом верхнем углу карточки */
.agegate-card { position: relative; }
.lang-switch-gate { position: absolute; top: 10px; right: 10px; }
.lang-switch-gate .lang-menu { right: 0; }
@media (max-width: 720px) {
    .lang-switch-nav .lang-code { display: none; }
    .lang-btn { padding: 4px 6px; }
}
