/* Ковчег · Stage78. Viewport-height messenger, anchored community widgets and legal hub. */
body.shelter-dark{--kv78-bg:#1d2228;--kv78-card:#272c33;--kv78-soft:#303740;--kv78-line:#454e5b;--kv78-text:#f1f4f7;--kv78-muted:#a7b5c4;--kv78-link:#a9d2fb}
body.shelter-light{--kv78-bg:#f3f6fa;--kv78-card:#fff;--kv78-soft:#f2f6fb;--kv78-line:#d8e4ef;--kv78-text:#293c51;--kv78-muted:#63788f;--kv78-link:#346da2}
/* The community does not have a page footer: its content should not scroll to an empty bottom. */
body.is-community .site-footer{display:none!important}
body.is-community .site-main{padding-bottom:0!important;margin-bottom:0!important}
/* Messenger occupies actual remaining screen space. No dragging or separate outer document scrolling. */
@media(min-width:781px){
 body.kv-page-community_messages .site-main{
  padding-top:5px!important;padding-bottom:0!important;min-height:0!important;
 }
 body.kv-page-community_messages .kv-vk-messages-layout{min-height:0!important}
 body.kv-page-community_messages .kv-vk-messages-layout .kv-msg-shell{
  height:var(--kv78-msg-height,calc(100dvh - 110px))!important;
  min-height:0!important;max-height:none!important;
  overflow:hidden!important;resize:none!important;
  border-radius:11px!important;
 }
 body.kv-page-community_messages .kv-msg-shell .kv-msg-conversation{
  height:100%!important;min-height:0!important;
 }
 body.kv-page-community_messages .kv-msg-thread{
  min-height:0!important;max-height:none!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain!important;touch-action:pan-y!important;
 }
 body.kv-page-community_messages .kv-msg-shell .kv-msg-compose{flex-shrink:0!important}
 /* Profile: avatar and side cards stay on the screen while wall/anketa scroll.
    On shorter screens the browser's main scroll remains available. */
 body.is-community .kv-oldvk-app .kv-classic-columns{align-items:start!important}
 body.is-community .kv-oldvk-app .kv-classic-left{
  position:sticky!important;top:69px!important;align-self:start!important;
  height:auto!important;max-height:calc(100dvh - 79px)!important;
  overflow:visible!important;
 }
 body.is-community .kv-oldvk-app .kv-classic-left>*{
  position:static!important;
 }
 body.is-community .kv-oldvk-app .kv-classic-content{
  min-height:0!important;overflow:visible!important;
 }
 /* Keep sidebar navigation fixed in the desktop viewport: no inner scrollbars. */
 body.is-community .kv-vk-app>.kv-vk-sidebar{
  top:68px!important;position:sticky!important;align-self:start!important;
  max-height:none!important;overflow:visible!important;
 }
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-items{
  overflow:visible!important;height:auto!important;max-height:none!important;
 }
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-item>a{
  min-height:26px!important;padding:5px 8px!important;font-size:12px!important;
 }
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad-area{
  margin:8px 0 4px!important;padding:5px!important;
 }
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad-empty{
  min-height:74px!important;padding:7px!important;font-size:10px!important;
 }
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad img{
  display:block!important;max-height:100px!important;object-fit:contain!important;
 }
}
/* Forwarded cards should not grow into a giant scrollable post. Open source for full text. */
body.is-community .kv-msg-row .kv-msg-bubble:has(.kv-msg-share-card){
 max-width:min(335px,83%)!important;width:min(335px,83%)!important;
}
body.is-community .kv-msg-body .kv-msg-share-card{
 max-width:100%!important;overflow:hidden!important;border-radius:8px!important;
}
body.is-community .kv-msg-share-photo .kv-msg-share-image{
 max-height:165px!important;object-fit:contain!important;
}
body.is-community .kv-msg-share-post .kv-msg-share-image{
 max-height:112px!important;object-fit:contain!important;
}
body.is-community .kv-msg-share-meta{gap:2px!important;padding:6px 8px!important}
body.is-community .kv-msg-share-meta strong{font-size:11px!important}
body.is-community .kv-msg-share-meta small{font-size:10px!important}
body.is-community .kv-msg-share-excerpt{
 display:-webkit-box!important;-webkit-box-orient:vertical!important;
 -webkit-line-clamp:3!important;line-clamp:3!important;
 overflow:hidden!important;max-height:4.3em!important;
 font-size:11px!important;line-height:1.4!important;
}
body.is-community .kv-msg-share-comment{font-size:11px!important;line-height:1.4!important;margin-bottom:4px!important}
@media(max-width:780px){
 body.is-community .kv-msg-row .kv-msg-bubble:has(.kv-msg-share-card){
  max-width:88%!important;width:min(320px,88%)!important;
 }
 body.is-community .kv-msg-share-post .kv-msg-share-image{max-height:125px!important}
}
/* Small legal links immediately under the advertising/banner card in desktop sidebar. */
body.is-community .kv-side-legal{
 display:flex;flex-direction:column;gap:0;min-width:0;
 padding:9px 6px 5px;margin-top:4px;
 border-top:1px solid var(--kv78-line);color:var(--kv78-muted);
}
body.is-community .kv-side-legal>a{
 display:flex;justify-content:space-between;gap:6px;align-items:baseline;
 padding:4px 5px;min-height:0;border-radius:5px;
 color:var(--kv78-muted)!important;font-size:10.5px!important;line-height:1.4;
 font-weight:500;text-decoration:none!important;overflow-wrap:anywhere;
}
body.is-community .kv-side-legal>a:hover{
 background:var(--kv78-soft)!important;color:var(--kv78-link)!important;
}
body.is-community .kv-side-legal>a.kv-side-domain{
 font-size:12px!important;color:var(--kv78-link)!important;font-weight:800;
 padding-bottom:7px;
}
body.is-community .kv-side-legal-copyright{
 font-size:9px;color:var(--kv78-muted);padding:7px 5px 2px;
}
/* On narrow screens, the document link lives inside the mobile menu drawer. */
@media(max-width:780px){
 body.is-community .kv-side-legal{display:none!important}
 body.is-community .kv-oldvk-app .kv-classic-left{
  position:static!important;max-height:none!important;height:auto!important;
 }
}
@media(min-width:781px) and (max-height:820px){
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad-area{
  margin:3px 0!important;padding:3px!important;
 }
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad-empty{min-height:45px!important}
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad img{max-height:55px!important}
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-legal>a{
  padding:2px 5px;font-size:10px!important;
 }
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-item>a{
  padding:3px 6px!important;min-height:22px!important;
 }
}
@media(min-width:781px) and (max-height:670px){
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad-empty{min-height:30px!important}
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-ad img{max-height:40px!important}
 body.is-community .kv-vk-app>.kv-vk-sidebar .kv-side-legal a:not(.kv-side-domain):not(:last-of-type){display:none!important}
}
/* Public legal-document index and documents, shared light/dark tone. */
.kv-legal-page{max-width:1030px;margin:0 auto 38px;color:var(--kv78-text)}
.kv-legal-hero{
 background:var(--kv78-card);border:1px solid var(--kv78-line);
 padding:clamp(19px,4vw,36px);border-radius:15px;margin-bottom:15px;
}
.kv-legal-eyebrow{font:750 10px/1.5 system-ui,sans-serif;letter-spacing:.13em;color:var(--kv78-link)}
.kv-legal-hero h1{font-size:clamp(24px,3vw,36px);line-height:1.25;margin:9px 0;color:var(--kv78-text)}
.kv-legal-hero p{font-size:13px;line-height:1.7;color:var(--kv78-muted);margin:7px 0}
.kv-legal-back{display:inline-block;margin-top:13px;color:var(--kv78-link)!important;font-weight:700;text-decoration:none!important;font-size:12px}
.kv-legal-back[hidden]{display:none!important}
.kv-legal-intro{
 background:var(--kv78-soft);border:1px solid var(--kv78-line);
 border-radius:11px;padding:17px 20px;margin-bottom:16px;
}
.kv-legal-intro strong{color:var(--kv78-text);font-size:14px}
.kv-legal-intro p{font-size:12px;color:var(--kv78-muted);line-height:1.75;margin:7px 0 0}
.kv-legal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.kv-legal-doc-link{
 position:relative;display:flex;flex-direction:column;gap:8px;
 padding:20px;border:1px solid var(--kv78-line);border-radius:13px;
 background:var(--kv78-card);color:var(--kv78-text)!important;
 text-decoration:none!important;min-width:0;
}
.kv-legal-doc-link:hover{border-color:var(--kv78-link);background:var(--kv78-soft)}
.kv-legal-doc-icon{color:var(--kv78-link);font-weight:700;font-size:22px}
.kv-legal-doc-link strong{font-size:15px;color:var(--kv78-text);padding-right:20px}
.kv-legal-doc-link small{font-size:11px;line-height:1.6;color:var(--kv78-muted)}
.kv-legal-arr{position:absolute;right:17px;top:21px;color:var(--kv78-link)}
.kv-legal-article{
 background:var(--kv78-card);border:1px solid var(--kv78-line);
 border-radius:13px;padding:clamp(16px,3vw,30px);
}
.kv-legal-article>section{padding:16px 0;border-bottom:1px solid var(--kv78-line)}
.kv-legal-article>section:first-child{padding-top:0}
.kv-legal-article>section:last-child{border-bottom:0;padding-bottom:0}
.kv-legal-article h2{
 display:flex;align-items:baseline;gap:11px;
 font-size:17px;color:var(--kv78-text);margin:0 0 10px;line-height:1.4;
}
.kv-legal-article h2>span{font-size:11px;color:var(--kv78-link)}
.kv-legal-article p{font-size:13px;line-height:1.82;color:var(--kv78-muted);margin:0;white-space:pre-wrap;overflow-wrap:anywhere}
.kv-legal-end{
 display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;
 gap:18px;background:var(--kv78-soft);border:1px solid var(--kv78-line);
 border-radius:12px;padding:19px;margin-top:16px;
}
.kv-legal-end>div{flex:1 1 290px}
.kv-legal-end strong{font-size:14px;color:var(--kv78-text)}
.kv-legal-end p{font-size:12px;line-height:1.65;color:var(--kv78-muted)}
.kv-legal-end>a{color:var(--kv78-link)!important;font-size:12px;font-weight:750;text-decoration:none!important}
@media(max-width:640px){
 .kv-legal-page{margin:0 auto 20px}
 .kv-legal-grid{grid-template-columns:1fr}
 .kv-legal-doc-link{padding:16px;gap:6px}
 .kv-legal-article h2{font-size:15px}
}
