/* ZaxSocial · css/telegram.css — Telegram bundle styles. Design blocks (.zs-tg-*, components.css §13) are used as-is;
   this file only adds .zs-tg-x-* blocks (+ the .zs-tg-drawer block) and platform variants via html[data-platform].
   Tokens only (--zs-tg-*, --zs-*); touch targets ≥ 44 px; inputs ≥ 16 px; reduced-motion aware.
   Owner: U7. Docs: 11-telegram-f.md §7–§8; 11-telegram-e.md §3–§5; board 05-telegram (tgx-* helpers promoted here). */

/* ---------------------------------------------------------------- screen roots */
[data-channel="tg"] { --zs-switch-on: var(--zs-tg-accent); }
html.is-tg .zs-btn--primary { background: var(--zs-gradient-sheen), var(--zs-tg-fab); }
/* Telegram blue for native controls inside the TG section (board 05: violet only where ZaxSocial AI writes). html.is-tg is set by tg-nav. */
html.is-tg { --zs-accent: var(--zs-tg-accent); --zs-accent-hover: var(--zs-tg-accent); --zs-accent-pressed: var(--zs-tg-fab); --zs-accent-soft: var(--zs-tg-quote-bg-in); --zs-accent-soft-2: var(--zs-tg-quote-bg-in); --zs-accent-text: var(--zs-tg-accent); --zs-accent-ink: var(--zs-tg-accent); --zs-shadow-accent: var(--zs-shadow-sm); --zs-switch-on: var(--zs-tg-accent); }
.zs-tg.zs-tg-x-page, .zs-tg.zs-tg-x-inbox, .zs-tg.zs-tg-x-contacts { height: auto; min-height: 100%; overflow: visible; }
.zs-tg-x-page { padding: 12px 0 calc(var(--zs-safe-bottom) + 96px); background: var(--zs-tg-bg-2); }
.zs-tg.zs-tg-x-inbox, .zs-tg.zs-tg-x-contacts { min-height: calc(100dvh - var(--zs-topbar-h)); background: var(--zs-tg-bg); }
.zs-tg-iosbar__right .zs-iconbtn, .zs-tg-iosbar__left .zs-topbar__back { color: var(--zs-tg-accent-ios); }
.zs-tg-x-pagebody { display: flex; flex-direction: column; gap: 4px; }
.zs-tg-x-page > .zs-savebar[hidden] { display: none; }
#zs-app.has-tabbar .zs-tg-x-page > .zs-savebar { bottom: calc(var(--zs-tabbar-h) + 16px + var(--zs-safe-bottom)); }
.zs-tg-x-chatscreen { height: 100%; }
.zs-tg-x-async { min-height: 40vh; }
.zs-tg-x-muted { color: var(--zs-tg-text-2); font-size: 14px; line-height: 19px; }
.zs-tg-x-mono { font-family: var(--zs-font-mono); font-size: 13px; }
.zs-tg-x-note { margin-top: 10px; font-size: 13px; line-height: 18px; color: var(--zs-tg-text-2); }
.zs-tg-x-broadcast-panel { display: grid; gap: 12px; margin: 0 16px 20px; }
.zs-tg-x-broadcast-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.zs-tg-x-broadcast-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; width: 100%; padding: 14px; border: 1px solid var(--zs-tg-divider); border-radius: 12px; background: var(--zs-tg-bg); color: var(--zs-tg-text); text-align: left; }
.zs-tg-x-broadcast-card:hover { border-color: var(--zs-tg-accent); }
.zs-tg-x-broadcast-card > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-tg-x-broadcast-card > small { grid-column: 1 / -1; color: var(--zs-tg-text-2); }
.zs-tg-x-broadcast-counts { display: flex; flex-wrap: wrap; gap: 7px; }
.zs-tg-x-broadcast-stat { padding: 6px 8px; border-radius: 8px; background: var(--zs-tg-bg-2); color: var(--zs-tg-text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
.zs-tg-x-broadcast-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--zs-tg-text-2); font-size: 12px; }
.zs-tg-x-broadcast-recipients { display: grid; gap: 1px; }
.zs-tg-x-broadcast-recipients article { display: flex; min-height: 48px; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--zs-tg-divider); }
.zs-tg-x-broadcast-recipients strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-tg-x-broadcast-recipients small { max-width: 35%; color: var(--zs-tg-text-2); overflow-wrap: anywhere; }
.zs-tg-x-intro { margin: 4px 20px 12px; font-size: 14.5px; line-height: 20px; color: var(--zs-tg-text-2); }
.zs-tg-x-danger { color: var(--zs-tg-danger); }
.zs-tg-x-splitempty { display: grid; place-items: center; height: 100%; background-image: var(--zs-tg-pattern), var(--zs-tg-chat-bg); background-size: 420px 420px, cover; }
.zs-tg-x-splitempty .zs-empty { padding: 28px; border-radius: var(--zs-r-xl); background: var(--zs-tg-bg); box-shadow: var(--zs-shadow-md); }

/* Inset groups in Telegram Settings colours (Z.ui.list inside TG pages). */
.zs-tg-settings .zs-listgroup { margin: 0 0 6px; }
.zs-tg-settings .zs-listgroup + .zs-listgroup .zs-list__header { padding-top: 10px; }
.zs-tg-settings .zs-list--inset { margin: 0 16px; border-radius: 12px; background: var(--zs-tg-bg); box-shadow: none; }
.zs-tg-settings .zs-list__header { padding: 14px 32px 7px; font-size: 13px; line-height: 16px; text-transform: uppercase; letter-spacing: .01em; color: var(--zs-tg-text-2); }
.zs-tg-settings .zs-list__footer { padding: 7px 32px 0; font-size: 13px; line-height: 17px; color: var(--zs-tg-text-2); }
.zs-tg-settings .zs-item { min-height: 48px; color: var(--zs-tg-text); }
.zs-tg-settings .zs-item__value { color: var(--zs-tg-text-2); }
.zs-tg-settings .zs-item__sub { color: var(--zs-tg-text-2); }
.zs-tg-settings .zs-tile-icon { width: 29px; height: 29px; border-radius: 7px; }
html[data-platform="android"] .zs-tg-settings .zs-list--inset { margin: 0; border-radius: 0; }
html[data-platform="android"] .zs-tg-settings .zs-list__header { padding-left: 20px; text-transform: none; font-size: 14.5px; font-weight: 600; color: var(--zs-tg-accent); }
.zs-tg-group.zs-tg-x-form { display: flex; flex-direction: column; gap: 14px; margin: 0 16px 18px; padding: 16px; }
html[data-platform="android"] .zs-tg-group.zs-tg-x-form { margin: 0 0 18px; border-radius: 0; }
.zs-tg-x-form .zs-input, .zs-tg-x-form .zs-textarea { font-size: 16px; }
.zs-tg-x-sechead { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 32px 7px; font-size: 13px; line-height: 16px; text-transform: uppercase; letter-spacing: .01em; color: var(--zs-tg-text-2); }
.zs-tg-x-sechead .zs-tg-x-muted { font-size: 13px; text-transform: none; }
.zs-tg-x-btnstack { display: flex; flex-direction: column; gap: 10px; margin: 6px 16px 18px; }
.zs-tg-x-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.zs-tg-x-chiprow { flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
.zs-tg-x-count { font-size: 12.5px; color: var(--zs-tg-text-2); font-variant-numeric: tabular-nums; }
.zs-tg-x-count.is-over { color: var(--zs-tg-danger); }

/* ---------------------------------------------------------------- list rows */
.zs-tg-x-listhost { position: relative; }
.zs-tg-x-listbody > .zs-banner { margin: 8px 12px; }
.zs-tg-x-skel .zs-skel-row { height: 76px; padding: 0 10px; gap: 12px; }
.zs-tg-row { cursor: pointer; transition: background-color var(--zs-dur-fast) var(--zs-ease-standard); }
.zs-tg-row:hover { background: var(--zs-tg-bg-2); }
.zs-tg-row:focus-visible { outline: 2px solid var(--zs-tg-accent); outline-offset: -2px; }
.zs-tg-row.is-selected { background: var(--zs-tg-quote-bg-in); }
.zs-tg-row.is-pinned { background: var(--zs-tg-bg-2); }
html[data-platform="ios"] .zs-tg-row.is-pinned { background: var(--zs-tg-bg-2); }
.zs-tg-x-typing { color: var(--zs-tg-accent); }
.zs-tg-x-dots { display: inline-block; width: 18px; height: 6px; margin-left: 3px; vertical-align: 1px; background: radial-gradient(circle, currentColor 1.6px, transparent 2px) 0 50% / 6px 6px repeat-x; animation: zs-typing-dots 1.2s steps(3) infinite; }
.zs-tg-x-tick { width: 17px; height: 17px; color: var(--zs-tg-tick); }
.zs-tg-x-tick.is-pending { color: var(--zs-tg-meta-in); }
.zs-tg-x-tick.is-failed { color: var(--zs-tg-danger); }
.zs-tg-x-tick.is-blue { color: #53bdeb; }
.zs-tg-x-bizbadge { flex: none; height: 17px; padding: 0 5px; border-radius: 5px; background: var(--zs-tg-quote-bg-in); color: var(--zs-tg-accent); font-size: 11px; line-height: 17px; font-weight: 600; }
.zs-tg-row.is-botblocked .zs-tg-row__preview { color: var(--zs-tg-danger); }
.zs-avatar.zs-tg-x-archav { background: var(--zs-lit-8e8e93); color: var(--zs-lit-ffffff); }
[data-theme="dark"] .zs-avatar.zs-tg-x-archav { background: var(--zs-lit-3b4a54); }
.zs-avatar.zs-tg-x-archav .zi { width: 27px; height: 27px; --zi-stroke: 1.8; }
.zs-tg-x-contact { height: 64px; }
.zs-tg-x-contact .zs-avatar { --size: 44px; font-size: 17px; }
.zs-tg-x-contact .zs-tg-row__name { flex: none; }
.zs-tg-x-contact .zs-tg-row__body { gap: 1px; }
.zs-tg-row__name .zi.zs-tg-x-premium { color: var(--zs-tg-accent); width: 16px; height: 16px; }
.zs-tg-x-contact__sub { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14.5px; color: var(--zs-tg-text-2); white-space: nowrap; overflow: hidden; }
.zs-tg-x-label { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--zs-fill); color: var(--zs-text-secondary); }
.zs-tg-x-label--green { background: var(--zs-success-soft); color: var(--zs-success-ink); }
.zs-tg-x-label--blue { background: var(--zs-info-soft); color: var(--zs-info-ink); }
.zs-tg-x-label--orange { background: var(--zs-warning-soft); color: var(--zs-warning-ink); }
.zs-tg-x-label--red, .zs-tg-x-label--pink { background: var(--zs-danger-soft); color: var(--zs-danger-ink); }
.zs-tg-x-label--violet { background: var(--zs-accent-soft); color: var(--zs-accent-ink); }
.zs-tg-x-label--teal { background: var(--zs-info-soft); color: var(--zs-info-ink); }
.zs-tg-x-premium { width: 16px; height: 16px; color: var(--zs-tg-accent); }
.zs-tg-x-toprows .zs-item { min-height: 52px; padding-left: 16px; color: var(--zs-tg-accent-ios); }
.zs-tg-x-toprows { margin-bottom: 4px; }

/* ---------------------------------------------------------------- folders, FAB, drawer */
.zs-tg-folders { position: relative; }
.zs-tg-x-folderline { position: absolute; left: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--zs-lit-ffffff); transition: transform var(--zs-dur-base) var(--zs-ease-standard), width var(--zs-dur-base) var(--zs-ease-standard); }
.zs-tg-folders .zs-tg-folder.is-active::after { display: none; }
.zs-tg-x-inbox .zs-tg-fab { position: fixed; bottom: calc(var(--zs-safe-bottom) + 16px); }
.zs-tg-x-drawerwrap { position: fixed; inset: 0; z-index: var(--zs-z-sheet); }
.zs-tg-x-drawerscrim { position: absolute; inset: 0; background: var(--zs-lit-000000-38); opacity: 0; }
.zs-tg-drawer { z-index: 1; position: absolute; top: 0; bottom: 0; left: 0; width: min(302px, 84vw); display: flex; flex-direction: column; background: var(--zs-tg-bg); color: var(--zs-tg-text); box-shadow: 6px 0 28px var(--zs-lit-000000-25); outline: none; will-change: transform; overflow-y: auto; }
.zs-tg-drawer__head { position: relative; padding: calc(var(--zs-safe-top) + 16px) 20px 16px; background: var(--zs-tg-appbar); color: var(--zs-lit-ffffff); }
.zs-tg-drawer__head .zs-avatar { --size: 64px; font-size: 24px; box-shadow: 0 0 0 2px var(--zs-lit-ffffff-22); }
.zs-tg-drawer__name { margin-top: 16px; font-size: 16px; line-height: 21px; font-weight: 600; }
.zs-tg-drawer__sub { margin-top: 1px; font-size: 14px; line-height: 19px; color: var(--zs-lit-ffffff-72); }
.zs-tg-drawer__chip { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; margin-top: 10px; padding: 0 10px; border-radius: 15px; background: var(--zs-lit-ffffff-18); color: var(--zs-lit-ffffff); font-size: 13px; font-weight: 600; }
.zs-tg-drawer__list { padding: 6px 0; }
.zs-tg-drawer__item { display: flex; align-items: center; gap: 30px; min-height: 48px; padding: 0 16px 0 20px; font-size: 15.5px; font-weight: 500; color: var(--zs-tg-text); text-decoration: none; }
.zs-tg-drawer__item:hover, .zs-tg-drawer__item:focus-visible { background: var(--zs-tg-bg-2); outline: none; }
.zs-tg-drawer__item > .zi { width: 24px; height: 24px; color: var(--zs-tg-icon); }
.zs-tg-drawer__item .zs-tg-unread { margin-left: auto; }
.zs-tg-drawer__item--zs { color: var(--zs-accent-text); }
.zs-tg-drawer__item .zs-mark { width: 24px; height: 24px; border-radius: 7px; box-shadow: none; }
.zs-tg-drawer__sep { height: 1px; margin: 6px 0; background: var(--zs-tg-divider); }
.zs-tg-drawer__foot { margin-top: auto; padding: 12px 20px calc(var(--zs-safe-bottom) + 14px); font-size: 12.5px; line-height: 17px; color: var(--zs-tg-text-2); }

/* ---------------------------------------------------------------- chat: bars, bubbles */
.zs-tg-x-bars { position: relative; z-index: 1; }
.zs-tg-x-bars > .zs-tg-pinned { animation: zs-tg-x-slide var(--zs-dur-base) var(--zs-ease-decelerate) both; }
@keyframes zs-tg-x-slide { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }
.zs-tg-pinned__btn { display: inline-flex; align-items: center; gap: 5px; }
.zs-tg-pinned__btn .zi { width: 15px; height: 15px; --zi-stroke: 2.1; }
[data-theme="dark"] .zs-tg-pinned__btn, [data-theme="dark"] .zs-tg-send { background: var(--zs-tg-fab); }
.zs-tg-pinned__btn.zs-tg-x-tonal { background: var(--zs-tg-quote-bg-in); color: var(--zs-tg-accent); }
.zs-tg-x-takeover.is-human .zs-tg-pinned__bar { background: var(--zs-warning); }
.zs-tg-x-takeover.is-human .zs-tg-pinned__title { color: var(--zs-warning-ink); }
.zs-tg-x-takeover .zs-tg-pinned__title .zi { width: 14px; height: 14px; }
.zs-tg-pinned.zs-tg-x-compact { height: 40px; }
.zs-tg-pinned.zs-tg-x-compact .zs-tg-pinned__text { display: none; }
.zs-tg-x-blockbar .zs-tg-pinned__bar { background: var(--zs-tg-danger); }
.zs-tg-x-blockbar .zs-tg-pinned__title { color: var(--zs-tg-danger); }
.zs-tg-x-blockbar .zs-tg-pinned__text { white-space: normal; font-size: 13.5px; line-height: 17px; }
.zs-tg-x-blockbar { height: auto; min-height: 52px; padding-top: 6px; padding-bottom: 6px; }
.zs-tg-msg.is-highlight .zs-tg-bubble { animation: zs-tg-x-flash 1.2s var(--zs-ease-standard); }
@keyframes zs-tg-x-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--zs-tg-accent), var(--zs-tg-bubble-shadow); } 100% { box-shadow: var(--zs-tg-bubble-shadow); } }
.zs-tg-msg--out .zs-tg-bubble { transform-origin: bottom right; }
.zs-tg-msg--in .zs-tg-bubble { transform-origin: bottom left; }
.zs-tg-x-col { display: flex; flex-direction: column; max-width: 80%; min-width: 0; }
.zs-tg-x-col > .zs-tg-bubble { max-width: 100%; }
.zs-tg-x-text { white-space: pre-wrap; }
.zs-tg-x-fwd { display: block; margin-bottom: 2px; font-size: 14px; line-height: 18px; font-weight: 600; color: var(--zs-tg-accent); }
.zs-tg-msg--out .zs-tg-x-fwd { color: var(--zs-tg-link-out); }
.zs-tg-x-auto { color: var(--zs-tg-text-2); }
.zs-tg-x-revoked .zs-tg-x-text { font-style: italic; color: var(--zs-tg-text-2); }
.zs-tg-x-metaover { position: absolute; right: 8px; bottom: 7px; float: none; margin: 0; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--zs-lit-000000-35); color: var(--zs-lit-ffffff); }
.zs-tg-x-metaover .zi { color: var(--zs-lit-ffffff); }
.zs-tg-x-retry { display: block; margin-top: 4px; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--zs-tg-danger); }
.zs-tg-x-photocap { width: 280px; max-width: 80%; padding: 0; overflow: hidden; }
.zs-tg-x-col > .zs-tg-x-photocap { max-width: 100%; }
.zs-tg-x-photocap > .zs-tg-x-reactline, .zs-tg-x-photocap > .zs-tg-meta { margin: 0 10px 7px 11px; }
.zs-tg-x-photocap > .zs-tg-meta { margin-top: -4px; }
.zs-tg-x-photocap__img { display: block; width: calc(100% - 4px); height: 196px; margin: 2px 2px 0; border-radius: 14px 14px 4px 4px; background-size: cover; background-position: center; background-color: var(--zs-tg-bg-2); }
.zs-tg-x-photocap__cap { padding: 6px 10px 7px 11px; }
.zs-tg-photo__img { position: relative; display: grid; place-items: center; max-width: 100%; background-color: var(--zs-tg-bg-2); }
.zs-tg-x-video .zs-tg-x-play { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--zs-lit-000000-50); color: var(--zs-lit-ffffff); }
.zs-tg-x-video .zs-tg-x-play .zi { width: 24px; height: 24px; margin-left: 3px; }
.zs-tg-x-dur { position: absolute; left: 8px; top: 8px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--zs-lit-000000-50); color: var(--zs-lit-ffffff); font-size: 12px; line-height: 20px; font-variant-numeric: tabular-nums; }
.zs-tg-x-roundwrap { padding: 0; background: transparent; box-shadow: none; }
.zs-tg-x-video.is-round { width: 220px; height: 220px; border-radius: 50%; }
.zs-tg-x-audioname { font-size: 15px; font-weight: 600; }
.zs-tg-x-docb { min-width: 240px; }
.zs-tg-x-doc { display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; }
.zs-tg-x-doc__ic { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--zs-tg-accent); color: var(--zs-lit-ffffff); }
.zs-tg-msg--out .zs-tg-x-doc__ic { background: var(--zs-lit-5dc452); }
.zs-tg-x-doc__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.zs-tg-x-doc__name { font-size: 15px; line-height: 19px; font-weight: 600; }
.zs-tg-x-doc__size { font-size: 13px; color: var(--zs-tg-meta-in); }
.zs-tg-x-bare .zs-tg-bubble, .zs-tg-x-sticker { padding: 0; background: transparent; box-shadow: none; }
.zs-tg-x-bare .zs-tg-bubble::before { display: none; }
.zs-tg-x-sticker__img { display: block; width: 160px; height: 160px; object-fit: contain; }
.zs-tg-x-bigemoji { display: block; font-size: 96px; line-height: 1.1; }
.zs-tg-x-locb { padding: 0; overflow: hidden; min-width: 240px; }
.zs-tg-x-loc { display: block; color: inherit; text-decoration: none; }
.zs-tg-x-loc__map { display: grid; place-items: center; height: 120px; background: var(--zs-tg-quote-bg-in); color: var(--zs-tg-accent); }
.zs-tg-x-loc__map .zi { width: 36px; height: 36px; }
.zs-tg-x-loc__body { display: flex; flex-direction: column; gap: 1px; padding: 7px 11px 9px; font-size: 14px; line-height: 19px; }
.zs-tg-x-contactb { min-width: 240px; }
.zs-tg-x-ccard { display: flex; align-items: center; gap: 10px; }
.zs-tg-x-ccard .zs-avatar { --size: 44px; }
.zs-tg-x-ccard__body { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 14px; }
.zs-tg-x-unavail { display: flex; align-items: center; gap: 8px; padding: 10px 2px; max-width: 260px; font-size: 13.5px; line-height: 18px; color: var(--zs-tg-text-2); }
.zs-tg-x-unavail .zi { flex: none; width: 20px; height: 20px; color: var(--zs-tg-danger); }
.zs-tg-x-album { display: grid; gap: 2px; width: 280px; max-width: 100%; margin: 2px 2px 0; border-radius: 14px 14px 4px 4px; overflow: hidden; grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
.zs-tg-x-album[data-n="3"] { grid-template-columns: 2fr 1fr; grid-template-rows: 104px 104px; }
.zs-tg-x-album[data-n="3"] > :first-child { grid-row: span 2; }
.zs-tg-x-album__cell { display: block; background-size: cover; background-position: center; background-color: var(--zs-tg-bg-2); }
.zs-tg-x-reactline { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 6px; }
.zs-tg-x-reactline .zs-tg-reactions { margin-top: 0; }
.zs-tg-x-reactline .zs-tg-meta { float: none; margin: 0 -3px -5px auto; }
.zs-tg-msg--out .zs-tg-reaction { background: var(--zs-tg-quote-bg-out); }
.zs-tg-x-kb { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.zs-tg-x-kb .zs-tg-inline { margin-top: 0; }
.zs-tg-x-kb .zs-tg-inline__btn { height: 38px; padding: 0 12px; font-size: 14px; }
.zs-tg-x-kb .zs-tg-inline__btn > span { overflow: hidden; text-overflow: ellipsis; }
.zs-tg-x-scrolldown { position: absolute; right: 12px; bottom: 12px; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--zs-tg-bg); color: var(--zs-tg-icon); box-shadow: var(--zs-shadow-md); }
.zs-tg-x-scrolldown .zs-tg-unread { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); }
.zs-tg-x-botcard-empty { display: grid; place-items: center; flex: 1; padding: 24px; }
.zs-tg-x-whatcan { max-width: 280px; padding: 14px 16px; border-radius: 16px; background: var(--zs-tg-date-bg); color: var(--zs-tg-date-text); text-align: center; font-size: 14.5px; line-height: 20px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.zs-tg-x-whatcan b { display: block; margin-bottom: 6px; font-size: 15px; }
.zs-tg-x-whatcan p { white-space: pre-wrap; }

/* ---------------------------------------------------------------- composer */
.zs-tg-x-input { flex: 1; min-width: 0; max-height: 132px; padding: 9px 6px; border: 0; resize: none; background: transparent; color: var(--zs-tg-text); font: inherit; font-size: 17px; line-height: 22px; white-space: pre-wrap; outline: none; }
html[data-platform="ios"] .zs-tg-x-input { padding: 7px 0; font-size: 16.5px; }
.zs-tg-x-sendbtn { animation: none; }
.zs-tg-composer .zs-tg-x-count { padding-right: 4px; }
.zs-tg-x-blocked { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px calc(var(--zs-safe-bottom) + 8px); background: var(--zs-tg-composer-bg); color: var(--zs-tg-text-2); font-size: 14px; line-height: 18px; box-shadow: 0 -.5px 0 var(--zs-tg-divider); }
.zs-tg-x-blocked > span { flex: 1; }

/* ---------------------------------------------------------------- settings hub, bot card, profile */
.zs-tg-x-botcard { display: flex; align-items: center; gap: 14px; margin: 4px 16px 18px; padding: 16px; border-radius: 14px; background: var(--zs-tg-bg); }
.zs-tg-x-botcard .zs-avatar { --size: 80px; font-size: 30px; flex: none; }
.zs-tg-x-botcard__body { flex: 1; min-width: 0; }
.zs-tg-x-botcard__name { font-size: 20px; line-height: 25px; font-weight: 600; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zs-tg-x-botcard__user { min-height: 28px; color: var(--zs-tg-accent-ios); font-size: 15.5px; }
.zs-tg-x-botcard__status { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--zs-tg-text-2); }
.zs-tg-x-botcard__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--zs-success); }
.zs-tg-x-botcard__status.is-warn i { background: var(--zs-warning); }
.zs-tg-x-botcard__acts { display: flex; flex-direction: column; gap: 8px; }
.zs-tg-x-roundbtn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--zs-tg-quote-bg-in); color: var(--zs-tg-accent); }
.zs-tg-x-roundbtn .zi { width: 22px; height: 22px; }
html[data-platform="android"] .zs-tg-x-botcard { margin: 0 0 12px; border-radius: 0; }
.zs-tg-x-profile { padding-top: 0; }
.zs-tg-x-profilehead { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px 14px; text-align: center; }
.zs-tg-x-profilehead .zs-avatar { --size: 104px; font-size: 40px; }
.zs-tg-x-profilehead__name { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 22px; line-height: 27px; font-weight: 600; letter-spacing: -.01em; color: var(--zs-tg-text); }
.zs-tg-x-profilehead__sub { font-size: 14.5px; color: var(--zs-tg-text-2); }
.zs-tg-x-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: 0 16px 18px; }
.zs-tg-x-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 58px; border-radius: 12px; background: var(--zs-tg-bg); color: var(--zs-tg-accent-ios); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.zs-tg-x-action .zi { width: 24px; height: 24px; }
.zs-tg-x-labelrow { flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
.zs-tg-x-notes { margin: 0 16px 18px; padding: 12px 16px; }
.zs-tg-x-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 16px 18px; padding: 12px 0; border-radius: 12px; background: var(--zs-tg-bg); text-align: center; }
.zs-tg-x-stats div + div { box-shadow: -1px 0 0 var(--zs-tg-divider); }
.zs-tg-x-stats b { display: block; font-size: 15px; line-height: 20px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--zs-tg-text); }
.zs-tg-x-stats span { display: block; font-size: 12.5px; line-height: 16px; color: var(--zs-tg-text-2); }
.zs-tg-x-langs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 16px 14px; }
.zs-tg-x-preview { flex: none; min-height: 160px; padding: 14px 0; border-radius: 12px; justify-content: flex-start; gap: 4px; }
.zs-tg-x-profilepreview { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.zs-tg-x-profilepreview .zs-tg-x-preview { display: grid; place-items: center; }
.zs-tg-x-pcard { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--zs-tg-bg-2); }
.zs-tg-x-pcard > div { display: flex; flex-direction: column; min-width: 0; }
.zs-tg-x-pcard b { font-size: 16px; color: var(--zs-tg-text); }

/* ---------------------------------------------------------------- editors */
.zs-tg-x-btnrow { display: block; padding: 10px; }
.zs-tg-x-btnedit { display: flex; flex-direction: column; gap: 6px; }
.zs-tg-x-btnedit__row { display: flex; gap: 6px; }
.zs-tg-x-btnedit__row > .zs-tg-x-ibtn { flex: 1 1 0; }
.zs-tg-x-btnedit__row > .zs-tg-x-ibtn--add { flex: 0 0 44px; padding: 0; }
.zs-tg-x-ibtn { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 9px; background: var(--zs-tg-quote-bg-in); color: var(--zs-tg-accent-ios); font-size: 14.5px; font-weight: 600; min-width: 0; }
.zs-tg-x-ibtn .zi { flex: none; opacity: .8; }
.zs-tg-x-ibtn.is-error { box-shadow: inset 0 0 0 1.5px var(--zs-tg-danger); }
.zs-tg-x-ibtn--add { background: transparent; box-shadow: inset 0 0 0 1px var(--zs-tg-divider); }
.zs-tg-x-btnedit__add { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border-radius: 9px; box-shadow: inset 0 0 0 1px var(--zs-tg-divider); color: var(--zs-tg-accent-ios); font-size: 14.5px; font-weight: 600; }
.zs-tg-x-cmdlist { margin: 0 16px 8px; border-radius: 12px; background: var(--zs-tg-bg); overflow: hidden; }
html[data-platform="android"] .zs-tg-x-cmdlist { margin: 0 0 8px; border-radius: 0; }
.zs-tg-x-cmdrow { display: flex; align-items: center; gap: 6px; min-height: 60px; padding: 4px 12px 4px 4px; background: var(--zs-tg-bg); touch-action: pan-y; }
.zs-tg-x-cmdrow.is-off .zs-item__title { color: var(--zs-tg-text-2); }
.zs-tg-x-cmdrow.is-dragging { position: relative; z-index: 2; box-shadow: var(--zs-shadow-lg); border-radius: 10px; }
.zs-tg-x-cmdrow.is-error { box-shadow: inset 3px 0 0 var(--zs-tg-danger); }
.zs-tg-x-cmdrow__body { flex: 1; min-width: 0; text-align: left; min-height: 44px; }
.zs-tg-x-cmdrow__move { display: flex; flex-direction: column; }
.zs-tg-x-handle { display: grid; place-items: center; width: 36px; height: 44px; color: var(--zs-tg-icon); cursor: grab; touch-action: none; }
.zs-tg-x-cmdpreview { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.zs-tg-x-cmdpop { border-radius: 12px; background: var(--zs-tg-bg); box-shadow: var(--zs-shadow-md); overflow: hidden; }
.zs-tg-x-cmdpop__row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; font-size: 15px; }
.zs-tg-x-cmdpop__row + .zs-tg-x-cmdpop__row { box-shadow: inset 0 1px 0 var(--zs-tg-divider); }
.zs-tg-x-cmdpop__row b { color: var(--zs-tg-text); font-weight: 600; }
.zs-tg-x-cmdpop__row span { color: var(--zs-tg-text-2); }
.zs-tg-x-fakecomposer { border-radius: 12px; min-height: 48px; padding: 4px 8px; }
.zs-tg-x-menubtn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--zs-tg-accent); color: var(--zs-lit-ffffff); font-size: 14px; font-weight: 600; }
.zs-tg-x-menuprev { padding: 12px; }
.zs-tg-x-photorow { padding: 12px 16px; }
.zs-tg-x-photopick { display: flex; align-items: center; gap: 14px; width: 100%; }
.zs-tg-x-photopick__img, .zs-tg-x-photopick__empty { display: grid; place-items: center; flex: none; width: 76px; height: 76px; border-radius: 12px; background: var(--zs-tg-bg-2) center / cover no-repeat; color: var(--zs-tg-icon); }
.zs-tg-x-photopick__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.zs-tg-x-faqtree { display: flex; flex-direction: column; }
.zs-tg-x-faqnode { --depth: 0; display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 4px 8px 4px calc(12px + var(--depth) * 22px); }
.zs-tg-x-faqnode + .zs-tg-x-faqnode { box-shadow: inset 0 1px 0 var(--zs-tg-divider); }
.zs-tg-x-faqnode.is-error { box-shadow: inset 3px 0 0 var(--zs-tg-danger); }
.zs-tg-x-faqnode__ic { display: grid; place-items: center; flex: none; width: 29px; height: 29px; border-radius: 7px; color: var(--zs-lit-ffffff); background: var(--zs-tile-teal); }
.zs-tg-x-faqnode__ic.is-menu { background: var(--zs-tile-blue); }
.zs-tg-x-faqnode__ic.is-link { background: var(--zs-tile-violet); }
.zs-tg-x-faqnode__label { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; min-height: 44px; justify-content: center; padding: 0 6px; text-align: left; font-size: 16px; color: var(--zs-tg-text); }
.zs-tg-x-faqnode__label small { font-size: 12.5px; color: var(--zs-tg-text-2); }
.zs-tg-x-previewrow { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; }
.zs-tg-x-faqpreview .zs-tg-x-preview { min-height: 220px; }
.zs-tg-x-faqpreview button.zs-tg-inline__btn { width: 100%; cursor: pointer; }

/* ---------------------------------------------------------------- start links */
.zs-tg-x-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 16px 14px; }
.zs-tg-x-total { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--zs-tg-bg); }
.zs-tg-x-total b { font-size: 22px; line-height: 27px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--zs-tg-text); }
.zs-tg-x-total span { font-size: 12.5px; color: var(--zs-tg-text-2); }
.zs-tg-x-total.is-muted b { color: var(--zs-tg-text-2); }
.zs-tg-x-linkrow { align-items: center; gap: 10px; min-height: 76px; padding: 8px 8px 8px 16px; }
.zs-tg-x-linkurl { color: var(--zs-tg-accent-ios); }
.zs-tg-x-linkrow__body { flex: 1; min-width: 0; text-align: left; min-height: 44px; }
.zs-tg-x-linkstats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; font-size: 12.5px; color: var(--zs-tg-text-2); }
.zs-tg-x-linkstats b { color: var(--zs-tg-text); font-variant-numeric: tabular-nums; }
.zs-tg-x-linkprev { padding: 10px 12px; border-radius: 10px; background: var(--zs-tg-bg-2); color: var(--zs-tg-accent); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- QR + share sheets */
.zs-tg-x-qrwrap { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0 8px; }
.zs-tg-x-qr { display: grid; place-items: center; min-width: 232px; min-height: 232px; padding: 14px; border-radius: 20px; background: var(--zs-lit-ffffff); color: var(--zs-tg-accent); }
.zs-tg-x-qr.is-small { min-width: 168px; min-height: 168px; margin: 8px auto 0; }
.zs-tg-x-qrcap { font-size: 14px; color: var(--zs-text-secondary); text-align: center; }
.zs-tg-x-qrbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zs-tg-x-newchat { display: flex; flex-direction: column; gap: 14px; }

/* ---------------------------------------------------------------- connection test + walkthrough */
.zs-tg-x-testresult { margin: 0 16px 14px; padding: 12px 16px; }
.zs-tg-x-testhead { margin-bottom: 8px; font-size: 15px; font-weight: 600; color: var(--zs-success-ink); }
.zs-tg-x-testhead.is-warn { color: var(--zs-warning-ink); }
.zs-tg-x-checks { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.zs-tg-x-checks li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 20px; color: var(--zs-tg-text); }
.zs-tg-x-checks li small { display: block; font-size: 13px; color: var(--zs-tg-text-2); }
.zs-tg-x-check { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--zs-fill); color: var(--zs-text-secondary); }
.zs-tg-x-check.is-ok { background: var(--zs-success); color: var(--zs-lit-ffffff); }
.zs-tg-x-check.is-fail { background: var(--zs-danger); color: var(--zs-lit-ffffff); }
.zs-tg-x-connect { max-width: 560px; margin: 0 auto; padding: 8px 16px calc(var(--zs-safe-bottom) + 24px); }
.zs-tg-x-connect-wrap{display:grid;gap:14px}
.zs-tg-x-stepper { display: flex; flex-direction: column; gap: 16px; }
.zs-tg-x-stepper__head { display: flex; flex-direction: column; gap: 8px; }
.zs-tg-x-stepper__head .zs-progress { --zs-accent: var(--zs-tg-accent); }
.zs-tg-x-stepper__count { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--zs-text-secondary); text-transform: uppercase; }
.zs-tg-x-stepper__stage { position: relative; overflow: hidden; }
.zs-tg-x-stepper__step { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--zs-r-xl); background: var(--zs-surface); box-shadow: var(--zs-shadow-sm); }
.zs-tg-x-stepper__art { display: grid; place-items: center; align-self: center; width: 160px; height: 120px; color: var(--zs-tg-accent); }
.zs-tg-x-stepper__art > .zi { width: 56px; height: 56px; }
.zs-tg-x-stepper__art.has-ill svg { width: 100%; height: 100%; }
.zs-tg-x-stepper__title { font-size: var(--zs-title2-size); line-height: var(--zs-title2-lh); font-weight: 700; letter-spacing: -.01em; color: var(--zs-text); outline: none; }
.zs-tg-x-stepper__text { font-size: 15.5px; line-height: 22px; color: var(--zs-text-secondary); }
.zs-tg-x-stepper__foot { display: flex; justify-content: space-between; gap: 10px; }
.zs-tg-x-stepper__foot .zs-btn--primary { min-width: 160px; }
.zs-tg-x-stepper__step.is-done { align-items: center; text-align: center; padding: 32px 20px; }
.zs-tg-x-wait { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--zs-tg-quote-bg-in); color: var(--zs-tg-accent); font-size: 15px; font-weight: 500; }
.zs-tg-x-wait__pulse { position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--zs-tg-accent); color: var(--zs-lit-ffffff); }
.zs-tg-x-wait__pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 0 var(--zs-tg-accent); animation: zs-pulse-ring 1.8s var(--zs-ease-standard) infinite; }
.zs-tg-x-success { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--zs-success); color: var(--zs-lit-ffffff); }
.zs-tg-x-success.is-static { width: 56px; height: 56px; }
.zs-tg-x-donecard { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 16px 18px; padding: 24px 16px; border-radius: 14px; background: var(--zs-tg-bg); text-align: center; }
.zs-tg-x-donecard h2 { font-size: 18px; font-weight: 600; color: var(--zs-tg-text); }

/* ---------------------------------------------------------------- platform + desktop + motion */
html[data-platform="desktop"] .zs-tg-x-page { padding-top: 20px; }
html[data-platform="desktop"] .zs-tg-bubble, html[data-platform="desktop"] .zs-tg-x-col { max-width: min(80%, 560px); }
html[data-platform="desktop"] .zs-tg-x-col > .zs-tg-bubble { max-width: 100%; }
html[data-platform="desktop"] .zs-tg-x-inbox .zs-tg-fab { display: none; }
html.is-kb-open .zs-tg-x-inbox .zs-tg-fab { display: none; }
@media (min-width: 768px) {
  .zs-tg-x-page { max-width: 720px; margin: 0 auto; }
  .zs-tg-x-totals { grid-template-columns: repeat(3, minmax(0, 200px)); }
}
/* On phones, Telegram settings cards and forms fill the channel canvas like a native settings view. */
@media (max-width: 767px) {
  .zs-chframe--tg > .zs-chframe__body { padding-inline: 0; }
  .zs-chframe--tg .zs-tg-x-page {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-inline: 0;
  }
  .zs-chframe--tg .zs-tg-settings .zs-list--inset {
    box-sizing: border-box;
    width: 100%;
    margin-inline: 0;
    border-inline: 0;
    border-radius: 0;
  }
  .zs-chframe--tg .zs-tg-settings .zs-tg-group.zs-tg-x-form {
    box-sizing: border-box;
    width: 100%;
    margin-inline: 0;
    border-inline: 0;
    border-radius: 0;
  }
  .zs-chframe--tg .zs-chat-settings,
  .zs-chframe--tg .zs-chat-info { padding-inline: 0; }
}
/* Desktop channel detail pages must use the full pane and scroll within it. Keeping the page itself
   constrained caused settings cards to appear as a narrow column and pushed lower controls below view. */
@media (min-width: 768px) and (min-height: 560px) {
  /* Telegram contact profiles are revealed inside an async wrapper, so the page-level scroller above
     cannot reach them. Make the contact profile wrapper own scrolling in the fixed Windows detail pane. */
  .zs-pane--detail .zs-chframe__body > .zs-tg-x-async:has(> .zs-tg-x-profile) {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 0%;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }
  .zs-pane--detail .zs-chframe__body > .zs-tg-x-async:has(> .zs-tg-x-profile) > .zs-tg-x-profile {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: min-content;
    margin: 0;
  }

  .zs-pane .zs-chframe__body > .zs-tg-x-page {
    box-sizing: border-box;
    align-self: stretch;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    flex: 1 1 0%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .zs-pane .zs-chframe__body > .zs-tg-x-page > .zs-tg-x-pagebody {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
  .zs-pane .zs-chframe__body > .zs-tg-x-page .zs-list--inset,
  .zs-pane .zs-chframe__body > .zs-tg-x-page .zs-tg-x-form {
    max-width: none;
  }

  /* The settings hub is rendered asynchronously inside .zs-tg-x-async, so it does not
     match the detail-page scroll rule above. Give the Windows split-view navigation its
     own scroll area while leaving the Settings header fixed. */
  .zs-pane--list .zs-chframe__body > .zs-tg-x-async:has(> .zs-tg-x-hub) {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 0%;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }
  .zs-pane--list .zs-chframe__body > .zs-tg-x-async:has(> .zs-tg-x-hub) > .zs-tg-x-hub {
    flex: 0 0 auto;
    min-height: min-content;
  }
}
html[data-motion="reduce"] .zs-tg-x-bars > .zs-tg-pinned, html[data-motion="reduce"] .zs-tg-msg.is-highlight .zs-tg-bubble { animation: none; }
html[data-motion="reduce"] .zs-tg-x-dots, html[data-motion="reduce"] .zs-tg-x-wait__pulse::after { animation: none; }
html[data-motion="reduce"] .zs-tg-x-folderline { transition: none; }
html.is-hidden .zs-tg-x-dots, html.is-hidden .zs-tg-x-wait__pulse::after { animation-play-state: paused; }
.zs-tg-x-simanswer{padding:12px;border-radius:12px;background:var(--zs-tg-bg);color:var(--zs-tg-text);}
.zs-tg-x-connected{display:flex;align-items:center;gap:8px;color:var(--zs-success);font-size:13px;font-weight:650;}
.zs-tg-x-hub{display:grid;gap:12px;padding:12px 16px;}
.zs-tg-x-archived{display:flex;align-items:center;gap:10px;min-height:48px;padding:0 16px;color:var(--zs-tg-sub);}
.zs-tg-x-archived__count{margin-left:auto;color:var(--zs-tg-sub);font-size:12px;}
.zs-tg-x-mic{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--zs-tg-accent);color:var(--zs-lit-ffffff);}
.zs-tg-x-links{display:grid;gap:10px;}


/* Telegram inbox: keep search and folder shortcuts in the fixed area below the channel header;
   make conversation rows the only scrolling region on phones and desktop panes. */
.zs-tg-inbox-screen { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; }
.zs-tg-inbox-screen > .zs-chframe--tg { display: flex; flex: 1 1 0%; height: 100%; min-height: 0; overflow: hidden; }
.zs-tg-inbox-screen .zs-chframe__body,
.zs-tg-inbox-screen .zs-tg.zs-tg-x-inbox,
.zs-tg-inbox-screen .zs-tg-x-listhost,
.zs-tg-inbox-screen .zs-tg-x-listbody,
.zs-tg-inbox-screen .zs-chat-screen--list,
.zs-tg-inbox-screen .zs-chat-list { display: flex; min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; }
.zs-tg-inbox-screen .zs-tg.zs-tg-x-inbox,
.zs-tg-inbox-screen .zs-tg-x-listhost,
.zs-tg-inbox-screen .zs-tg-x-listbody,
.zs-tg-inbox-screen .zs-chat-screen--list,
.zs-tg-inbox-screen .zs-chat-list { flex: 1 1 0%; height: 100%; }
.zs-tg-inbox-screen .zs-tg-x-listbody > .zs-banner,
.zs-tg-inbox-screen .zs-tg-folders,
.zs-tg-inbox-screen .zs-chat-search,
.zs-tg-inbox-screen .zs-chat-chips { flex: 0 0 auto; }
.zs-tg-inbox-screen .zs-tg-x-listhost > .zs-tg-x-listbody { height: 100%; }
.zs-tg-inbox-screen .zs-chat-list__rows { flex: 1 1 0%; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
@media (min-width: 768px) and (min-height: 560px) {
  #zs-app[data-layout="channel"] .zs-pane--list:has(> .zs-screen.zs-tg-inbox-screen) { display: flex; min-height: 0; flex-direction: column; overflow: hidden; }
  #zs-app[data-layout="channel"] .zs-pane--list:has(> .zs-screen.zs-tg-inbox-screen) > .zs-screen { display: flex; flex: 1 1 0%; height: 100%; min-height: 0; overflow: hidden; }
}
@media (max-width: 767px), (max-height: 559px) {
  #zs-app[data-layout="channel"]:has(> .zs-view > .zs-tg-inbox-screen) { height: 100dvh; min-height: 0; overflow: hidden; }
  #zs-app[data-layout="channel"]:has(> .zs-view > .zs-tg-inbox-screen) > .zs-view { display: flex; min-height: 0; overflow: hidden; flex-direction: column; }
  #zs-app[data-layout="channel"]:has(> .zs-view > .zs-tg-inbox-screen) > .zs-view > .zs-tg-inbox-screen { display: flex; flex: 1 1 0%; height: 100%; min-height: 0; overflow: hidden; }
}
/* One colour behind every Telegram settings-style page (channels, groups, calls...): the frame takes the page's colour and the page fills the screen, so no second shade shows below or beside it. */
.zs-chframe--tg:has(> .zs-chframe__body > .zs-tg-x-page){background:var(--zs-tg-bg-2)}
.zs-chframe--tg > .zs-chframe__body > .zs-tg-x-page{flex:1 0 auto;width:100%;box-sizing:border-box}
html[data-theme="dark"] .zs-chframe--tg:has(> .zs-chframe__body > .zs-tg-x-page){--ch-head-bg:var(--zs-tg-bg-2)}
html[data-theme="dark"] .zs-chframe--tg:has(> .zs-chframe__body > .zs-tg-x-page) .zs-chhead{background:var(--zs-tg-bg-2);-webkit-backdrop-filter:none;backdrop-filter:none}
