/* Знакора: исправления веб-версии 25.11.2026. Подключается последним. */
:root{--zn-safe-top:env(safe-area-inset-top,0px)}
/* White ticks chosen for a dark theme stay visible on a light one. */
:root{--check-white:#FFFFFF}
:root[data-theme='light']{--check-white:#6f8aa3}
/* The premium ring lives inside the circle: the header cannot cut it. */
.chat-header .avatar.has-premium{box-sizing:border-box}
.chat-header .avatar.has-premium::before{inset:0}
.chat-header .avatar.has-premium:not(.business-avatar-badge)::after{inset:2px}
.chat-header .avatar.has-premium #head-avatar{width:calc(100% - 4px);height:calc(100% - 4px);margin:2px;border:0}
.chat-header .avatar.business-avatar-badge #head-avatar{border:0}
/* Round means round: an avatar button never inherits the size of a text button. */
#list-calls .calls-item-avatar,.calls-item-avatar{position:relative;min-width:0;min-height:0;aspect-ratio:1;padding:0;border:0;border-radius:50%;line-height:0}
.calls-item-avatar>img{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;border-radius:50%;object-fit:cover}
.posts-root .posts-avatar,.posts-dialog .posts-avatar,.posts-avatar{aspect-ratio:1;min-width:0;padding:0;gap:0;overflow:visible;border-radius:50%;line-height:1}
.posts-avatar>img{position:absolute;inset:0;display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}
.posts-comment-preview .posts-preview-line>.posts-avatar{flex:0 0 28px;width:28px;height:28px;min-height:28px;padding:0;justify-content:center;border-radius:50%;font-size:12px}
.posts-comment-preview .posts-preview-line>.posts-avatar .posts-presence{width:8px;height:8px}
.posts-categories,.posts-profile-tabs{scrollbar-width:none;-ms-overflow-style:none}
.posts-categories::-webkit-scrollbar,.posts-profile-tabs::-webkit-scrollbar{display:none}
.pin-thumbnail>svg{width:20px;height:20px}
/* The page-wide reset of margins must not push a native dialog to the corner. */
dialog.cloud-dialog[open]{position:fixed;inset:0;margin:auto;height:fit-content;max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overscroll-behavior:contain}
dialog.cloud-dialog::backdrop{position:fixed;inset:-120px 0}
.external-auth-dialog header{position:sticky;top:-20px;z-index:1;margin:-20px -20px 0;padding:18px 20px 12px;background:inherit;border-radius:20px 20px 0 0}
/* No zoom on focus in Safari: fields of a phone are never smaller than 16px. */
@media (max-width:820px) and (pointer:coarse){
 input:not([type=checkbox]):not([type=radio]):not([type=range]),textarea,select{font-size:max(16px,1em)}
}
@supports (-webkit-touch-callout:none){
 /* iPhone and iPad */
 html,body{height:100%;overscroll-behavior:none;-webkit-text-size-adjust:100%}
 #view-app{height:var(--viewport-height,100dvh)}
 .messages,.list-container,.modal,.gift-body,.thread-feed{-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
 .chat-header{-webkit-user-select:none;user-select:none}
 .chat-header-profile{min-width:0;flex:1 1 auto}
 #head-name,#head-status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
 .chat-header-controls{flex:0 0 auto}
 button,a,[role=button],.list-item,.ctx-item{touch-action:manipulation}
}
@media (max-width:820px){
 .chat-header-profile>div:last-child{min-width:0;overflow:hidden}
 #head-name,#head-status{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
.search-input[type=search]{-webkit-appearance:none;appearance:none}
.search-input[type=search]::-webkit-search-cancel-button,.search-input[type=search]::-webkit-search-decoration{display:none;-webkit-appearance:none}
/* 25.11.2026: chat list and message markup. */
.chat-item-name{flex:1 1 auto}
.chat-item-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-item-name>:not(.chat-item-title){flex:0 0 auto}
.list-item .date-pin-chip{flex:0 0 auto;margin-left:8px}
.chat-item-preview{display:block;flex:1 1 auto;min-width:0;padding-right:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-item-preview .prev-ticks{vertical-align:middle}
.msg-content b{font-weight:700}
.mk-gap{display:block;height:.7em}
.mk-heading{display:block;margin:.35em 0 .15em;font-weight:750;line-height:1.3}
.mk-heading:first-child{margin-top:0}
.mk-h1{font-size:1.28em}.mk-h2{font-size:1.16em}.mk-h3{font-size:1.06em}
.mk-item{display:flex;gap:.5em;margin:.12em 0}
.mk-item>:last-child{flex:1;min-width:0}
.mk-prefix{flex:0 0 auto;min-width:1em;font-variant-numeric:tabular-nums;opacity:.75}
.mk-quote{display:block;margin:.25em 0;padding:2px 0 2px 10px;border-left:3px solid color-mix(in srgb,currentColor 45%,transparent);opacity:.92}
.mk-code{display:block;margin:.35em 0}
.mk-code-lang{display:block;margin-bottom:3px;font-size:11px;font-weight:600;opacity:.65}
.interactive-code.mk-pre{display:block;max-width:100%;padding:9px 11px;overflow-x:auto;white-space:pre;tab-size:4;line-height:1.45;border-style:solid;border-radius:10px;font-size:.92em}
.msg-content .interactive-code:not(.mk-pre){padding:1px 5px;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-box-decoration-break:clone;box-decoration-break:clone}
/* Text on the accent colour is readable in every theme. */
.swipe-reply-icon,.alert-btn.primary,.settings-icon,.btn-start-big,.cal-day.active,.onb-cam-icon,.story-plus,.app-promo-icon,.app-promo-modal-btn,.poll-voters-tab.active,.cl-btn-next,.chat-folder-primary,.call-feedback-submit,.premium-v2-periods button.selected{color:var(--on-primary)}
.msg-views,.own .msg-views{opacity:1}
#list-calls .calls-date-sep{opacity:1}
/* Time and ticks over a sticker or a round video lie on a dark plate. */
.msg-row .bubble.is-sticker .meta,.msg-row .bubble:is(:has(.msg-sticker-mp4),:has(.msg-sticker-png),:has(.msg-video-circle)) .meta,.msg-row .bubble.is-sticker :is(.meta *,.tick-icon,.msg-views){color:#fff;opacity:1}
.msg-row .bubble.is-sticker .meta{background:rgba(20,26,32,.62)}
.msg-row .bubble.is-sticker .tick-icon{stroke:#fff}
/* The header of the menu is aligned to the left edge of the name. */
#modal-menu .menu-identity-line{justify-content:flex-start}
#modal-menu .menu-identity-line>.menu-name-text{flex:0 1 auto}
#modal-menu #menu-bio{width:100%;margin-left:0;padding-left:0;padding-right:0}
#menu-cloud-summary{text-align:left}
#menu-cloud-summary *{text-align:left}
#menu-cloud-summary>*{justify-content:flex-start;justify-self:stretch;margin-inline:0}
#thread-input:focus-visible{outline:0}
.poll-close-btn{opacity:1}
/* Windows opened from the menu lie above it: the menu itself stays open underneath. */
.zt-overlay,.gift-overlay,.wn-overlay,.duo-status-overlay,.sw-overlay{z-index:100030}
.gift-overlay--top{z-index:100040}
.gift-arrival{z-index:100060}
.zc-toast{z-index:100070}
