@media(max-width:900px){
html,body{width:100%;max-width:100%;font-size:16px}body{padding-bottom:env(safe-area-inset-bottom,0px)}.community-mode header{position:sticky;top:0;z-index:100;padding-top:env(safe-area-inset-top,0px)}.community-mode .top,.top{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;gap:8px;padding:8px max(10px,env(safe-area-inset-right,0px)) 6px max(10px,env(safe-area-inset-left,0px));width:100%;box-sizing:border-box}.brand{min-width:0;gap:7px}.brand-icon{width:36px;height:36px}.brand-word.brand-klika{font-size:28px;letter-spacing:-1px}.brand small{font-size:9px;margin-top:2px}.brand-type{min-width:0}#account{display:flex;max-width:none;margin:0;gap:0;font-size:13px}#account>span{display:none}#account button{font-size:13px;min-width:44px;padding:7px 9px}#theme-toggle{font-size:0;width:44px;height:44px;padding:0}#theme-toggle:before{content:'◐';font-size:24px}#notification-control{margin:0;position:static}#notification-bell{width:44px;height:44px;padding:9px}.community-mode #nav,#nav{display:flex!important;grid-column:1/-1;order:initial;flex-wrap:nowrap;overflow-x:auto;max-width:100%;width:100%;margin:0;padding:4px 0;gap:5px;scrollbar-width:thin;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.community-mode #nav button,#nav button{flex:0 0 auto;white-space:nowrap;font-size:14px;padding:8px 11px;min-height:44px;border-radius:10px}.community-mode main,main{width:100%;max-width:100%;box-sizing:border-box;margin:12px auto;padding-inline:max(10px,env(safe-area-inset-right,0px)) max(10px,env(safe-area-inset-left,0px))}.social-layout,.layout{display:flex;flex-direction:column;gap:12px;min-width:0;width:100%}.social-menu{display:none!important}.social-feed{order:1;width:100%;min-width:0;grid-column:auto;grid-row:auto}.social-contacts{order:2;position:static;width:100%;max-height:none;grid-column:auto;grid-row:auto}.social-contacts .friend-presence-list{display:flex;overflow-x:auto;gap:12px;padding-bottom:8px}.friend-presence{flex:0 0 190px}.social-contacts .panel{padding:12px}.community-mode #app>.row.spread{gap:8px;flex-wrap:wrap}.community-mode #app>.row.spread h1,h1{font-size:25px}h2,.recent-heading h2{font-size:21px}h3{font-size:19px}.panel,.social-feed>.panel{padding:14px;border-radius:12px;margin-bottom:12px}.panel p{overflow-wrap:anywhere}.grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:12px}.row{flex-wrap:wrap;gap:8px}button,summary{min-height:44px}input,textarea,select{font-size:16px!important;min-height:46px;max-width:100%;box-sizing:border-box}input[type=checkbox]{min-height:22px}input[type=range]{min-height:32px}textarea{line-height:1.5}.community-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.community-shortcuts button{justify-content:flex-start;font-size:14px;min-height:46px;padding:8px}.community-shortcuts .clicka-icon{width:20px;height:20px}.social-composer{padding:12px}.composer-line{gap:8px}.composer-line .avatar{width:36px;height:36px}.composer-line textarea{height:48px;min-height:48px;padding:11px 13px}.composer-actions{gap:8px;flex-wrap:wrap}.composer-actions span{font-size:12px}.modern-stories.panel{padding:0;background:transparent;border:0;box-shadow:none}.modern-stories .story-tile{width:110px;flex-basis:110px;height:190px}.modern-stories .story-scroll{width:44px;height:44px;left:0}.stories-panel>.row{gap:8px;flex-wrap:wrap}.stories-panel>.row h2{font-size:19px}.story-demo-note{font-size:12px}.story-create-photo{height:136px}.story-plus{top:115px}.story-create strong{margin-top:25px}#story-viewer{width:min(420px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:calc(var(--screen-height,100dvh) - 16px);border-radius:12px}.story-screen{height:min(60dvh,560px);min-height:180px}.story-view-head{padding:10px;gap:8px}.story-view-actions{flex-wrap:wrap;padding:10px}.story-view-actions button{font-size:14px}.notification-popover{position:fixed;top:calc(64px + env(safe-area-inset-top,0px));right:8px;left:8px;width:auto;max-width:none;max-height:calc(var(--screen-height,100dvh) - 90px);overflow:auto;box-sizing:border-box}.notification-popover h2{font-size:21px}.notification-item{padding:10px;font-size:14px}.notification-item .avatar{flex-shrink:0}.member-card.panel{padding:0}.member-content{padding:0 14px 14px}.member-profile>.member-cover{height:150px}.classic-profile-heading{gap:12px;flex-wrap:wrap}.classic-profile-heading>.avatar{width:88px;height:88px}.classic-profile-info h2{font-size:25px}.classic-profile-actions{width:100%;max-width:none}.classic-profile-nav{overflow-x:auto;flex-wrap:nowrap}.member-facts{font-size:13px}.gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.gallery img{height:auto;aspect-ratio:1;object-fit:cover}.demo-profile-dialog{max-width:calc(100vw - 20px);max-height:calc(var(--screen-height,100dvh) - 20px)}.demo-profile-body{padding:16px}.demo-profile-dialog .demo-cover{height:140px}.demo-profile-body>.demo-photo{width:100px;height:100px;margin-top:-65px}.poll-topic-row{padding:12px;gap:10px;min-height:72px}.poll-topic-text strong{font-size:17px}.poll-topic-icon{width:34px;height:34px}.poll-topic-text small{font-size:12px}#selected-poll,#selected-article,#selected-message,.poll-topics-panel{scroll-margin-top:125px}.people-filter-grid{gap:10px}.forum-topic-row{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:14px 0}.forum-topic-row>small{grid-column:1/-1}.forum-topic-row strong{font-size:18px}.forum-header h1{font-size:24px}.forum-header .group-cover{height:150px}.iwant-embedded iframe{min-height:420px;height:70dvh}.iwant-toolbar{padding:12px;flex-wrap:wrap}.video-embed iframe,.spotify-embed iframe{max-width:100%}.tablewrap{width:100%;max-width:100%;overflow-x:auto}.message-full-body{font-size:16px}.auth.reference-auth{width:100%;max-width:460px;box-sizing:border-box}.reference-auth h1{font-size:32px}.reference-auth input{font-size:18px!important}.reference-auth button{min-height:48px}.chatcompose>.row,.chatsettings{flex-wrap:nowrap}.chatcompose input{min-width:0}.chatlog{max-height:45dvh}.bubble{font-size:16px}.emoji{overflow-x:auto;flex-wrap:nowrap}.emoji button{min-width:40px;flex-shrink:0}.chatsettings button{font-size:13px;padding:5px}.chatsettings label{font-size:13px}#notice{bottom:calc(12px + env(safe-area-inset-bottom,0px) + var(--keyboard-inset,0px))}
}
@media(min-width:600px) and (max-width:900px){.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.community-shortcuts{grid-template-columns:repeat(3,minmax(0,1fr))}.social-feed{max-width:760px;margin-inline:auto}.social-contacts{max-width:760px;margin-inline:auto}.brand-icon{width:42px;height:42px}.brand-word.brand-klika{font-size:32px}}
@media(max-width:380px){.top,.community-mode .top{gap:5px}.brand small{display:none}.brand-word.brand-klika{font-size:25px}.brand-icon{width:30px;height:30px}.panel,.social-feed>.panel{padding:12px}.modern-stories.panel{padding:0}.member-card.panel{padding:0}.community-shortcuts button{font-size:13px;gap:5px}.classic-profile-heading>.avatar{width:74px;height:74px}.people-filter-grid{grid-template-columns:1fr}.people-filter-grid label:last-child{grid-column:auto}}
@media(max-width:900px) and (max-height:500px){.community-mode header{position:relative}.story-screen{height:55dvh;min-height:120px}.story-view-head{padding:6px 10px}.story-view-actions{padding:6px}}

@media(max-width:900px){.top>.brand{grid-row:1;grid-column:1}#notification-control{grid-row:1;grid-column:2}#account{grid-row:1;grid-column:3}#theme-toggle{grid-row:1;grid-column:4}#nav{grid-row:2;grid-column:1/-1}#nav:empty{display:none!important}#chat{left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));width:auto;max-width:none;max-height:calc(var(--screen-height,100dvh) - 12px);bottom:var(--keyboard-inset,0px)}}

/* Mobile uses the same right-hand navigation as desktop, at a compact width. */
@media(max-width:900px){
.community-mode #nav{display:none!important}.community-mode .social-layout{display:grid;grid-template-columns:112px minmax(0,1fr);gap:10px;align-items:start}.community-mode .social-menu{display:block!important;grid-column:1;grid-row:1 / span 2;position:sticky;top:calc(72px + env(safe-area-inset-top,0px));max-height:calc(100dvh - 86px - env(safe-area-inset-top,0px));overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;overscroll-behavior-y:contain;width:100%;padding:0}.community-mode .social-feed{grid-column:2;grid-row:1;order:initial;width:100%;margin:0;max-width:none}.community-mode .social-contacts{grid-column:2;grid-row:2;order:initial;margin:0;max-width:none}.community-mode .side-profile{padding:8px 4px;gap:7px;align-items:center;min-height:48px}.community-mode .side-profile .avatar{width:28px;height:28px;flex-shrink:0}.community-mode .side-profile strong{font-size:12px;line-height:1.3;overflow-wrap:anywhere;min-width:0}.community-mode .social-menu .side-nav{display:flex;flex-direction:column;flex-wrap:nowrap;overflow:visible;gap:4px;margin:8px 0 0;padding:0;width:100%;order:initial}.community-mode .side-nav button{display:flex;align-items:center;gap:6px;min-height:46px;width:100%;flex:none;padding:8px 5px;font-size:12px;line-height:1.35;text-align:right;white-space:normal;overflow-wrap:anywhere;border-radius:10px}.community-mode .side-nav .side-icon{width:25px;height:28px;border-radius:8px;flex-shrink:0}.community-mode .side-nav .clicka-icon{width:19px;height:19px}.community-mode .side-community{display:none}.social-feed .grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}.community-mode .social-feed .panel{padding:12px}.community-mode .social-feed .modern-stories.panel{padding:0}.community-mode .social-feed .member-card.panel{padding:0}.social-feed .people-filter-grid{grid-template-columns:1fr}.social-feed .people-filter-grid label:last-child{grid-column:auto}.social-feed .poll-topic-row{padding:10px;gap:7px}.social-feed .poll-topic-icon{width:26px;height:30px;font-size:20px}.social-feed .poll-topic-text strong{font-size:16px}.social-feed .community-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}.social-feed .community-shortcuts button{font-size:12px;padding:7px;gap:5px;overflow-wrap:anywhere}.social-feed .community-shortcuts .clicka-icon{width:17px;height:17px}.social-feed .stories-panel>.row h2{font-size:17px}.social-feed .composer-actions span{font-size:11px}.social-feed .member-card-heading{gap:8px}.social-feed .member-card-heading>.avatar,.social-feed .member-card-heading>.demo-photo{width:54px;height:54px}.social-feed .classic-profile-heading{flex-direction:column;align-items:flex-start}.social-feed .classic-profile-info{width:100%}.social-feed .classic-profile-info h2{font-size:23px}.social-feed .social-composer textarea{padding-inline:10px}.social-feed .identity{gap:8px}.social-feed .identity>.demo-photo{width:42px;height:42px}.social-menu .message-badge{font-size:10px;min-width:16px;padding:1px 4px}
}
@media(max-width:480px){.community-mode .social-layout{grid-template-columns:88px minmax(0,1fr);gap:8px}.community-mode .side-nav button{font-size:11px;padding:8px 3px;gap:4px}.community-mode .side-nav .side-icon{width:22px;height:26px}.community-mode .side-nav .clicka-icon{width:17px;height:17px}.community-mode .side-profile{flex-direction:column;align-items:center;text-align:center;gap:4px}.community-mode .side-profile strong{font-size:11px}.social-feed h2{font-size:19px}.social-feed .community-highlights h2{font-size:18px}.social-feed .community-shortcuts{grid-template-columns:1fr}.social-feed .community-shortcuts button{font-size:13px}.social-feed .composer-line .avatar{width:28px;height:28px}.social-feed .composer-line{gap:6px}.social-feed .composer-actions{align-items:stretch}.social-feed .composer-actions span{width:100%}.social-feed .composer-actions .primary{width:100%}.social-feed .member-card-heading{flex-wrap:wrap}.social-feed .member-card-heading>div{min-width:100px}.social-feed .poll-topic-row{gap:5px}.social-feed .poll-topic-icon{display:none}.social-feed .forum-topic-row{grid-template-columns:minmax(0,1fr)}.social-feed .forum-topic-row>.tag{justify-self:start}.social-feed .member-actions button{width:100%}.social-feed .gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
