/* =========================================================
   Astaria — Telegram-style соціальний інтерфейс (tg.css)
   Кольори з :root (accent #26d0b8, accent-3 #7b6cff)
   ========================================================= */

/* ---------- Нижній таббар (головна навігація соціалки) ---------- */
.tg-tabbar {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 520px;
    background: rgba(13, 21, 48, .88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 6px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
    z-index: 1000;
}
.tg-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    color: rgba(230, 246, 251, .5);
    text-decoration: none;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .2px;
    padding: 6px 4px;
    border-radius: 14px;
    transition: color .2s ease, background .2s ease, transform .15s ease;
}
.tg-tab svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tg-tab:active { transform: scale(.9); }
.tg-tab.active { color: var(--accent); }
.tg-tab.active svg { filter: drop-shadow(0 0 10px rgba(38, 208, 184, .5)); }
.tg-tab-badge {
    position: absolute;
    top: 0;
    right: calc(50% - 26px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: .62rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, .5);
    pointer-events: none;
}

/* ---------- Список чатів (спільний для chats / messages / groups) ---------- */
.tg-layout {
    max-width: 1100px;
    margin: 84px auto 90px;
    padding: 0 12px;
}
.tg-panel {
    background: rgba(13, 21, 48, .55);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.tg-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(10, 17, 36, .5);
}
.tg-search svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: rgba(230,246,251,.4); }
.tg-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: .92rem;
}
.tg-search input::placeholder { color: rgba(230, 246, 251, .35); }
.tg-sec {
    padding: 10px 16px 4px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent-2);
    opacity: .8;
}
.tg-filters {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.tg-filter {
    padding: 8px 18px;
    border: none;
    border-radius: 20px;
    background: rgba(255,255,255,.05);
    color: var(--text-dim);
    font-family: inherit;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.tg-filter:hover { background: rgba(255,255,255,.1); }
.tg-filter.active { background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff; }

/* ---------- Обрізання аватара ---------- */
.crop-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 16px; animation: fadeIn .18s ease; }
.crop-overlay[hidden] { display: none; }
.crop-window { width: 100%; max-width: 480px; background: #131629; border: 1px solid rgba(255,255,255,.08); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; }
.crop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.crop-head span { font-weight: 700; }
.crop-close { background: none; border: none; color: var(--text-dim); font-size: 1.1rem; cursor: pointer; padding: 6px; line-height: 1; }
.crop-close:hover { color: var(--text); }
.crop-stage { position: relative; margin: 14px 18px; height: 320px; background: #0d0f1c; overflow: hidden; border-radius: 10px; touch-action: none; user-select: none; }
.crop-img { position: absolute; display: block; max-width: none; pointer-events: none; }
.crop-box { position: absolute; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; touch-action: none; }
.crop-handle { position: absolute; width: 22px; height: 22px; touch-action: none; }
.crop-handle.n, .crop-handle.s { left: 50%; margin-left: -11px; }
.crop-handle.e, .crop-handle.w { top: 50%; margin-top: -11px; }
.crop-handle.n { top: -11px; }
.crop-handle.s { bottom: -11px; }
.crop-handle.e { right: -11px; }
.crop-handle.w { left: -11px; }
.crop-handle.n, .crop-handle.s { cursor: ns-resize; }
.crop-handle.e, .crop-handle.w { cursor: ew-resize; }
.crop-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 0 18px 18px; }
.crop-cancel, .crop-save { border: none; border-radius: 12px; padding: 10px 20px; font-family: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; transition: background .2s, filter .2s; }
.crop-cancel { background: rgba(255,255,255,.08); color: var(--text-dim); }
.crop-cancel:hover { background: rgba(255,255,255,.14); }
.crop-save { background: linear-gradient(135deg, var(--accent), var(--accent-3)); color: #fff; }
.crop-save:hover { filter: brightness(1.08); }
.crop-save:disabled { opacity: .55; cursor: wait; }
.crop-note { margin: -4px 18px 12px; text-align: center; font-size: .85rem; color: var(--accent); min-height: 1.1em; }

/* ---------- Український вибір дати народження ---------- */
.tg-bd-picker { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 8px; }
.tg-bd-picker select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 10px;
    background: rgba(10,17,36,.6);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 12px;
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .3s, box-shadow .3s;
}
.tg-bd-picker select:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(77,208,225,.15); }
.tg-bd-picker select option { background: #0d1530; color: var(--text); }
.tg-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text);
    transition: background .15s ease;
    border-bottom: 1px solid rgba(255,255,255,.03);
}
.tg-row:last-child { border-bottom: none; }
.tg-row:hover { background: rgba(38, 208, 184, .06); }
.tg-row.active { background: rgba(38, 208, 184, .1); }
.tg-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #03231c;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    overflow: hidden;
}
.tg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tg-avatar.online::after {
    content: "";
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid #0d1530;
    box-shadow: 0 0 8px rgba(38, 208, 184, .8);
}
.tg-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tg-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tg-row-title { font-size: .94rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-row-time { font-size: .66rem; color: rgba(230,246,251,.45); flex-shrink: 0; }
.tg-row-last { font-size: .8rem; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.tg-unread {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--accent);
    color: #03231c;
    font-size: .68rem;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    flex-shrink: 0;
    margin-left: auto;
}
.tg-row-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tg-pin { color: var(--accent-2); font-size: .78rem; }
.tg-empty { padding: 46px 20px; text-align: center; color: var(--text-dim); font-size: .9rem; line-height: 1.6; }

/* ---------- Переписка (thread) ---------- */
.tg-thread {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 150px);
    min-height: 420px;
    background: rgba(7, 11, 22, .35);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
}
.tg-thread-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(13, 21, 48, .7);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.tg-thread-head .tg-avatar { width: 38px; height: 38px; font-size: .95rem; }
.tg-thread-title { font-weight: 700; font-size: .95rem; color: var(--text); text-decoration: none; line-height: 1.2; }
.tg-thread-title:hover { color: var(--accent-2); }
.tg-thread-status { font-size: .72rem; color: var(--text-dim); }
.tg-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: var(--accent-2);
    background: rgba(38,208,184,.1);
    text-decoration: none;
    flex-shrink: 0;
}
.tg-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tg-thread-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tg-thread-scroll::-webkit-scrollbar { width: 6px; }
.tg-thread-scroll::-webkit-scrollbar-thumb { background: rgba(38, 208, 184, .35); border-radius: 4px; }
.tg-day {
    align-self: center;
    margin: 12px 0 8px;
    padding: 3px 12px;
    border-radius: 20px;
    background: rgba(38, 208, 184, .1);
    border: 1px solid rgba(38, 208, 184, .25);
    color: var(--accent-2);
    font-size: .68rem;
    font-weight: 700;
}
.tg-msg { display: flex; }
.tg-msg.mine { justify-content: flex-end; }
.tg-msg-av {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    margin: 2px 8px 0 0;
    align-self: flex-start;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    font-weight: 800;
    color: #03231c;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    overflow: hidden;
    text-decoration: none;
}
.tg-msg-av img { width: 100%; height: 100%; object-fit: cover; }
.tg-bubble {
    position: relative;
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 14px;
    background: #17212b;
    border: 1px solid rgba(255,255,255,.05);
    margin: 2px 0;
}
.tg-bubble.tail { border-top-left-radius: 4px; }
.tg-msg.mine .tg-bubble {
    background: linear-gradient(135deg, rgba(38, 208, 184, .85), rgba(28, 174, 155, .9));
    color: #04221c;
    border-color: transparent;
    border-top-right-radius: 4px;
}
.tg-bubble-author { display: block; font-size: .72rem; font-weight: 800; color: var(--accent-2); margin-bottom: 2px; text-decoration: none; }
.tg-bubble-author:hover { text-decoration: underline; }
.tg-msg.mine .tg-bubble-author { color: rgba(4, 34, 28, .85); }
.tg-bubble-text { font-size: .92rem; line-height: 1.5; word-wrap: break-word; white-space: pre-wrap; }
.tg-bubble-time { display: block; text-align: right; font-size: .64rem; color: rgba(230, 246, 251, .45); margin-top: 3px; }
.tg-msg.mine .tg-bubble-time { color: rgba(4, 34, 28, .6); }
.tg-bubble-like {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    padding: 2px 9px;
    border: 1px solid rgba(255, 107, 107, .35);
    border-radius: 20px;
    background: rgba(255, 107, 107, .08);
    color: rgba(255, 107, 107, .8);
    font-family: inherit;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, color .2s, transform .15s;
}
.tg-bubble-like:hover { background: rgba(255, 107, 107, .2); color: #ff8a8a; transform: scale(1.05); }
.tg-bubble-like.liked { background: rgba(255, 107, 107, .25); border-color: rgba(255, 107, 107, .6); color: #ff6b6b; }
.tg-msg.mine .tg-bubble-like { color: rgba(4,34,28,.8); border-color: rgba(4,34,28,.4); background: rgba(4,34,28,.12); }
.tg-bubble-like-st {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    padding: 2px 9px;
    border: 1px solid rgba(255, 107, 107, .3);
    border-radius: 20px;
    background: rgba(255, 107, 107, .06);
    color: rgba(255, 107, 107, .65);
    font-size: .7rem;
    font-weight: 800;
    cursor: default;
}
.tg-thread-input {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(13, 21, 48, .7);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(8px);
}
.tg-thread-input textarea {
    flex: 1;
    min-height: 42px;
    max-height: 120px;
    resize: none;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: #17212b;
    color: var(--text);
    font-family: inherit;
    font-size: .92rem;
    margin: 0;
}
.tg-thread-input textarea:focus { outline: none; border-color: var(--accent); }
.tg-send {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: var(--accent);
    color: #04221c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s, filter .2s;
}
.tg-send svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.tg-send:hover { transform: scale(1.06); filter: brightness(1.06); }
.tg-send:disabled { opacity: .5; cursor: default; transform: none; }
.tg-ban { padding: 8px 16px 10px; color: var(--danger); font-size: .82rem; text-align: center; }
.tg-online { padding: 8px 16px; font-size: .78rem; color: var(--text-dim); border-bottom: 1px solid var(--border); }

/* ---------- Профіль (як Telegram) ---------- */
.tg-profile {
    max-width: 640px;
    margin: 84px auto 100px;
    padding: 28px 20px;
    text-align: center;
    background: rgba(13, 21, 48, .55);
    border: 1px solid var(--border);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}
.tg-profile-avatar {
    width: 104px;
    height: 104px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 800;
    color: #03231c;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    box-shadow: 0 12px 30px rgba(38, 208, 184, .35);
    overflow: hidden;
}
.tg-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tg-cab-avatar-wrap { position: relative; width: 104px; margin: 0 auto 14px; }
.tg-cab-avatar-wrap .tg-profile-avatar { width: 104px; height: 104px; margin: 0; }
.cab-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,.4);
    transition: transform .2s;
}
.cab-avatar-edit:hover { transform: scale(1.1); }
.tg-profile-name { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.4px; word-wrap: break-word; }
.tg-profile-status { margin: 4px 0 0; font-size: .82rem; color: var(--text-dim); }
.tg-profile-bio { margin: 14px auto 0; max-width: 460px; font-size: .92rem; line-height: 1.6; color: var(--text); white-space: pre-wrap; word-wrap: break-word; }
.tg-profile-stats { display: flex; justify-content: center; gap: 10px; margin: 20px 0 0; }
.tg-profile-stat { padding: 10px 18px; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 14px; min-width: 84px; }
.tg-profile-stat b { display: block; font-size: 1.2rem; font-weight: 800; color: var(--accent-2); }
.tg-profile-stat span { font-size: .7rem; color: var(--text-dim); }
.tg-profile-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-3));
    transition: transform .18s, filter .2s;
}
.tg-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.tg-btn.ghost { background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-dim); }
.tg-btn.ghost:hover { color: var(--text); }
.tg-btn.danger { background: rgba(255, 107, 107, .14); border: 1px solid rgba(255,107,107,.4); color: var(--danger); }
.tg-btn.block { width: 100%; }
.tg-btn.on { background: rgba(38,208,184,.12); border: 1px solid rgba(38,208,184,.45); color: var(--accent-2); }
.tg-profile-section {
    max-width: 640px;
    margin: 14px auto 0;
    text-align: left;
    background: rgba(13, 21, 48, .55);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}
.tg-section-h { margin: 0 0 12px; font-size: .9rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; }
.tg-friends { display: flex; flex-wrap: wrap; gap: 10px; }
.tg-friend { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 76px; text-decoration: none; color: var(--text); padding: 8px 4px; border-radius: 12px; transition: background .2s; }
.tg-friend:hover { background: rgba(38,208,184,.08); }
.tg-friend .tg-avatar { width: 48px; height: 48px; font-size: 1rem; }
.tg-friend span { font-size: .66rem; text-align: center; max-width: 72px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Налаштування (profile.php) ---------- */
.tg-settings { max-width: 520px; margin: 84px auto 100px; }
.tg-settings-card {
    background: rgba(13, 21, 48, .55);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
}
.tg-settings-card h3 { margin: 0 0 12px; font-size: .9rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: .6px; }
.tg-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.tg-field label { font-size: .78rem; font-weight: 700; color: var(--text-dim); }
.tg-field textarea, .tg-field select, .tg-field input {
    padding: 10px 12px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: #17212b;
    color: var(--text);
    font-family: inherit;
    font-size: .92rem;
    width: 100%;
}
.tg-field textarea:focus, .tg-field select:focus, .tg-field input:focus { outline: none; border-color: var(--accent); }

/* ---------- Список людей (контакти) ---------- */
.tg-contacts { max-width: 640px; margin: 84px auto 100px; }
.tg-contacts .tg-search { border-radius: 14px; margin-bottom: 12px; border: 1px solid var(--border); background: rgba(13,21,48,.6); }
.tg-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; justify-content: center; }
.tg-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-dim);
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s, color .2s;
}
.tg-chip:hover { border-color: rgba(38,208,184,.45); color: var(--text); }
.tg-chip input { accent-color: var(--accent); margin: 0; }

/* ---------- 3-панель на десктопі ---------- */
/* Особисті повідомлення: або список, або переписка (як «Спільний чат») */
.tg-msg-thread .tg-list-col { display: none; }
.tg-msg-list .tg-thread { display: none; }

/* ховаємо скролбари в чатах/списках */
.tg-list-col, #tgChatList, .pm-list, .tg-thread-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tg-list-col::-webkit-scrollbar, #tgChatList::-webkit-scrollbar,
.pm-list::-webkit-scrollbar, .tg-thread-scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

@media (min-width: 900px) {
    .tg-layout.grid { display: grid; grid-template-columns: 340px 1fr; gap: 12px; align-items: stretch; }
    .tg-layout.grid .tg-thread { height: calc(100vh - 210px); }
    .tg-list-col { overflow-y: auto; max-height: calc(100vh - 210px); }
    .tg-msg-thread .tg-thread { height: calc(100vh - 210px); }
    .tg-panel { height: auto; }
    .tg-tabbar { max-width: 720px; width: calc(100% - 48px); }
}
@media (max-width: 899px) {
    .tg-layout { margin: 72px auto 96px; padding: 0 10px; }
    .tg-thread { height: calc(100vh - 130px); }

    /* Чати: на мобільному тільки список з внутрішнім скролом */
    .tg-chats .tg-list-col { display: flex; flex-direction: column; max-height: calc(100vh - 180px); }
    .tg-chats #tgChatList { flex: 1; overflow-y: auto; min-height: 0; }
    .tg-chats .tg-thread-empty { display: none; }

    /* Особисті повідомлення: або список, або переписка */
    .tg-msg-list .tg-list-col { max-height: calc(100vh - 180px); overflow-y: auto; }
    .tg-msg-thread .tg-thread { height: calc(100vh - 130px); }
}
