/* Social application shell. The two academy palettes remain in academy-theme.css. */
html{scrollbar-gutter:stable;scroll-padding-top:76px}
body{--accent:color-mix(in srgb,var(--accent-gold) 40%,var(--text-primary));--social-header-height:64px;--social-bottom-height:60px;--social-caption:.75rem;--social-footnote:.8125rem;--social-label:.875rem;--social-body:1rem;--social-subtitle:1.0625rem;--social-title:1.25rem;--social-heading:1.5rem;--social-control:36px;--social-field:40px;--social-input:.875rem;--radius:12px;--page-layout-width:100vw;overflow-wrap:break-word;font-size:var(--social-body);line-height:1.375}
.site-header{max-width:1180px;padding:10px 20px;min-height:var(--social-header-height);gap:16px}
.brand{font-size:20px;min-width:0;gap:10px}.brand img{flex:none;width:38px;height:38px}.brand small{letter-spacing:.025em}
.header-actions{flex:none;gap:10px}.header-actions .button{font-size:13px}
.install-app{font-size:12px;gap:6px}.install-app svg{width:18px;height:18px}
.layout,.social-layout{max-width:1180px;margin:auto;padding:20px;display:grid;grid-template-columns:164px minmax(0,1fr);gap:16px;align-items:start}
.layout{grid-template-columns:164px minmax(0,1fr) 220px}
.layout>.community-profile{grid-column:2 / -1;grid-row:1}.layout>.main{grid-column:2;grid-row:2;max-width:720px;width:100%;justify-self:start}
.layout>.rail{grid-row:1 / span 3}.layout>.community-contact{grid-column:3;grid-row:2;margin-top:0;padding:16px;align-self:start}
.community-contact-avatar{width:38px;height:38px;font-size:20px}.community-contact-identity small{font-size:12px}
.rail{min-width:0;padding:0}.main-nav{top:20px;gap:2px}.main-nav a{gap:10px;padding:8px 10px;font-size:14px;line-height:20px;min-height:36px}.main-nav a svg{width:21px;height:21px}
.main-nav a[data-nav="account"]{margin-top:8px;border-top:1px solid var(--line);border-radius:0 0 9px 9px;padding-top:12px}
.nav-unread{display:inline-flex;align-items:center;justify-content:center;margin-left:auto;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:var(--accent);color:var(--bg-color);font:600 11px/1 "Segoe UI",sans-serif}
.social-layout>.member-page,.social-layout>.account-page{grid-column:2;min-width:0;width:100%;max-width:none;padding:0;margin:0}
.account-nav{display:none}.account-footer{max-width:1180px;padding:0 20px 24px 200px}
.community-cover{aspect-ratio:1920 / 768}.community-cover:has(.community-cover-image:not([hidden])){aspect-ratio:auto}.community-cover:has(.community-cover-image:not([hidden]))>.cover-orbits{display:none}.community-cover-image{width:100%;height:auto;object-fit:contain}.community-name h1{font-size:var(--social-heading);line-height:1.167;overflow-wrap:normal;word-break:normal;hyphens:auto}.community-identity{padding:20px;display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.community-actions{justify-content:flex-start;justify-self:start;max-width:100%}.community-about{padding:16px 20px}
.community-about h2{font-size:14px}.community-about p{font-size:14px;line-height:1.429}
.feed-heading{min-height:40px;gap:12px}.search{max-width:290px;flex:1}.search input{min-height:var(--social-field)}.feed-heading h2{font-size:var(--social-subtitle);line-height:22px}
.composer{padding:20px;margin-bottom:16px}.post{padding:20px}.post-text{font-size:var(--social-body);line-height:1.375;margin:16px 0}.member-card{padding:24px;gap:20px}.member-avatar{width:88px;height:88px}.member-identity h1{font-size:var(--social-heading);line-height:1.167}
.member-tabs{margin:16px 0;gap:20px}.member-tabs button{min-height:44px;padding:10px 4px;font-size:14px}.member-tabs .dm-badge{margin-left:8px}
.personal-wall{max-width:720px}.back-community{display:none}.member-bio{max-width:65ch}.member-status:empty{display:none}
.member-page:has(#memberError:not([hidden])) .back-community{display:inline-block}
.member-page:has(#memberError:not([hidden])) .member-tabs,.member-page:has(#memberError:not([hidden])) #personalWallContainer{display:none}
.member-identity .actions{margin-top:16px}.member-page #memberSaved:empty{display:none}.account-heading h1{font-size:var(--social-heading);line-height:1.167}
.mobile-nav{display:none}
.install-guide{position:fixed;inset:auto 16px calc(18px + env(safe-area-inset-bottom));z-index:120;max-width:460px;margin:auto;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--bg-color);color:var(--text);box-shadow:0 12px 48px #0002;max-height:calc(100dvh - 40px);overflow:auto}
.install-guide h2{font:20px/1.2 Georgia,serif;margin:0}.install-guide .dialog-head{margin-bottom:14px}.install-guide p,.install-guide li{font-size:14px;line-height:1.7}.install-guide ol{padding-left:22px;margin:14px 0 0}.install-guide li+li{margin-top:8px}.install-guide .hint{font-size:12px;margin-top:16px}.install-guide .button{width:100%;margin-top:16px}
@media(max-width:700px){html{scrollbar-gutter:auto}html,body,body *{scrollbar-width:none}html::-webkit-scrollbar,body::-webkit-scrollbar,body *::-webkit-scrollbar{display:none;width:0;height:0}}
.connection-status{position:fixed;top:8px;left:50%;transform:translateX(-50%);z-index:130;padding:10px 16px;border-radius:9px;background:var(--text);color:var(--bg-color);font-size:13px;max-width:calc(100vw - 24px)}
.dm-back{display:none}.dm-sidebar h2{font-size:var(--social-subtitle);line-height:22px}.dm-head #dmPeer{min-width:0}.dm-head{gap:10px}.dm-head #dmBlock{margin-left:auto}.dm-welcome p{margin-bottom:0}
body[data-social-view="messages"] .member-card,body[data-social-view="messages"] #memberForm,body[data-social-view="messages"] #memberSaved,body[data-social-view="messages"] .member-tabs{display:none}
.messages-page-title{font:var(--social-heading)/1.167 Georgia,serif;margin:0 0 16px}.dm-layout{min-height:540px;grid-template-columns:minmax(240px,30%) minmax(0,1fr)}
.dm-log{height:clamp(270px,47dvh,580px)}.dm-sidebar{padding:16px 12px}.dm-dialog{padding:12px 10px;min-height:64px}.dm-dialog strong{font-size:14px}.dm-dialog>span{font-size:13px}.dm-conversation{min-height:100%}.dm-history{flex:1}.dm-form{margin-top:auto}.dm-message{max-width:88%}.dm-tools .icon-button,.dm-tools .emoji-button{width:var(--social-control);height:var(--social-control);min-width:var(--social-control);min-height:var(--social-control)}
.dm-head button{min-height:var(--social-control)}.dm-message audio{width:260px}.dm-search input{min-height:var(--social-field)}
/* A single scale for community, profile, account and messages. VKUI tokens are
   the sizing reference; Academy fonts and palettes remain the brand source. */
.button,.button.small{min-height:var(--social-control);padding:7px 14px;font-size:var(--social-label);line-height:20px}
.community-actions .button{min-height:var(--social-control);padding:7px 12px;font-size:var(--social-label)}
.icon-button,.icon-button.small,.emoji-button{min-width:var(--social-control);min-height:var(--social-control);width:var(--social-control);height:var(--social-control);padding:8px}
.theme-swatch{height:var(--social-control)}.theme-swatch:before{inset:9px 8px}.theme-swatch[aria-pressed=true]:after{inset:5px 4px}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select{min-height:var(--social-field);padding:8px 12px;font-size:var(--social-input);line-height:20px}
.search input{padding-inline:0}.emoji-editor,textarea{font-size:var(--social-body);line-height:22px}
.hint,.role-label,.post-date,.dm-message footer{font-size:var(--social-caption);line-height:16px}
.community-contact-identity strong{font-size:var(--social-label);line-height:20px}.community-contact-identity small{line-height:16px}
.community-navigation{padding:0 20px;gap:24px}.community-navigation a,.community-navigation button{min-height:44px;padding:10px 0;font-size:var(--social-label)}
.community-editor,.share-fallback{padding:20px}.community-editor h2,.section-heading h2,.account-panel h2{font-size:var(--social-subtitle);line-height:22px}
.community-editor h2{margin-bottom:16px}.author-choice{margin:12px 0}.author-options label span{min-height:var(--social-control);padding:8px 10px;font-size:13px}
#postBody{margin-top:12px;min-height:88px}.attachment-form{padding-top:12px}.composer-footer{margin-top:12px;gap:12px}
#feed{gap:16px}.feed-heading{margin-bottom:12px}.post-avatar-link{width:40px;height:40px}.post-header{gap:10px}
.post-author{font-size:var(--social-label);line-height:20px}.post-controls button{min-width:var(--social-control);min-height:var(--social-control)}
.post-footer{margin-top:16px;padding-top:8px}.comment-toggle{min-height:var(--social-control);font-size:var(--social-label)}
.comments{padding-top:16px}.comment-head{font-size:var(--social-label)}.comment-head time{font-size:var(--social-caption)}
.comment-body{font-size:15px;line-height:20px}.comment-actions button{font-size:var(--social-footnote);min-height:var(--social-control)}
.vk-title{font-size:var(--social-body);line-height:22px}.source-text{line-height:1.429}.source-link,.read-more{font-size:var(--social-footnote)}
.account-heading{margin-bottom:16px}.account-panel{padding:20px 24px}.account-tabs{margin-bottom:16px}
.account-tabs [role=tab]{min-height:44px;padding:10px 14px;line-height:22px}.account-login h1,.profile-head h2{font-size:var(--social-heading);line-height:28px}
.profile-avatar{width:72px;height:72px}.profile-head{gap:16px;margin-bottom:20px}.account-form{font-size:var(--social-label);line-height:20px}
.account-form label{font-size:var(--social-label)}.account-panel .notification-option{padding:14px 0}.account-panel .notification-option small{line-height:20px}
.profile-form .input-row input,.data-table select{font-size:var(--social-input)}.data-table th,.data-table td{padding:10px}
.member-bio{font-size:var(--social-body);line-height:22px;margin:16px 0}.member-status{margin:12px 0 0}
.dm-welcome{padding:48px 24px}.dm-welcome h2{font-size:var(--social-title);line-height:24px}.dm-welcome p{font-size:var(--social-label);line-height:20px}
.dm-head{padding:8px 16px;min-height:56px}.dm-actions>summary{width:var(--social-control);height:var(--social-control)}.dm-actions-list{top:calc(var(--social-control) + 4px)}
.dm-log{padding:16px;gap:8px}.dm-body{font-size:var(--social-body);line-height:22px}.dm-message{gap:6px;padding:8px 12px}
.dm-form{padding:12px 16px}.dm-form .emoji-editor{min-height:56px;font-size:var(--social-body);line-height:22px}.dm-tools .button{font-size:14px;padding:7px 12px}
.dm-delete-dialog h2{font-size:var(--social-title);line-height:24px}.notification-copy{line-height:20px}
@media(max-width:1099px) and (min-width:701px){.layout,.social-layout{grid-template-columns:154px minmax(0,1fr);padding:20px;gap:16px}.layout>.community-contact{grid-column:2;grid-row:2;width:100%;padding:14px 18px}.layout>.main{grid-row:3}.main-nav a{font-size:13px;padding:10px 8px;gap:8px}.site-header{padding:10px 20px}.brand small{font-size:9px}.install-app span{display:none}.member-card{gap:16px;padding:20px}.member-avatar{width:80px;height:80px}.member-identity h1{font-size:var(--social-heading)}.member-identity .actions .button{font-size:12px}.dm-layout{grid-template-columns:200px minmax(0,1fr)}.dm-form,.dm-head,.dm-log{padding:14px}.account-footer{padding-left:190px}.community-actions{justify-content:flex-start}.account-panel{padding:20px}}
@media(max-width:700px){
  html{scrollbar-gutter:auto;scroll-padding-top:68px}
  body{--social-header-height:60px;--social-control:44px;--social-field:44px;--social-input:1rem;padding-bottom:calc(var(--social-bottom-height) + env(safe-area-inset-bottom));font-size:var(--social-body)}
  .site-header{position:sticky;top:0;z-index:50;min-height:var(--social-header-height);padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));gap:10px;background:var(--bg-color);padding-top:calc(8px + env(safe-area-inset-top))}
  .brand{font-size:18px;gap:8px}.brand img{width:32px;height:32px}.brand small{font-size:9px;letter-spacing:0;margin-top:4px}
  .header-actions{gap:6px}.header-actions .theme-choice{margin:0;gap:0}.theme-swatch{width:28px}.theme-swatch:before{inset:13px 7px}.theme-swatch[aria-pressed=true]:after{inset:9px 3px}
  .header-actions>.button:not(.install-app){display:none}.header-actions .install-app{width:44px;height:44px;padding:10px}.install-app span{display:none}
  .layout,.social-layout{display:block;padding:12px 12px 20px}.layout{display:flex;flex-direction:column;gap:0}.rail{display:none}.layout>.community-profile{width:100%;order:0;margin-bottom:12px}.layout>.main{max-width:none;order:2}.layout>.community-contact{display:block;order:1;width:100%;margin:0 0 12px;padding:12px 16px}
  .community-cover{aspect-ratio:1920 / 768}.community-identity{padding:16px;gap:12px;align-items:flex-start}.community-name h1{font-size:clamp(20px,calc(16px + 1.25vw),22px);line-height:1.3;letter-spacing:-.015em;text-wrap:pretty}.community-name p{font-size:14px;line-height:20px}
  .community-actions{justify-content:flex-start;gap:8px}.community-actions .button{min-height:44px;font-size:13px;padding:10px 12px}.community-about{padding:16px}.community-about p{font-size:14px}.community-editor{padding:20px 16px}
  .feed-heading{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:12px}.feed-heading .search{max-width:none;width:100%;flex:auto;border:1px solid var(--line);border-radius:9px;padding:0 12px;background:var(--surface)}.search input{border:0;padding:10px 0;font-size:16px}.search svg{width:19px}
  .composer,.post{padding:16px}.composer{margin-bottom:12px}.section-heading{gap:8px}.section-heading h2{font-size:16px}#feed{gap:12px}.post-text{line-height:1.375}.post-author{font-size:14px}.post-controls{gap:0}.post-controls button{min-width:40px;min-height:44px}.post-header{gap:9px}.post-avatar-link{width:40px;height:40px}.post-date{font-size:12px}
  input,textarea,select,.input-row input,.emoji-editor,.reply-form .emoji-editor,.dm-form .emoji-editor{font-size:16px}.emoji-status-editor{font-size:14px}.button{min-height:44px}.icon-button{min-height:44px;min-width:44px}.hint{font-size:13px}
  .community-navigation{padding-inline:16px;gap:20px}.community-navigation a,.community-navigation button{font-size:14px}
  .community-editor,.share-fallback{padding:16px}.profile-head h2,.account-login h1{font-size:var(--social-title);line-height:24px}
  .theme-swatch{height:44px}.account-panel .notification-option{padding:12px 0}body .message-notifications{top:calc(var(--social-header-height) + 8px + env(safe-area-inset-top))}
  .button.small,.icon-button.small{min-height:44px}.icon-button.small{min-width:44px}.dm-actions-list{top:48px}
  .dm-actions>summary{width:44px;height:44px}.dm-tools .icon-button,.dm-tools .emoji-button{width:44px;height:44px;min-width:44px;min-height:44px}
  .dm-delete-dialog{padding:20px}.dm-form .emoji-editor{font-size:16px}.dm-welcome{padding:32px 16px}
  .actions{flex-wrap:wrap}.diary-toolbar select,.diary-toolbar input,.data-table select,.toolbar input[type=search],.account-form select,.account-form input{font-size:16px}
  .input-row{flex-wrap:wrap}.input-row input{flex:1 1 160px}.composer-footer{flex-wrap:wrap;gap:12px}.composer-footer>.hint{max-width:none}.composer-footer>.actions{width:100%;justify-content:flex-end}.reply-form>div{flex-wrap:wrap}.reply-form .hint{flex-basis:100%}.reply-form .button{min-height:44px}.comment-actions button{min-height:44px;font-size:12px}.comment-toggle{min-height:44px}.post-footer{gap:20px;margin-top:14px;padding-top:8px}
  .member-card{padding:16px;gap:16px;flex-wrap:wrap}.member-avatar{width:72px;height:72px;border-radius:12px}.member-identity h1{font-size:var(--social-title);line-height:1.2}.member-identity .actions{margin-top:16px;gap:8px}.member-identity .button{font-size:13px}.member-bio{font-size:16px;line-height:22px}.member-tabs{margin:12px 0;gap:20px}.member-tabs button{font-size:14px}.member-page .community-editor{margin-top:18px}
  .account-heading h1{font-size:var(--social-title);line-height:1.2}.account-panel{padding:16px}.account-login{padding:20px 16px;margin:12px auto}.account-login h1{font-size:var(--social-title)}.account-tabs{margin-bottom:12px;gap:4px}.account-tabs [role=tab]{min-height:44px;padding:10px 12px;white-space:nowrap}.profile-head{gap:14px;flex-wrap:wrap}.profile-avatar{width:72px;height:72px}.account-details{grid-template-columns:1fr}.panel-head{flex-wrap:wrap;gap:12px}.panel-head .head-actions{flex-wrap:wrap}.toolbar{flex-wrap:wrap}.toolbar>*{min-width:0}.toolbar>input{flex:1 1 100%}.diary-toolbar{display:flex}.diary-toolbar>label{flex:1 1 130px}.table-wrap{position:relative;overflow:auto;max-width:100%;overscroll-behavior-x:contain}.admin-filters{display:flex;flex-wrap:wrap}.admin-filters>label{flex:1 1 130px}.account-footer{padding:0 16px 24px}.form-grid{grid-template-columns:1fr}.entry-meta{flex-wrap:wrap}.entry-actions{flex-wrap:wrap}.head-actions{gap:8px}
  .mobile-nav{position:fixed;bottom:0;left:0;right:0;z-index:60;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));min-height:var(--social-bottom-height);padding:4px max(6px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));background:var(--bg-color);border-top:1px solid var(--line)}
  .mobile-nav a{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:50px;padding:3px 1px;text-decoration:none;font-size:11px;line-height:1.2;color:var(--muted);border-radius:8px}.mobile-nav svg{width:24px;height:24px}.mobile-nav a[aria-current]{color:var(--accent);background:var(--accent-soft);font-weight:600}.mobile-nav .nav-unread{position:absolute;top:0;left:calc(50% + 5px);min-width:17px;height:17px;font-size:10px;margin:0}
  .toast{bottom:calc(86px + env(safe-area-inset-bottom));max-width:calc(100vw - 24px);width:max-content;padding:12px 16px}.emoji-panel{max-height:calc(100dvh - 120px);overflow:auto;width:min(360px,calc(100vw - 16px))}.emoji-grid{max-height:230px}.install-guide{bottom:calc(84px + env(safe-area-inset-bottom));max-height:calc(100dvh - 180px)}
  .messages-page-title{font-size:var(--social-title);margin-bottom:12px}.dm-layout{display:block;min-height:calc(100dvh - 220px)}.dm-sidebar{border:0;padding:16px 12px}.dm-dialogs{max-height:none}.dm-contacts{max-height:240px}.dm-main{display:none}.dm-layout.dm-thread-open .dm-sidebar{display:none}.dm-layout.dm-thread-open .dm-main{display:flex}.dm-layout.dm-thread-open .dm-welcome{display:none}.dm-back{display:inline-flex;padding:0;flex:none}.dm-head{padding:6px 12px;min-height:56px}.dm-head a{font-size:15px}.dm-head #dmBlock{font-size:11px;max-width:105px}.dm-conversation{min-height:350px}.dm-history{min-height:80px;display:flex;flex-direction:column;flex:1}.dm-log{height:auto;min-height:0;flex:1;padding:12px;gap:8px}.dm-message{max-width:90%;padding:10px 12px;min-width:0}.dm-body{font-size:16px;line-height:22px}.dm-form{padding:10px 12px 12px}.dm-form .emoji-editor{min-height:48px;max-height:120px}.dm-tools{gap:6px}.dm-tools .button{font-size:12px;min-height:44px}.dm-tools #dmFileButton span{display:none}.dm-tools #dmFileButton{width:44px;padding:10px}.dm-tools .dm-send{padding-inline:14px}.dm-tools .dm-record-state:not(:empty){flex:1 1 100%;order:2}.dm-attachment{max-height:130px;overflow:auto}.dm-no-messages{top:50%;margin:0}.dm-error{padding:12px}.dm-with-image>.dm-image{padding:6px}.dm-image img{width:240px;height:auto;max-height:260px}.dm-message audio{width:220px;max-width:100%}
  body[data-social-view="messages"]:has(.dm-thread-open) .site-header,body[data-social-view="messages"]:has(.dm-thread-open) .mobile-nav,body[data-social-view="messages"]:has(.dm-thread-open) .messages-page-title{display:none}
  body[data-social-view="messages"]:has(.dm-thread-open){padding-bottom:0}
  body[data-social-view="messages"]:has(.dm-thread-open) .social-layout{padding:0}
  body[data-social-view="messages"]:has(.dm-thread-open) #panel-messages{border:0;border-radius:0}
  body[data-social-view="messages"]:has(.dm-thread-open) .dm-conversation{height:var(--keyboard-height,100dvh);padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
}
@media(max-width:360px){.brand{font-size:17px}.brand small{font-size:8px}.site-header{padding-inline:12px}.header-actions{gap:2px}.theme-swatch{width:24px}.member-identity{flex-basis:100%}.dm-tools{gap:3px}.dm-tools .dm-send{padding-inline:10px}}
@media(pointer:coarse) and (min-width:701px){body{--social-control:44px;--social-field:44px}.main-nav a{min-height:44px}.theme-swatch{height:44px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.post{animation:none}}
