/* Scoped group feed: neutral Facebook rhythm, Ken avatars and existing permissions. */
body:has(#noi-dung>.cong-dong:not(.home-community)){background:#0047ab}
body:has(#noi-dung>.cong-dong:not(.home-community)) .canh-nen{display:none}
#noi-dung:has(>.cong-dong:not(.home-community)){padding-left:0;padding-right:0}
.cong-dong.community{--cb:#1877f2;--cb2:#050505;--chu:#050505;--phu:#65676b;--nen:#f0f2f5;--vien:#ced0d4;font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;font-size:15px;color:#050505;background:#0047ab;max-width:960px;padding:16px 24px 100px;border-radius:0}
.cong-dong *{font-family:inherit}
.cong-dong :is(h1,h2,h3,h4,button,input,textarea,select){font-family:inherit}
.cong-dong :is(button,a,summary):focus-visible{outline:3px solid #1877f2;outline-offset:2px}
.cong-dong :is(button,a,summary){touch-action:manipulation}
.cong-dong [hidden]{display:none!important}
.cong-dong .community-head{background:white;color:#050505;box-shadow:none;border-radius:8px;padding:8px 12px;margin:0 auto 12px;max-width:680px}
.cong-dong .community-head h1{color:#050505;font-size:18px}
.cong-dong .community-head small{color:#65676b}
.cong-dong .head-mid>img{display:none}
.cong-dong .head-back,.cong-dong .community-head .notifications{background:#e4e6eb;color:#050505}
.cong-dong .community-body,.cong-dong .community-body.two-col{display:flex;flex-direction:column;gap:12px;padding:0;max-width:680px;margin:auto}
.cong-dong .community-main{width:100%;order:1}
.cong-dong .community-side{position:static;order:0;width:100%}
.cong-dong .community-tools{gap:8px}
.cong-dong .community-tools a{font-weight:600;border:0;border-radius:6px;font-size:13px;background:#e4e6eb;color:#4b4f56}
.cong-dong .community-filters{gap:0;margin:12px 0;padding:0;border-bottom:1px solid #ced0d4}
.cong-dong .community-filters button{border:0;border-radius:0;background:transparent;box-shadow:none;color:#65676b;padding:8px 12px;font-size:13px;font-weight:600}
.cong-dong .community-filters [aria-pressed=true]{color:#1877f2;border-bottom:3px solid #1877f2;background:transparent}
.cong-dong .community-pinned{display:none}
.cong-dong .community-list{display:flex;flex-direction:column;gap:16px}
.cong-dong .community-card{border:0;border-radius:8px;background:#fff;box-shadow:0 1px 2px #0003;padding:12px 16px 0;margin:0;gap:0;min-width:0;overflow:visible}
.cong-dong .community-card>header{flex-wrap:nowrap;gap:10px;align-items:flex-start;margin-bottom:12px}
.cong-dong .av{width:40px;height:40px;flex:0 0 40px;border-radius:50%;background:#f0f2f5;display:grid;place-items:center;overflow:hidden;box-shadow:none}
.cong-dong .av img{width:100%;height:100%;object-fit:contain;float:none;margin:0}
.cong-dong .who{flex:1 1 0;min-width:0}
.cong-dong .who b{font-size:15px;font-weight:650;color:#050505;line-height:1.35}
.cong-dong .who small{font-size:13px;color:#65676b;line-height:1.4}
.cong-dong .who .type-chip{display:inline;padding:0;background:transparent;font-size:12px;font-weight:400;color:#65676b;margin:0}
.cong-dong .community-card header .community-status{display:none}
.cong-dong .pin-chip{font-size:11px;padding:3px;white-space:nowrap}
.cong-dong .community-card header details{margin-left:auto}
.cong-dong .community-card details>summary{background:none;border:0;color:#65676b;font-size:24px;width:44px;height:44px;margin-top:-5px}
.cong-dong .community-card details>div{top:100%;bottom:auto}
.cong-dong .community-content{font-size:15px;line-height:1.5;margin:0 0 12px;color:#050505;overflow-wrap:anywhere}
.cong-dong .community-content.collapsed{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.cong-dong .read-more{align-self:flex-start;min-height:44px;border:0;background:none;padding:0;font-weight:650;color:#050505}
.cong-dong p.community-status{width:100%;border-radius:4px;font-size:13px;margin:0 0 12px;background:#fff4ce;font-weight:500}
.cong-dong .community-media{margin:0 -16px;border-radius:0;gap:3px}
.cong-dong .community-media .photo{border:0;border-radius:0;min-height:0}
.cong-dong .community-media img{border-radius:0;max-height:none}
.cong-dong .community-media.n1{aspect-ratio:4/3;grid-template-columns:1fr}
.cong-dong .community-stats{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px;font-size:13px;color:#65676b}
.cong-dong .community-stats a{min-height:40px;font-size:13px;color:#65676b;text-decoration:none;min-width:0}
.cong-dong .reaction-icon{display:inline-grid;place-items:center;background:#1877f2;color:#fff;width:19px;height:19px;border-radius:50%;font-size:12px}
.cong-dong .community-card>footer{display:flex;flex-wrap:nowrap;gap:0;margin:0;border-top:1px solid #ced0d4;border-bottom:1px solid #ced0d4;padding:3px 0}
.cong-dong .community-card>footer>:is(button,a){flex:1 1 0;min-width:0;min-height:44px;border:0;border-radius:4px;padding:4px;gap:6px;background:none;color:#65676b;font-size:14px;font-weight:600;white-space:nowrap}
.cong-dong .community-card>footer>.heart.on{color:#1877f2;background:none}
.cong-dong :is(button,a):hover{background-color:#e4e6eb}
.cong-dong .post-comments{padding:10px 0 12px}
.cong-dong .community-comments{gap:10px}
.cong-dong .community-comment{display:flex;flex-wrap:nowrap;gap:8px;border:0;border-radius:0;padding:0;background:transparent;white-space:normal}
.cong-dong .community-comment .av,.cong-dong .community-comment-form .av{width:32px;height:32px;flex-basis:32px}
.cong-dong .comment-body{min-width:0;flex:1}
.cong-dong .comment-bubble{background:#f0f2f5;border-radius:18px;padding:8px 12px;width:fit-content;max-width:100%}
.cong-dong .comment-bubble b{font-size:13px;font-weight:650}
.cong-dong .comment-bubble p{font-size:15px;line-height:1.4;margin:2px 0 0;overflow-wrap:anywhere}
.cong-dong .comment-meta{display:flex;align-items:center;gap:10px;padding:0 10px;color:#65676b;font-size:12px;flex-wrap:wrap}
.cong-dong .comment-meta button{padding:0;min-width:44px;min-height:44px;font-size:12px;font-weight:600}
.cong-dong .comment-meta em{padding:8px 0}
.cong-dong .comments-more{min-height:44px;border:0;padding:0;background:none;color:#65676b;font-weight:650}
.cong-dong .community-comment-form{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start;gap:8px;margin:8px 0 0;border:0;border-radius:0;padding:0;background:none}
.cong-dong .community-comment-form label{flex:1;min-width:0}
.cong-dong .community-comment-form textarea{min-height:40px;width:100%;padding:10px 12px;border:0;border-radius:20px;background:#f0f2f5;font:inherit;font-size:15px;resize:vertical}
.cong-dong textarea::placeholder{font-weight:400;color:#65676b;opacity:1}
.cong-dong .community-comment-form button{min-width:44px;min-height:44px;padding:0;background:none;color:#1877f2}
.cong-dong .community-comment-form small{flex:0 0 100%;font-size:12px;color:#65676b}
.cong-dong .community-comment-form small:empty{display:none}
.cong-dong .feed-composer{background:#fff;border-radius:8px;padding:12px 16px;box-shadow:0 1px 2px #0003;margin:0 0 16px}
.cong-dong .compose-top{display:flex;align-items:center;gap:8px}
.cong-dong .compose-prompt{flex:1;min-width:0;background:#f0f2f5;color:#65676b;border:0;border-radius:24px;text-align:left;justify-content:flex-start;font-size:16px;padding:10px 12px;font-weight:400}
.cong-dong .compose-actions{display:flex;border-top:1px solid #e4e6eb;margin-top:12px;padding-top:4px;gap:0}
.cong-dong .compose-actions button{flex:1 1 0;min-width:0;background:none;border:0;border-radius:4px;padding:4px;font-size:13px;color:#65676b;font-weight:600;line-height:1.3}
.cong-dong .composer-reward{font-size:11px;color:#65676b;margin-top:4px;line-height:1.5}
.cong-dong .community-empty{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:12px;text-align:left;padding:24px 16px;border:0;border-radius:8px;background:white;box-shadow:0 1px 2px #0003}
.cong-dong .community-empty img{width:48px;height:64px;object-fit:contain}
.cong-dong .community-empty b{font-size:15px;color:#050505}
.cong-dong .community-empty p{font-size:14px;font-weight:400;color:#65676b;margin:4px 0 0}
.cong-dong .community-group{background:#fff;box-shadow:0 1px 2px #0003;border-radius:8px;margin:0 auto 12px;max-width:680px;overflow:hidden}
.cong-dong .group-cover{display:block;width:100%;height:210px;object-fit:cover;object-position:center 45%;margin:0;float:none}
.cong-dong .group-info{padding:16px 24px}
.cong-dong .group-info h2{font-size:28px;color:#050505;margin:0 0 4px;font-weight:750}
.cong-dong .group-info p{color:#65676b;font-size:13px;margin:0}
.cong-dong .group-members{display:flex;margin-top:12px;padding-left:4px}
.cong-dong .group-members .av{width:32px;height:32px;flex-basis:32px;border:2px solid white;margin-left:-4px}
.cong-dong .community-group nav{border-top:1px solid #ced0d4;margin:0 24px}
.cong-dong .community-group nav a{color:#1877f2;border-bottom:3px solid #1877f2;padding:12px 16px;font-weight:650;text-decoration:none}
.cong-dong .sk i,.cong-dong .sk .sk-box{background:#e4e6eb;animation:fb-pulse 1.4s ease-in-out infinite}
.cong-dong .sk{padding-bottom:16px;gap:12px}
@keyframes fb-pulse{50%{opacity:.45}}
dialog.community-composer-dialog.cong-dong{position:fixed;inset:0;margin:auto;width:500px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);padding:0;border:0;border-radius:8px;box-shadow:0 12px 28px #0004;background:#fff;overflow:auto;overscroll-behavior:contain}
.community-composer-dialog::backdrop{background:#ffffffb8}
.cong-dong .composer-heading{position:sticky;top:0;z-index:1;background:white;display:flex;justify-content:center;align-items:center;border-bottom:1px solid #ced0d4;min-height:64px;padding:12px 56px}
.cong-dong .composer-heading h2{margin:0;font-size:20px;color:#050505;text-align:center}
.cong-dong .composer-heading button{position:absolute;right:12px;top:10px;border:0;border-radius:50%;background:#e4e6eb;color:#65676b;width:44px;height:44px;padding:0}
.cong-dong .community-editor{padding:16px;border:0;border-radius:0;gap:12px;background:white}
.cong-dong .composer-author{display:flex;align-items:center;gap:10px;font-size:15px}
.cong-dong .community-editor label{font-size:13px;font-weight:500;color:#65676b}
.cong-dong .community-editor :is(textarea,select){border:1px solid #ced0d4;border-radius:6px;font-weight:400;font-size:15px;color:#050505}
.cong-dong .community-editor textarea{border:0;padding:8px 0;font-size:20px;min-height:140px}
.cong-dong .char-count{font-size:11px}
.cong-dong .community-editor label:has(input[type=file]){padding:10px;border:1px solid #ced0d4;background:white;border-radius:6px;flex-direction:row;justify-content:space-between;text-align:left;font-size:12px}
.cong-dong .community-editor label:has(input[type=file])::before{content:'📷';font-size:22px}
.cong-dong .community-confirm{border-radius:4px;background:white;padding:0;font-size:12px!important;line-height:1.5}
.cong-dong .community-confirm input{margin:0;flex-shrink:0}
.cong-dong .community-submit{background:#1877f2;color:white;border:0;border-radius:6px;box-shadow:none;min-height:44px;font-size:15px;font-weight:650}
.cong-dong .community-submit:disabled{background:#e4e6eb;color:#65676b;opacity:1;cursor:default}
.cong-dong .composer-message{padding:0 16px;font-size:13px;color:#a32222}
.cong-dong.home-community{padding:16px 0;margin-top:12px;max-width:100%;min-height:0!important;background:#f0f2f5;border-radius:8px;box-shadow:none;align-self:start;width:100%}
.cong-dong .home-group-title{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px;align-items:baseline;padding:0 16px 12px}
.cong-dong .home-group-title h3{margin:0;font-size:20px;color:#050505}
.cong-dong .home-group-title span{font-size:12px;color:#65676b}
.cong-dong .xem-them-giao{display:flex;margin-top:8px;color:#1877f2;font-size:14px;font-weight:600;text-decoration:none}
.cong-dong.home-community .feed-composer{position:static}
.cong-dong .community-editor label:has(input[type=file]):focus-within{outline:3px solid #1877f2;outline-offset:2px}
@media(max-width:600px){.cong-dong.community{padding:8px 0 100px;width:100%}.cong-dong .community-group{border-radius:0}.cong-dong .group-cover{height:140px}.cong-dong .group-info{padding:12px 16px}.cong-dong .group-info h2{font-size:24px}.cong-dong .community-card,.cong-dong .feed-composer{border-radius:0}.cong-dong .community-head{border-radius:0}.cong-dong .feed-composer{position:sticky;top:0;z-index:4}.cong-dong .compose-prompt{font-size:15px}.cong-dong .compose-actions button{font-size:12px}.cong-dong .community-filters button{padding:8px}.cong-dong.home-community{padding:12px 0}.cong-dong .community-card>footer>:is(button,a){font-size:13px;gap:5px}dialog.community-composer-dialog.cong-dong{padding:0;width:500px}.cong-dong .community-card .who{flex-basis:0}.cong-dong .community-card>header{gap:8px}}
@media(prefers-reduced-motion:reduce){.cong-dong .sk i,.cong-dong .sk .sk-box{animation:none}}

.cong-dong .compose-actions{display:none}.cong-dong .community-message,.cong-dong .community-body>small{color:#fff}.cong-dong .community-empty,.cong-dong .community-card{color:#050505}

/* 13/11: bỏ khung xanh dày bao quanh ô soạn bài (nhãn :focus-within chồng viền textarea) */
.community-editor label:has(textarea):focus-within{outline:none}
.community-editor textarea:focus,.community-editor textarea:focus-visible{outline:2px solid #1877f2;outline-offset:0;box-shadow:none;border-color:#1877f2}
