/* SGAR: стили карточки поста из ленты, для SGPR.card */
.post{border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-top:16px;position:relative;background:var(--card);transition:box-shadow var(--transition),border-color var(--transition);overflow:hidden;word-break:break-word}
.post:hover{box-shadow:var(--shadow-lg);border-color:rgba(37,99,235,.1)}
:where(html[data-sgstyle=bw]) .post:hover{border-color:rgba(128,128,128,0.12)}
.post-community-badge{display:inline-flex;align-items:center;gap:3px;font-size:10px;color:var(--accent);font-weight:600;background:var(--accent-light);border-radius:10px;padding:2px 6px;vertical-align:middle;white-space:nowrap;max-width:120px;overflow:hidden}
.post-community-badge span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.post-community-badge svg{width:10px;height:10px;stroke:currentColor;fill:none;stroke-width:2;flex-shrink:0}
.postTopLeft{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.postTopLeft-row{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0}
.postHeader{display:flex;gap:12px;align-items:flex-start}
.postTop{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.postText{margin:12px 0;line-height:1.6;white-space:pre-wrap;word-break:break-word;font-size:14.5px}
.post.menu-open{overflow:visible;z-index:60}
.post:has(.postMenu.open){overflow:visible;z-index:60}
.postActions{display:flex;gap:8px;align-items:center;margin-top:14px;flex-wrap:wrap}
.likeBtn{border:1px solid var(--border);background:transparent;color:var(--text);padding:8px 14px;border-radius:var(--radius-sm);cursor:pointer;font-weight:600;font-size:13px;font-family:inherit;transition:color .15s,background .15s,border-color .15s,transform .1s;display:inline-flex;align-items:center;gap:6px;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}
.likeBtn:hover{background:var(--danger-bg);border-color:var(--danger)}
.likeBtn.liked{border-color:var(--danger);color:var(--danger);background:var(--danger-bg)}
.likeBtn:active{transform:scale(.92)}
.likeBtn.pop svg{animation:_likePop .35s ease-out}
.shareBtnMinimal{border:1px solid var(--border);background:transparent;color:var(--text);padding:8px;border-radius:var(--radius-sm);cursor:pointer;display:flex;align-items:center;justify-content:center;width:36px;height:36px;transition:all var(--transition)}
.shareBtnMinimal:hover{color:var(--shared-color);border-color:var(--shared-color)}
.views-minimal{display:flex;align-items:center;gap:4px;color:var(--muted);font-size:13px;font-weight:500;margin-left:auto}
.views-minimal svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.5;opacity:.7}
.avatarWrap{position:relative;width:40px;height:40px;flex:0 0 40px}
.avatar{width:40px;height:40px;border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--avaBg);overflow:hidden;display:flex;align-items:center;justify-content:center}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.postHeader .avatarWrap{width:52px;height:52px;flex:0 0 52px}
.postHeader .avatar{width:52px;height:52px;border-radius:50%}
.avatarFallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--avaFg)}
.avatarFallback svg{width:20px;height:20px;opacity:.8}
.profileLink{color:inherit;text-decoration:none;display:inline-flex;align-items:flex-start;gap:10px;cursor:pointer}
.profileLink:hover{opacity:.85}
.usernameLink{color:var(--text);text-decoration:none;font-weight:700;transition:color var(--transition);cursor:pointer;white-space:nowrap}
.usernameLink:hover{color:var(--accent);text-decoration:underline}
.pinned-icon{position:absolute;top:-8px;right:-8px;width:26px;height:26px;background:linear-gradient(135deg,var(--pinned-color),#f59e0b);color:#fff;border-radius:50%;display:flex;align-items:center;justify-content:center;box-shadow:0 3px 10px rgba(245,158,11,.35);z-index:1}
.post-gif{margin-top:8px;border-radius:var(--radius-sm);overflow:hidden;position:relative;max-width:100%}
.post-gif img{display:block;max-width:100%;max-height:380px;border-radius:var(--radius-sm);cursor:zoom-in;object-fit:contain}
.post-media-grid{display:grid;gap:2px;margin-top:12px;border-radius:14px;overflow:hidden}
.post-media-grid.count-1{grid-template-columns:1fr}
.post-media-grid.count-2{grid-template-columns:1fr 1fr}
.post-media-grid.count-3{grid-template-columns:1fr 1fr}
.post-media-grid.count-4{grid-template-columns:1fr 1fr}
.post-media-grid.count-5{grid-template-columns:1fr 1fr 1fr}
.post-media-grid.count-3 .media-item:first-child{grid-column:1/-1}
.post-media-grid .media-item{position:relative;overflow:hidden;cursor:pointer;background:var(--bg);contain:layout style}
.post-media-grid.count-1 .media-item{contain:none}
.post-media-grid .media-item-inner{width:100%;height:100%;position:relative}
.post-media-grid.count-1 .media-item-inner{height:auto;display:block}
.post-media-grid.count-1 .media-item{min-height:0!important;background:transparent}
.post-media-grid .media-item .video-poster{display:block;width:100%;height:auto;object-fit:contain;background:transparent}
.post-media-grid.count-1 .media-item video.video-poster{max-height:70vh}
.post-media-grid.count-1 .media-item img.video-poster{max-height:70vh}
.post-media-grid:not(.count-1) .media-item{height:188px}
.post-media-grid.count-3 .media-item:first-child{height:210px}
.post-media-grid:not(.count-1) .media-item img,.post-media-grid:not(.count-1) .media-item video{width:100%;height:100%;display:block;object-fit:cover;border-radius:0;max-height:none}
.post-media-grid.count-1 .media-item{min-height:0;background:transparent}
.post-media-grid.count-1 .media-item img{width:100%;height:auto;display:block;object-fit:contain;max-height:78vh;border-radius:0}
.post-media-grid.count-1 .media-item video{width:100%;height:auto;min-height:0;max-height:78vh;display:block;object-fit:contain;background:transparent;border-radius:0}
@media(max-width:480px){.post-media-grid:not(.count-1) .media-item{height:150px}.post-media-grid.count-3 .media-item:first-child{height:172px}}
.post-media-grid.grid-even{grid-template-columns:1fr 1fr}
.post-media-grid .media-item .video-poster{background:transparent}
.post-media-grid .media-item .video-poster.vp-blank{background:var(--bg);object-fit:cover}
.mention-link{color:#2563eb;font-weight:600;cursor:pointer}
:where(html[data-sgstyle=bw]) .mention-link{color:var(--accent)}
.mention-link:hover{text-decoration:underline}
.hashtag-link{color:#2563eb;font-weight:600;cursor:pointer}
:where(html[data-sgstyle=bw]) .hashtag-link{color:var(--accent)}
.hashtag-link:hover{text-decoration:underline}
.mobile-drawer-user .du-ava .avatarFallback svg{width:24px;height:24px;stroke:var(--muted);fill:none;stroke-width:1.8}
@media(max-width:768px){.post{padding:14px 16px!important;margin-top:0!important;border-radius:16px!important;margin-bottom:10px!important}.shareBtnMinimal{width:40px!important;height:40px!important}.avatarWrap{width:38px!important;height:38px!important;flex:0 0 38px!important}.avatar{width:38px!important;height:38px!important;box-sizing:border-box;flex-shrink:0}.avatar img{width:100%!important;height:100%!important;object-fit:cover}.postHeader .avatarWrap{width:46px!important;height:46px!important;flex:0 0 46px!important}.postHeader .avatar{width:46px!important;height:46px!important;border-radius:50%}.postHeader .avatar img{border-radius:50%}.postText{font-size:15px}}
.pd-post .post-media-grid{margin-top:12px}
.post .post-media-grid+.postText,.post .post-extra-media+.postText{margin-top:10px}
.bc-ava .avatarFallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.bc-ava .avatarFallback svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;opacity:.6}
.bc-slot,.post-media-grid,.post-gif,.post-extra-media,.stories-row{overflow-anchor:none}
.post-media-grid.count-1 .media-item{min-height:min(58vw,280px)}
.post-media-grid.count-1 .media-item img{background:var(--bg)}
@media(hover:none){.post{transition:none!important}.post:hover{box-shadow:none!important;border-color:var(--border)!important}.post-media-grid .media-item{cursor:default}}
.post{contain:layout style;border-radius:18px;transition:transform .18s ease}
.postActions{display:flex;gap:2px;align-items:center;margin-top:10px;flex-wrap:nowrap;padding-top:8px;border-top:1px solid var(--border)}
.actBtn{display:inline-flex;align-items:center;gap:6px;border:none!important;background:transparent!important;color:var(--muted);font:600 13.5px/1 inherit;padding:8px 10px!important;border-radius:999px!important;cursor:pointer;transition:background .18s,color .18s,transform .15s;width:auto!important;height:auto!important;font-family:inherit}
.actBtn:hover{background:rgba(127,127,127,.10)!important;color:var(--text)}
.actBtn:active{transform:scale(.94)}
.actBtn svg{width:20px;height:20px;flex-shrink:0;display:block}
.actBtn.likeBtn.liked{color:#ef4444}
.actBtn.likeBtn.liked svg{stroke:#ef4444!important;fill:#ef4444!important}
.actBtn.cBtn:hover{color:#2563eb}
:where(html[data-sgstyle=bw]) .actBtn.cBtn:hover{color:var(--accent)}
.actBtn.shareBtnMinimal:hover{color:#10b981}
.actBtn.pinBtn.pinned{color:#f59e0b}
.views-minimal{margin-left:auto;color:var(--muted);font-size:13px;display:flex;align-items:center;gap:4px;padding-right:6px}
.views-minimal svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}
.post img{}
@media(max-width:640px){.post{border-radius:14px}}
.notif-item-ava .avatarFallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.notif-item-ava .avatarFallback svg{width:20px;height:20px;stroke:var(--muted);fill:none;stroke-width:1.8}
.bm-ava .avatarFallback svg{width:18px;height:18px;stroke:var(--muted);fill:none;stroke-width:1.8}
.post{content-visibility:auto;contain-intrinsic-size:520px}
@media(max-width:768px){.post{contain-intrinsic-size:440px}}
.post-media-grid,.post-gif{contain:layout paint style}
.sg-lite .post{transition:none!important}
.sg-lite .post:hover{transform:none!important;box-shadow:none!important}
.post-media-grid img,.post-media-grid video,.mc-slide img,.video-poster{image-rendering:auto;transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}
@media(max-width:768px){.post-media-grid:not(.count-1) .media-item img,.post-media-grid:not(.count-1) .media-item video{transform:none}}
.avatar .sg-ce,.sn-ava .sg-ce,.chat-item-avatar .sg-ce,.ava .sg-ce{width:76%;height:76%;margin:0;vertical-align:middle}
:where(html[data-sgstyle=bw]) .sgc-mention,:where(html[data-sgstyle=bw]) .sgc-link,:where(html[data-sgstyle=bw]) .post .mention-link,:where(html[data-sgstyle=bw]) .post .hashtag-link{color:var(--text)!important;font-weight:600}
:where(html[data-sgstyle=bw]) .sgc-link,:where(html[data-sgstyle=bw]) .post .mention-link:hover,:where(html[data-sgstyle=bw]) .post .hashtag-link:hover{text-decoration:underline}
.postHeader .avatarWrap,.avatarWrap{width:38px!important;height:38px!important;flex:0 0 38px!important}.avatarWrap .avatar,.postHeader .avatar{width:38px!important;height:38px!important;border-radius:50%!important;object-fit:cover}

/* v160-feedplus: реакции, цитата, «Запланировано», репост-окно, снэкбар отмены */
.sgpr-rx{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:10px}
.sgpr-rx-chip{display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 10px;border-radius:999px;border:1px solid var(--border);background:rgba(127,127,127,.08);color:var(--text);font:600 13px/1 inherit;font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s,border-color .15s,transform .1s}
.sgpr-rx-chip:active,.sgpr-rx-opt:active{transform:scale(.92)}
.sgpr-rx-chip.mine{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 14%,transparent)}
.sgpr-rx-ic{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
[data-rx=fire] .sgpr-rx-ic{color:#f97316}[data-rx=laugh] .sgpr-rx-ic{color:#eab308}[data-rx=wow] .sgpr-rx-ic{color:#a855f7}[data-rx=sad] .sgpr-rx-ic{color:#3b82f6}[data-rx=angry] .sgpr-rx-ic{color:#ef4444}
.sgpr-rx-add{width:30px!important;height:30px!important;min-width:30px;padding:0!important;color:var(--muted)}
.sgpr-rx-pick{position:fixed;z-index:9999;display:flex;gap:4px;padding:6px;border-radius:999px;background:var(--card);border:1px solid var(--border);box-shadow:0 10px 30px rgba(0,0,0,.18);animation:sgprPop .16s ease-out}
.dark .sgpr-rx-pick{box-shadow:0 10px 30px rgba(0,0,0,.5)}
@keyframes sgprPop{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:none}}
.sgpr-rx-opt{width:42px;height:42px;border-radius:50%;border:0;background:transparent;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s,transform .15s}
.sgpr-rx-opt:hover{background:rgba(127,127,127,.14);transform:scale(1.12)}
.sgpr-rx-opt.mine{background:color-mix(in srgb,var(--accent) 18%,transparent)}
.sgpr-rx-opt .sgpr-rx-ic{width:26px;height:26px}
.sgpr-quote{margin-top:10px;border:1px solid var(--border);border-radius:14px;padding:10px 12px;background:rgba(127,127,127,.06);cursor:pointer;color:var(--text);font-size:14px;line-height:1.45;overflow:hidden}
.sgpr-quote:hover{border-color:var(--accent)}
.sgpr-quote.gone{color:var(--muted);cursor:default;font-style:italic}
.sgpr-quote-skel{height:38px;border-radius:8px;background:rgba(127,127,127,.12)}
.sgpr-quote-hd{font-size:13px;margin-bottom:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sgpr-quote-hd .muted{color:var(--muted);font-weight:400}
.sgpr-quote-row{display:flex;gap:10px;align-items:flex-start}
.sgpr-quote-img{width:56px;height:56px;border-radius:10px;object-fit:cover;flex-shrink:0}
.sgpr-quote-text{white-space:pre-wrap;word-break:break-word;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.sgpr-sched{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:999px;font-size:11.5px;font-weight:600;color:#b45309;background:rgba(245,158,11,.14)}
.dark .sgpr-sched{color:#fbbf24;background:rgba(245,158,11,.18)}
.sgpr-sched .sgpr-rx-ic{width:13px;height:13px}
.sgfp-ov{position:fixed;inset:0;z-index:10050;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:16px}
.sgfp-modal{width:100%;max-width:520px;max-height:90vh;overflow:auto;background:var(--card);color:var(--text);border:1px solid var(--border);border-radius:22px;box-shadow:0 20px 60px rgba(0,0,0,.35);padding:16px}
.sgfp-modal h3{margin:0 0 12px;font-size:17px}
.sgfp-modal textarea{width:100%;box-sizing:border-box;min-height:90px;resize:vertical;border-radius:14px;border:1px solid var(--border);background:var(--bg,transparent);color:var(--text);padding:10px 12px;font:inherit;font-size:15px}
.sgfp-row{display:flex;gap:8px;justify-content:flex-end;margin-top:12px;flex-wrap:wrap}
.sgfp-snack{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:10060;display:flex;align-items:center;gap:12px;padding:8px 8px 8px 16px;border-radius:999px;background:var(--card);color:var(--text);border:1px solid var(--border);box-shadow:0 10px 30px rgba(0,0,0,.25);font-size:14px;max-width:calc(100vw - 24px)}
.sgfp-sched{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}
.sgfp-sched input{border-radius:12px;border:1px solid var(--border);background:var(--bg,transparent);color:var(--text);padding:7px 10px;font:inherit;color-scheme:light dark}

/* v164-feeddesign: реакции убраны, сетка фото, карточка репоста */
#feed .sgpr-rx,.post .sgpr-rx{display:none!important}
.sgpr-mg{display:grid;grid-template-columns:repeat(6,1fr);gap:3px;margin-top:12px;border-radius:14px;overflow:hidden;overflow-anchor:none}
.sgpr-mg-it{position:relative;grid-column:span 3;aspect-ratio:1/1;overflow:hidden;cursor:zoom-in;background:rgba(127,127,127,.14);outline:none}
.sgpr-mg-it:focus-visible{box-shadow:inset 0 0 0 3px var(--accent,#2563eb)}
.sgpr-mg-it img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 28%;display:block;border-radius:0;max-height:none}
.sgpr-mg-2 .sgpr-mg-it{aspect-ratio:4/5}
.sgpr-mg-3 .sgpr-mg-it:first-child{grid-column:1/-1;aspect-ratio:16/10}
.sgpr-mg-5 .sgpr-mg-it:nth-child(n+3){grid-column:span 2}
.sgpr-mg-more{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.45);color:#fff;font-size:24px;font-weight:700;pointer-events:none}
.post .sgpr-quote{border-radius:16px;padding:12px 14px;background:rgba(127,127,127,.07);border:1px solid var(--border,rgba(127,127,127,.25));box-shadow:none;transition:border-color .15s,background .15s}
.post .sgpr-quote:hover{background:rgba(127,127,127,.11)}
.post .sgpr-quote-hd{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.post .sgpr-quote-hd b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:1;min-width:0}
.post .sgpr-quote-hd .muted{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:2;min-width:0}
.sgpr-quote-av{width:26px;height:26px;border-radius:50%;flex:0 0 26px;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--accent,#2563eb);color:#fff;font-size:12px;font-weight:700}
.sgpr-quote-av img{width:100%;height:100%;object-fit:cover;display:block}
.sgpr-quote-lbl{display:none}
.post .sgpr-quote-img{width:72px;height:72px;border-radius:12px;object-position:50% 28%}
.post .sgpr-quote-text{font-size:14px;line-height:1.45}
