.community-page{max-width:820px;padding-top:18px;padding-bottom:100px}.community-hero{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#171717,#303030);color:#fff;border-radius:22px;padding:24px;margin-bottom:14px;box-shadow:0 15px 40px #0002}.community-hero small{color:#feee00;font-weight:800}.community-hero h1{font-size:34px;margin:3px 0}.community-hero p{margin:0;color:#ddd}.community-open-composer,.community-publish-btn{background:#feee00;color:#111;border:0;border-radius:12px;padding:12px 18px;font-weight:900;text-decoration:none;cursor:pointer;white-space:nowrap}.community-flash{padding:12px 14px;border-radius:12px;margin:10px 0}.community-flash.success{background:#ecfdf3;color:#166534}.community-flash.error{background:#fff1f2;color:#9f1239}.community-composer{background:#fff;border:1px solid #e4e7ec;border-radius:18px;padding:14px;margin-bottom:14px;box-shadow:0 8px 28px #0000000d}.community-composer-title{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eee;padding-bottom:10px}.community-composer-title button{border:0;background:#f3f4f6;border-radius:50%;width:32px;height:32px;font-size:22px}.community-composer textarea{width:100%;min-height:120px;border:0;resize:vertical;padding:16px 4px;font:inherit;outline:none;background:transparent}.community-image-picker{display:inline-flex;gap:8px;align-items:center;background:#f6f7f9;border-radius:10px;padding:10px 14px;cursor:pointer;font-weight:700}.community-image-picker input{display:none}.community-image-preview{display:block;width:100%;max-height:520px;object-fit:contain;border-radius:14px;margin:12px 0;background:#f6f7f9}.community-composer-note{color:#6b7280;font-size:13px;margin:12px 0}.community-publish-btn{width:100%;font-size:16px}.community-mention-box{position:absolute;z-index:20;background:#fff;border:1px solid #ddd;border-radius:12px;box-shadow:0 12px 35px #0002;max-height:260px;overflow:auto;min-width:280px}.community-mention-option{display:block;width:100%;border:0;background:#fff;text-align:right;padding:10px 12px;cursor:pointer}.community-mention-option:hover{background:#fffbe0}.community-selected-mentions{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}.community-mention-chip{background:#fff7c2;border:1px solid #f0d700;border-radius:999px;padding:5px 9px;font-size:12px}.community-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;background:#fff;border:1px solid #e5e7eb;padding:6px;border-radius:15px;margin:12px 0}.community-tabs a{text-align:center;text-decoration:none;color:#222;padding:10px;border-radius:11px;font-weight:700}.community-tabs a.active{background:#feee00}.community-feed{display:flex;flex-direction:column;gap:14px}.community-post{background:#fff;border:1px solid #e3e6eb;border-radius:18px;overflow:hidden;box-shadow:0 6px 24px #0000000b}.community-post-head{display:flex;align-items:center;gap:10px;padding:14px}.community-avatar,.community-comment-avatar{width:42px;height:42px;border-radius:50%;background:#feee00;display:grid;place-items:center;font-weight:900;color:#111;flex:0 0 auto}.community-post-user{display:flex;flex-direction:column;min-width:0}.community-post-user strong{font-size:15px}.community-post-user small{color:#747b87}.community-pinned{margin-inline-start:auto;background:#111;color:#feee00;padding:5px 8px;border-radius:999px;font-size:11px}.community-post-text{padding:0 14px 12px;line-height:1.8;font-size:16px}.community-product-mention{color:#0a66c2;font-weight:800;text-decoration:none}.community-post-image{display:block;width:100%;max-height:760px;object-fit:cover;background:#f3f4f6}.community-post-summary{display:flex;justify-content:space-between;padding:10px 14px;color:#697386;font-size:13px;border-bottom:1px solid #eee}.community-post-actions{display:grid;grid-template-columns:repeat(3,1fr);padding:4px 8px;border-bottom:1px solid #eee}.community-action{border:0;background:transparent;text-decoration:none;color:#343a40;padding:10px 6px;text-align:center;font:inherit;font-weight:700;cursor:pointer}.community-action.is-liked{color:#1877f2}.community-comments{padding:10px 14px 0;display:flex;flex-direction:column;gap:8px}.community-comment{display:flex;align-items:flex-start;gap:8px}.community-comment-avatar{width:34px;height:34px;font-size:12px}.community-comment>div{background:#f0f2f5;border-radius:14px;padding:7px 10px}.community-comment strong{font-size:12px}.community-comment p{margin:2px 0 0;font-size:13px}.community-comment-form{display:flex;align-items:center;gap:8px;padding:10px 14px 14px}.community-comment-form input{flex:1;border:0;background:#f0f2f5;border-radius:999px;padding:11px 14px;outline:none}.community-comment-form button{border:0;background:#feee00;width:38px;height:38px;border-radius:50%;cursor:pointer}.community-login-comment{display:block;margin:10px 14px 14px;background:#f0f2f5;border-radius:999px;padding:11px 14px;color:#555;text-decoration:none}.community-pending-list{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:12px;margin-bottom:14px}.community-pending-list h2{font-size:17px;margin:0 0 10px}.community-pending-item{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #eee}.community-pending-item img{width:70px;height:55px;object-fit:cover;border-radius:9px}.community-pending-item>div{display:flex;flex-direction:column;flex:1}.community-pending-item button{border:0;background:#fee2e2;color:#991b1b;border-radius:8px;padding:7px 10px}.community-empty{text-align:center;background:#fff;border:1px dashed #d1d5db;padding:35px;border-radius:16px;color:#6b7280}.community-pagination{margin-top:18px}
@media(max-width:800px){.community-page{padding:10px 10px 92px}.community-hero{padding:16px;border-radius:16px}.community-hero h1{font-size:27px}.community-hero p{font-size:13px}.community-open-composer{padding:10px 12px;font-size:13px}.community-tabs{grid-template-columns:repeat(3,1fr);font-size:12px}.community-post{border-radius:14px}.community-post-image{max-height:none;aspect-ratio:auto;object-fit:contain}.community-post-text{font-size:15px}.community-action{font-size:13px}.community-mention-box{left:12px;right:12px;min-width:0}}
[data-theme="dark"] .community-composer,[data-theme="dark"] .community-tabs,[data-theme="dark"] .community-post,[data-theme="dark"] .community-pending-list{background:#181a1f;border-color:#30333a;color:#f5f5f5}[data-theme="dark"] .community-action{color:#ddd}[data-theme="dark"] .community-comment>div,[data-theme="dark"] .community-comment-form input,[data-theme="dark"] .community-login-comment{background:#282b31;color:#eee}[data-theme="dark"] .community-tabs a{color:#eee}[data-theme="dark"] .community-tabs a.active{color:#111}


/* ===== Instagram-like post actions + mobile comments bottom sheet ===== */
.community-post-summary{display:none!important}
.community-post-actions{display:none!important}
.community-comments:not(.community-comments-scroll){display:none!important}

.community-instagram-actions{
    display:flex;
    align-items:center;
    gap:17px;
    padding:11px 14px 12px;
    border-top:1px solid #eee;
}
.community-icon-action{
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-width:0;
    border:0;
    background:transparent;
    color:#111;
    text-decoration:none;
    padding:2px;
    cursor:pointer;
    font:inherit;
    line-height:1;
}
.community-icon-action span{
    width:26px;
    height:26px;
    display:grid;
    place-items:center;
}
.community-icon-action svg{
    width:25px;
    height:25px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.85;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.community-icon-action b{
    font-size:13px;
    font-weight:800;
    color:#444;
    min-width:8px;
}
.community-heart-action .community-heart-icon svg path{
    transition:fill .16s ease,stroke .16s ease,transform .16s ease;
    transform-origin:center;
}
.community-heart-action.is-liked{
    color:#ed1c24;
}
.community-heart-action.is-liked .community-heart-icon svg path{
    fill:#ed1c24;
    stroke:#ed1c24;
}
.community-heart-action.is-liked .community-heart-icon svg{
    animation:communityHeartPop .22s ease;
}
@keyframes communityHeartPop{
    0%{transform:scale(.82)}
    70%{transform:scale(1.15)}
    100%{transform:scale(1)}
}
.community-share-action{margin-inline-start:auto}

.community-comments-sheet{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
}
.community-comments-sheet.is-open{
    display:block;
}
.community-comments-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.48);
    opacity:0;
    transition:opacity .2s ease;
}
.community-comments-sheet.is-open .community-comments-backdrop{
    opacity:1;
}
.community-comments-panel{
    position:absolute;
    left:0;
    right:0;
    bottom:0;
    height:min(70vh,680px);
    max-height:calc(100dvh - 56px);
    display:flex;
    flex-direction:column;
    background:#fff;
    border-radius:22px 22px 0 0;
    box-shadow:0 -18px 55px #0004;
    transform:translateY(100%);
    transition:transform .22s ease;
    overflow:hidden;
    will-change:transform;
}
.community-comments-sheet.is-open .community-comments-panel{
    transform:translateY(0);
}
.community-comments-sheet.is-dragging .community-comments-panel{
    transition:none;
}
.community-comments-handle-wrap{
    padding:9px 0 7px;
    cursor:grab;
    touch-action:none;
}
.community-comments-handle{
    width:42px;
    height:5px;
    border-radius:99px;
    background:#c8cbd0;
    display:block;
    margin:auto;
}
.community-comments-title{
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    min-height:47px;
    padding:0 50px;
    border-bottom:1px solid #ececec;
}
.community-comments-title strong{
    font-size:15px;
}
.community-comments-title button{
    position:absolute;
    left:12px;
    top:50%;
    transform:translateY(-50%);
    border:0;
    width:34px;
    height:34px;
    border-radius:50%;
    background:#f1f2f4;
    font-size:24px;
    color:#333;
    cursor:pointer;
}
.community-comments-scroll{
    flex:1;
    overflow-y:auto;
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:13px 14px 18px;
}
.community-no-comments{
    margin:auto;
    text-align:center;
    color:#7b818c;
    font-size:13px;
    padding:30px 15px;
}
.community-comments-scroll .community-comment{
    display:flex;
    align-items:flex-start;
    gap:8px;
}
.community-comments-scroll .community-comment>div{
    background:#f0f2f5;
    border-radius:14px;
    padding:8px 11px;
}
.community-comments-scroll .community-comment strong{
    display:block;
    font-size:12px;
}
.community-comments-scroll .community-comment p{
    margin:3px 0 0;
    font-size:13px;
    line-height:1.6;
}
.community-sheet-comment-form{
    flex:0 0 auto;
    padding:10px 12px max(12px,env(safe-area-inset-bottom));
    border-top:1px solid #ececec;
    background:#fff;
}
.community-sheet-comment-form input{
    min-width:0;
}
.community-sheet-comment-form button{
    display:grid;
    place-items:center;
}
.community-sheet-comment-form button svg{
    width:18px;
    height:18px;
    fill:none;
    stroke:#111;
    stroke-width:2;
    stroke-linecap:round;
    stroke-linejoin:round;
}
body.community-comments-open{
    overflow:hidden!important;
}
/* Allow normal gestures inside the sheet. JS only captures a clear downward drag. */
body.community-comments-open .community-comments-panel{
    touch-action:pan-y;
}
.community-comments-scroll{
    touch-action:pan-y;
}

[data-theme="dark"] .community-instagram-actions{border-color:#30333a}
[data-theme="dark"] .community-icon-action{color:#f2f2f2}
[data-theme="dark"] .community-icon-action b{color:#ddd}
[data-theme="dark"] .community-heart-action.is-liked{color:#ff4052}
[data-theme="dark"] .community-comments-panel{background:#181a1f;color:#f5f5f5}
[data-theme="dark"] .community-comments-title{border-color:#30333a}
[data-theme="dark"] .community-comments-title button{background:#292c32;color:#eee}
[data-theme="dark"] .community-comments-scroll .community-comment>div{background:#282b31}
[data-theme="dark"] .community-sheet-comment-form{background:#181a1f;border-color:#30333a}
[data-theme="dark"] .community-sheet-comment-form button svg{stroke:#111}

@media(min-width:801px){
    .community-comments-panel{
        left:50%;
        right:auto;
        width:min(620px,calc(100% - 32px));
        transform:translate(-50%,100%);
    }
    .community-comments-sheet.is-open .community-comments-panel{
        transform:translate(-50%,0);
    }
}

/* ===== Tager Safety: Love only + click comment box to open sheet ===== */
.community-instagram-actions{
    gap:18px;
}
.community-heart-action{
    color:#ed1c24!important;
}
.community-heart-action .community-heart-icon svg path{
    stroke:#ed1c24;
}
.community-heart-action b{
    color:#ed1c24!important;
}
.community-heart-action.is-liked .community-heart-icon svg path{
    fill:#ed1c24;
    stroke:#ed1c24;
}
.community-share-action{display:none!important}

.community-comment-launcher{
    width:calc(100% - 28px);
    margin:0 14px 13px;
    display:flex;
    align-items:center;
    gap:9px;
    border:0;
    background:transparent;
    padding:0;
    cursor:pointer;
    text-align:right;
    font:inherit;
}
.community-comment-launcher-avatar{
    width:34px;
    height:34px;
    border-radius:50%;
    flex:0 0 34px;
    display:grid;
    place-items:center;
    background:#feee00;
    color:#111;
    font-size:12px;
    font-weight:900;
}
.community-comment-launcher-placeholder{
    flex:1;
    min-width:0;
    padding:10px 14px;
    border-radius:999px;
    background:#f0f2f5;
    color:#777f8b;
    font-size:13px;
}
[data-theme="dark"] .community-comment-launcher-placeholder{
    background:#282b31;
    color:#b9bec8;
}

/* ===== First visible comment + owner actions ===== */
.community-post-head{position:relative}
.community-post-delete{
    margin-inline-start:auto;
    width:34px;
    height:34px;
    border:0;
    border-radius:50%;
    display:grid;
    place-items:center;
    background:transparent;
    color:#777;
    cursor:pointer;
}
.community-post-delete:hover{background:#fff0f0;color:#d71920}
.community-post-delete svg{
    width:19px;
    height:19px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}
.community-first-comment-wrap{
    padding:0 14px 9px;
}
.community-first-comment-wrap[hidden]{display:none!important}
.community-first-comment{
    width:100%;
    display:flex;
    align-items:flex-start;
    gap:9px;
    border:0;
    background:transparent;
    padding:0;
    text-align:right;
    cursor:pointer;
    font:inherit;
    color:inherit;
}
.community-first-comment-copy{
    min-width:0;
    flex:1;
    padding-top:2px;
    font-size:13px;
    line-height:1.55;
    overflow:hidden;
}
.community-first-comment-copy strong{
    display:inline;
    margin-inline-end:5px;
    font-size:12px;
}
.community-first-comment-copy>span{
    color:#4b5563;
    word-break:break-word;
}
.community-comment-main{min-width:0;flex:1}
.community-comment-owner-actions{
    display:flex;
    align-items:center;
    gap:9px;
    margin-top:5px;
}
.community-comment-owner-actions button{
    border:0;
    background:transparent;
    padding:0;
    color:#6b7280;
    font-size:11px;
    font-weight:700;
    cursor:pointer;
}
.community-comment-owner-actions button[data-delete-comment]{color:#d71920}
.community-comment-editor{
    margin-top:5px;
}
.community-comment-editor input{
    width:100%;
    border:1px solid #d7dbe2;
    border-radius:10px;
    background:#fff;
    padding:8px 10px;
    font:inherit;
    font-size:13px;
    outline:none;
}
.community-comment-editor input:focus{border-color:#fece00;box-shadow:0 0 0 2px #feee0040}
.community-comment-editor-actions{
    display:flex;
    gap:8px;
    margin-top:6px;
}
.community-comment-editor-actions button{
    border:0;
    border-radius:8px;
    padding:5px 10px;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}
.community-comment-editor-actions [data-save-comment]{background:#feee00;color:#111}
.community-comment-editor-actions [data-cancel-comment]{background:#eceff3;color:#444}
[data-theme="dark"] .community-post-delete{color:#bbb}
[data-theme="dark"] .community-post-delete:hover{background:#361f23;color:#ff5b66}
[data-theme="dark"] .community-first-comment-copy>span{color:#c8cbd2}
[data-theme="dark"] .community-comment-editor input{background:#1f2228;border-color:#3a3d45;color:#eee}

/* ===== Drag sheet from anywhere ===== */
.community-comments-panel{
    overscroll-behavior-y:contain;
}
.community-comments-panel:not(.community-comment-editor *){
    -webkit-user-select:none;
    user-select:none;
}
.community-comments-scroll,
.community-comments-scroll *{
    -webkit-user-select:text;
    user-select:text;
}
.community-comments-sheet.is-dragging .community-comments-backdrop{
    transition:none;
}
.community-comments-sheet.is-dragging .community-comments-panel{
    cursor:grabbing;
}

/* ===== Comments sheet viewport stability + polished edit/delete ===== */
.community-comments-sheet{
    height:var(--community-viewport-height,100dvh);
    min-height:320px;
    overflow:hidden;
    overscroll-behavior:none;
}
.community-comments-panel{
    height:min(76dvh,720px);
    max-height:calc(var(--community-viewport-height,100dvh) - 18px);
}
body.community-comments-open{
    overflow:hidden!important;
    overscroll-behavior:none;
}
.community-comments-scroll{
    min-height:0;
    scrollbar-gutter:stable;
}

.community-comment-owner-actions{
    gap:7px;
    margin-top:7px;
}
.community-comment-owner-actions button{
    min-height:30px;
    border:1px solid #e2e5e9;
    border-radius:9px;
    padding:5px 10px;
    background:#fff;
    color:#4b5563;
    font-size:11px;
    font-weight:800;
    line-height:1;
    transition:background .15s ease,border-color .15s ease,transform .15s ease;
}
.community-comment-owner-actions button:hover{
    background:#f6f7f8;
    border-color:#d4d8de;
}
.community-comment-owner-actions button:active{transform:scale(.97)}
.community-comment-owner-actions button[data-delete-comment]{
    color:#d71920;
    border-color:#ffd6d8;
    background:#fff7f7;
}
.community-comment-owner-actions button[data-delete-comment]:hover{
    background:#ffeded;
    border-color:#ffc2c5;
}

.community-comment-editor{
    margin-top:7px;
    padding:8px;
    border:1px solid #e0e3e8;
    border-radius:12px;
    background:#fff;
    box-shadow:0 4px 16px #0000000a;
}
.community-comment-editor textarea{
    display:block;
    width:100%;
    min-height:52px;
    max-height:160px;
    resize:none;
    overflow-y:auto;
    border:0;
    border-radius:8px;
    background:#f6f7f9;
    padding:9px 10px;
    color:#111;
    font:inherit;
    font-size:13px;
    line-height:1.6;
    outline:none;
}
.community-comment-editor textarea:focus{
    background:#fff;
    box-shadow:0 0 0 2px #feee0066;
}
.community-comment-editor-actions{
    display:flex;
    justify-content:flex-end;
    gap:7px;
    margin-top:8px;
}
.community-comment-editor-actions button{
    min-width:62px;
    min-height:32px;
    border:0;
    border-radius:9px;
    padding:6px 11px;
    font-size:11px;
    font-weight:900;
    cursor:pointer;
}
.community-comment-editor-actions [data-save-comment]{
    background:#feee00;
    color:#111;
}
.community-comment-editor-actions [data-cancel-comment]{
    background:#eef0f3;
    color:#4b5563;
}
.community-comment-editor-actions button:disabled{opacity:.55;cursor:not-allowed}

.community-post-delete{
    border:1px solid transparent;
}
.community-post-delete:hover{
    border-color:#ffd6d8;
}

[data-theme="dark"] .community-comment-owner-actions button{
    background:#23262c;
    border-color:#3b3f47;
    color:#d8dbe1;
}
[data-theme="dark"] .community-comment-owner-actions button[data-delete-comment]{
    background:#341f23;
    border-color:#5b2a31;
    color:#ff737d;
}
[data-theme="dark"] .community-comment-editor{
    background:#202329;
    border-color:#353941;
}
[data-theme="dark"] .community-comment-editor textarea{
    background:#181a1f;
    color:#f3f4f6;
}

@media(max-width:800px){
    .community-comments-panel{
        height:min(82dvh,680px);
        max-height:calc(var(--community-viewport-height,100dvh) - 8px);
        border-radius:20px 20px 0 0;
    }
    .community-comments-title{min-height:50px}
    .community-comments-scroll{padding-bottom:14px}
    .community-sheet-comment-form{padding-bottom:max(10px,env(safe-area-inset-bottom))}
}
