.feed-shell {
    padding: 2rem 0 3rem;
    max-width: 1240px;
}

.feed-post-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 0 2.4rem;
}

.feed-modal-page .feed-post-shell {
    max-width: none;
    padding: 0;
}

.feed-modal-page .feed-post-shell > .feed-post-card {
    max-width: none;
    margin: 0;
}

.feed-modal-page {
    overflow: hidden;
}

.feed-modal-page main,
.feed-modal-page .feed-post-shell {
    height: auto;
    overflow: visible;
}

.feed-post-shell > .feed-flash,
.feed-post-shell > p,
.feed-post-shell > .feed-post-card {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
}

.feed-head {
    background: linear-gradient(130deg, rgba(22, 26, 39, 0.96), rgba(47, 155, 211, 0.86));
    color: #fff;
    border-radius: 22px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.feed-head h1 {
    font-family: 'Gabarito', sans-serif;
    font-weight: 800;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.feed-head-tag {
    font-size: 0.86em;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.01em;
}

.feed-head p {
    margin-bottom: 0;
    opacity: 0.92;
}

.feed-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.feed-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.feed-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(22, 26, 39, 0.08);
    box-shadow: 0 14px 32px rgba(22, 26, 39, 0.08);
    overflow: hidden;
    max-width: 550px;
    width: 100%;
    margin: 0 auto;
}

.feed-post-card {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    background: transparent;
    overflow: hidden;
    --feed-post-panel-height: auto;
}

.feed-post-card .feed-post-media-col,
.feed-post-card .feed-post-side-col {
    min-width: 0;
}

.feed-post-card .feed-post-side-col {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.feed-post-card .feed-media-frame {
    aspect-ratio: 1 / 1;
    max-height: 550px;
    background: #000;
}

.feed-post-card .feed-media-wrap {
    background: #000;
}

.feed-post-card .feed-post-media-col {
    background: #000;
}

.feed-post-card .feed-post-side-scroll {
    padding: 0 1rem 1rem;
}

.feed-post-card .feed-post-composer {
    border-top: 1px solid rgba(22, 26, 39, 0.12);
    padding: 0.75rem 1rem 1rem;
    background: #fff;
}

.feed-post-card .feed-post-composer form {
    margin: 0;
    position: relative;
}

.feed-card-head {
    padding: 1rem 1rem 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.feed-card-head-tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    min-height: 1.5rem;
}

body[data-feed-can-edit-posts="1"] .feed-card-head {
    flex-wrap: wrap;
    align-items: flex-start;
}

body[data-feed-can-edit-posts="1"] .feed-card-head .feed-card-time {
    flex: 1 1 100%;
}

body[data-feed-can-edit-posts="1"] .feed-card-head-tools {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.feed-card-time {
    color: #6b7280;
    font-size: 0.84rem;
}

.feed-pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    border-radius: 999px;
    padding: 0.2rem 0.56rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #124a33;
    background: rgba(38, 152, 70, 0.14);
}

.feed-pin-badge i {
    font-size: 0.78rem;
    line-height: 1;
}

.feed-pin-form {
    margin: 0;
}

.feed-pin-toggle-btn {
    border: 1px solid rgba(22, 26, 39, 0.16);
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    padding: 0.24rem 0.58rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.feed-pin-toggle-btn.is-disabled {
    opacity: 0.6;
    cursor: default;
}

.feed-edit-toggle-btn {
    padding-inline: 0.62rem;
}

.feed-media-wrap {
    background: #000;
    position: relative;
}

.feed-media-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.feed-media-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    text-indent: -9999px;
}

.feed-media-link-overlay-gallery {
    pointer-events: none;
}

.feed-media-frame {
    width: 100%;
    aspect-ratio: var(--feed-media-ratio, 9 / 16);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.feed-media-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: #000;
}

.feed-media-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.feed-media-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9ca3af;
    font-size: 0.92rem;
}

.feed-gallery-slide {
    margin: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-media-frame:not(.feed-media-frame-gallery) .feed-gallery-slide {
    position: relative;
    flex: 1 1 auto;
}

.feed-media-frame-gallery .feed-gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(12%);
    transition: opacity 320ms ease, transform 320ms ease;
    pointer-events: none;
    z-index: 1;
}

.feed-media-frame-gallery .feed-gallery-slide.is-active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 3;
}

.feed-media-frame-gallery .feed-gallery-slide.is-before {
    transform: translateX(-12%);
}

.feed-media-frame-gallery .feed-gallery-slide.is-after {
    transform: translateX(12%);
}

.feed-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(0, 0, 0, 0.48);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 6;
    display: none;
}

.feed-gallery-nav-prev {
    left: 0.55rem;
}

.feed-gallery-nav-next {
    right: 0.55rem;
}

.feed-gallery-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.55rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    z-index: 6;
}

.feed-gallery-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    flex: 0 0 8px;
    padding: 0;
    border: 0;
    appearance: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.feed-gallery-dot.is-active {
    background: #fff;
}

.feed-card-body {
    padding: 1rem;
}

.feed-caption {
    color: #1f2937;
    margin-bottom: 0.7rem;
}

.feed-caption-body {
    display: block;
}

.feed-caption-body > :last-child {
    margin-bottom: 0;
}

.feed-caption-body a {
    color: #155e85;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.16rem;
}

.feed-caption-body p,
.feed-caption-body ul,
.feed-caption-body ol,
.feed-caption-body blockquote {
    margin-bottom: 0.7rem;
}

.feed-caption-body ul,
.feed-caption-body ol {
    padding-left: 1.2rem;
}

.feed-caption-body blockquote {
    border-left: 3px solid rgba(21, 94, 133, 0.22);
    padding-left: 0.85rem;
    color: #374151;
}

.feed-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
    min-width: 0;
    align-items: flex-start;
}

.feed-tag {
    display: inline-block;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    background: rgba(47, 155, 211, 0.12);
    color: #175a84;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.25;
    max-width: 100%;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.feed-tag-more {
    background: rgba(22, 26, 39, 0.08);
    color: #374151;
    flex: 0 0 auto;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.feed-inline-editor {
    margin-top: 0.8rem;
    border: 1px dashed rgba(22, 26, 39, 0.18);
    border-radius: 14px;
    background: #f8fafc;
    padding: 0.75rem;
}

.feed-inline-editor-post {
    margin-bottom: 0.8rem;
}

.feed-inline-edit-form {
    display: block;
    margin: 0;
}

.feed-inline-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.32rem;
}

.feed-inline-textarea {
    min-height: 104px;
    resize: vertical;
}

.feed-inline-tags-input {
    font-size: 0.9rem;
}

.feed-inline-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.feed-inline-message {
    margin-top: 0.45rem;
    font-size: 0.82rem;
    color: #4b5563;
}

.feed-edit-surface {
    position: relative;
}

.feed-inline-editor-overlay {
    position: absolute;
    inset: 0;
    margin-top: 0;
    z-index: 18;
    border-style: solid;
    background: #fff;
    box-shadow: 0 12px 26px rgba(22, 26, 39, 0.12);
    overflow: auto;
}

.feed-inline-editor-overlay .feed-inline-label {
    font-size: 0.74rem;
    margin-bottom: 0.2rem;
}

.feed-inline-editor-overlay .feed-inline-textarea {
    min-height: 78px;
    max-height: 132px;
}

.feed-inline-editor-overlay .feed-inline-actions {
    margin-top: 0.5rem;
}

.feed-card.is-editing {
    position: relative;
    z-index: 12;
    overflow: visible;
    height: auto !important;
}

.feed-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: #4b5563;
    font-size: 0.88rem;
}

.feed-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.feed-like-form {
    margin: 0;
}

.feed-like-btn,
.feed-comment-link,
.feed-report-btn {
    border: 1px solid rgba(22, 26, 39, 0.16);
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    padding: 0.35rem 0.7rem;
    font-size: 0.86rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.feed-like-btn.is-liked {
    border-color: rgba(220, 53, 69, 0.44);
    color: #b91c1c;
    background: rgba(220, 53, 69, 0.08);
}

.feed-like-btn.is-disabled {
    opacity: 0.6;
    cursor: default;
}

.feed-comment-box {
    margin-top: 1rem;
}

.feed-comment-box textarea:not(.feed-post-comment-input) {
    resize: none;
    min-height: 84px;
}

.feed-guest-comment-cta textarea[readonly] {
    cursor: pointer;
    background: #f8fafc;
}

.feed-comment-form-row {
    gap: 0.55rem;
}

.feed-comment-form-row small {
    min-width: 0;
}

.feed-comment-form-actions {
    flex-wrap: nowrap;
}

.feed-comment-submit-btn {
    white-space: nowrap;
}

.feed-comment-form-actions .btn {
    white-space: nowrap;
}

.feed-comment-box .feed-post-comment-input {
    resize: none;
    min-height: 44px;
    height: 44px;
    max-height: 160px;
    overflow-y: hidden;
}

.feed-guest-cta-copy {
    color: #4b5563;
    font-size: 0.9rem;
}

.feed-guest-comment-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.feed-guest-comment-actions .btn,
.feed-guest-comment-actions a.btn {
    min-height: 42px;
    padding: 0.45rem 0.9rem;
    font-weight: 700;
}

.feed-post-card .feed-post-composer .feed-comment-form-row {
    flex-wrap: nowrap;
    gap: 0.6rem;
}

.feed-post-card .feed-post-composer .feed-comment-form-row small {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-post-card .feed-post-composer .feed-comment-form-actions {
    margin-left: auto;
    flex-wrap: nowrap;
}

.feed-comment-message {
    margin-top: 0.7rem;
    font-size: 0.86rem;
    color: #4b5563;
}

.feed-emoji-picker {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.5rem;
    border: 1px solid rgba(22, 26, 39, 0.1);
    border-radius: 12px;
    background: #f8fafc;
}

.feed-post-card .feed-post-composer .feed-emoji-picker {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.2rem);
    width: min(380px, calc(100vw - 1.5rem));
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 0;
    z-index: 40;
    box-shadow: 0 16px 34px rgba(22, 26, 39, 0.18);
}

.feed-emoji-native {
    width: 100%;
    height: 320px;
}

.feed-post-card .feed-post-composer .feed-emoji-native {
    height: 300px;
}

.feed-emoji-btn {
    border: 0;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.2rem;
    border-radius: 6px;
}

.feed-emoji-btn:hover {
    background: rgba(22, 26, 39, 0.08);
}

.feed-emoji-toggle-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
}

.feed-emoji-toggle-btn i {
    font-size: 1rem;
    line-height: 1;
}

.feed-post-card .feed-post-composer .feed-emoji-picker,
.feed-post-card .feed-post-side-scroll,
.feed-post-comment-input {
    scrollbar-width: thin;
}

.feed-post-card .feed-post-composer .feed-emoji-picker::-webkit-scrollbar,
.feed-post-card .feed-post-side-scroll::-webkit-scrollbar,
.feed-post-comment-input::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.feed-post-card .feed-post-composer .feed-emoji-picker::-webkit-scrollbar-thumb,
.feed-post-card .feed-post-side-scroll::-webkit-scrollbar-thumb,
.feed-post-comment-input::-webkit-scrollbar-thumb {
    background: rgba(22, 26, 39, 0.28);
    border-radius: 999px;
}

.feed-post-card .feed-post-composer .feed-emoji-picker::-webkit-scrollbar-track,
.feed-post-card .feed-post-side-scroll::-webkit-scrollbar-track,
.feed-post-comment-input::-webkit-scrollbar-track {
    background: transparent;
}

.feed-comments {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

.feed-comment {
    border: 1px solid rgba(22, 26, 39, 0.12);
    border-radius: 14px;
    padding: 0.7rem;
    background: #fff;
}

.feed-comment.is-reserved {
    border-color: rgba(13, 110, 253, 0.28);
    background: rgba(13, 110, 253, 0.06);
}

.feed-comment-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.4rem;
}

.feed-comment-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: #d1d5db;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.feed-comment-user {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.92rem;
}

.feed-comment-time {
    color: #6b7280;
    font-size: 0.78rem;
}

.feed-comment-meta {
    min-width: 0;
}

.feed-comment-admin-tools {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    position: relative;
}

.feed-comment-status-pill {
    border-radius: 999px;
    padding: 0.14rem 0.46rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.feed-comment-menu-toggle {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(22, 26, 39, 0.16);
    background: #fff;
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.feed-comment-menu-toggle i {
    font-size: 0.92rem;
    line-height: 1;
}

.feed-comment-menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 28;
    background: #fff;
    border: 1px solid rgba(22, 26, 39, 0.14);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(22, 26, 39, 0.18);
    padding: 0.46rem;
}

.feed-comment-status-visible {
    color: #166534;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
}

.feed-comment-status-reserved {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.28);
}

.feed-comment-status-hidden {
    color: #6b7280;
    background: rgba(107, 114, 128, 0.12);
    border-color: rgba(107, 114, 128, 0.28);
}

.feed-comment-status-rejected,
.feed-comment-status-deleted {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.28);
}

.feed-comment-text {
    white-space: pre-line;
    margin: 0;
    color: #1f2937;
}

.feed-comment-actions-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.62rem;
}

.feed-comment-like-btn,
.feed-comment-action-btn {
    border: 1px solid rgba(22, 26, 39, 0.14);
    border-radius: 999px;
    background: #fff;
    color: #334155;
    min-height: 32px;
    padding: 0.34rem 0.72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.36rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.feed-comment-like-btn i,
.feed-comment-action-btn i {
    line-height: 1;
    font-size: 0.88rem;
}

.feed-comment-like-btn:hover,
.feed-comment-action-btn:hover,
.feed-comment-like-btn:focus-visible,
.feed-comment-action-btn:focus-visible {
    color: var(--cc-forest-dark);
    border-color: rgba(var(--cc-forest-rgb), 0.35);
    box-shadow: 0 8px 18px rgba(var(--cc-forest-rgb), 0.12);
    transform: translateY(-1px);
}

.feed-comment-like-btn.is-liked {
    color: var(--cc-berry);
    border-color: rgba(var(--cc-berry-rgb), 0.28);
    background: rgba(var(--cc-berry-rgb), 0.08);
}

.feed-comment-replies {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.78rem;
    padding-left: 0.95rem;
    border-left: 2px solid rgba(var(--cc-forest-rgb), 0.16);
}

.feed-comment-reply {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 246, 251, 0.92) 100%);
}

.feed-comment-reply-composer {
    margin-top: 0.72rem;
    padding: 0.72rem;
    border-radius: 14px;
    border: 1px solid rgba(22, 26, 39, 0.1);
    background: rgba(244, 246, 251, 0.75);
}

.feed-comment-reply-composer .feed-comment-message {
    margin-top: 0.42rem;
}

.feed-comment.is-hidden {
    border-color: rgba(107, 114, 128, 0.24);
    background: rgba(107, 114, 128, 0.04);
}

.feed-comment.is-rejected,
.feed-comment.is-deleted {
    border-color: rgba(220, 38, 38, 0.22);
    background: rgba(220, 38, 38, 0.05);
}

.feed-comment-moderate-form {
    margin: 0;
}

.feed-comment-moderate-row {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.feed-comment-moderate-select {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.25rem 1.2rem 0.25rem 0.48rem;
    border-radius: 999px;
    border-color: rgba(22, 26, 39, 0.16);
    line-height: 1.2;
    height: 30px;
    background-position: right 0.45rem center;
    background-size: 11px 9px;
}

.feed-comment-moderate-apply {
    padding: 0.24rem 0.52rem;
    min-width: 62px;
    height: 30px;
    justify-content: center;
    font-size: 0.74rem;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .feed-comment-admin-tools {
        gap: 0.26rem;
    }

    .feed-comment-moderate-select {
        width: 74px;
        min-width: 74px;
        max-width: 74px;
    }

    .feed-comment-menu {
        right: -2px;
    }

    .feed-comment-replies {
        padding-left: 0.72rem;
    }
}

.feed-comments-more-btn {
    margin-top: 0.75rem;
    border: 1px solid rgba(22, 26, 39, 0.18);
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    padding: 0.4rem 0.9rem;
    font-size: 0.86rem;
}

.feed-comments-more-btn.is-loading {
    opacity: 0.55;
    cursor: wait;
}

.feed-pagination {
    margin-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
}

.feed-pagination.is-fallback-hidden {
    display: none;
}

.feed-infinite-scroll {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(22, 26, 39, 0.1);
    background: rgba(255, 255, 255, 0.82);
    color: #334155;
}

.feed-infinite-scroll.is-loading .feed-infinite-status {
    color: #0f172a;
}

.feed-infinite-scroll.is-complete {
    opacity: 0.88;
}

.feed-infinite-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(38, 152, 70, 0.22);
    border-top-color: #269846;
    animation: feed-infinite-spin 0.8s linear infinite;
    flex: 0 0 auto;
}

.feed-infinite-scroll:not(.is-loading) .feed-infinite-spinner {
    animation-play-state: paused;
    opacity: 0.45;
}

.feed-infinite-status {
    font-size: 0.92rem;
    font-weight: 600;
}

@keyframes feed-infinite-spin {
    to {
        transform: rotate(360deg);
    }
}

.feed-widget {
    background: #fff;
    border: 1px solid rgba(22, 26, 39, 0.1);
    border-radius: 16px;
    padding: 1rem;
}

.feed-widget-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
}

.feed-widget-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.feed-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
}

.feed-widget-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.65rem;
    align-items: center;
    border: 1px solid rgba(22, 26, 39, 0.1);
    border-radius: 12px;
    padding: 0.6rem;
    background: #fff;
    height: 100%;
}

.feed-widget-thumb {
    width: 72px;
    height: 54px;
    border-radius: 10px;
    object-fit: contain;
    background: #0b0b0d;
}

.feed-widget-copy {
    min-width: 0;
}

.feed-widget-time {
    font-size: 0.74rem;
    color: #6b7280;
}

.feed-widget-link {
    color: #111827;
    font-size: 0.88rem;
    text-decoration: none;
    font-weight: 600;
    display: block;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-widget-link:hover {
    color: var(--cc-forest-dark);
}

.feed-widget-empty {
    font-size: 0.88rem;
    color: #6b7280;
    margin: 0;
}

.feed-flash {
    margin-bottom: 1rem;
}

.feed-linked-teaser {
    margin-top: 1rem;
    border-radius: 14px;
    border: 1px solid rgba(22, 26, 39, 0.13);
    background: #fff;
    padding: 0.9rem;
}

.feed-linked-teaser h3 {
    font-size: 0.95rem;
    margin: 0 0 0.55rem;
}

.feed-linked-teaser p {
    margin: 0;
    color: #374151;
    font-size: 0.88rem;
}

.feed-linked-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
}

.feed-desktop-modal-dialog {
    width: min(970px, calc(100vw - 2.5rem));
    max-width: min(970px, calc(100vw - 2.5rem));
    margin: 0 auto;
}

.feed-desktop-modal-content {
    background: transparent;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    min-height: 0;
    box-shadow: 0 20px 52px rgba(11, 14, 22, 0.24);
}

.feed-desktop-modal-content iframe {
    display: block;
    width: 100%;
    height: 520px;
    max-height: calc(100vh - 2.5rem);
    min-height: 0;
    border: 0;
    background: #fff;
}

.feed-desktop-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.feed-auth-modal-dialog {
    max-width: 430px;
}

.feed-auth-modal-content {
    border: 1px solid rgba(22, 26, 39, 0.1);
    border-radius: 22px;
    position: relative;
    overflow: hidden;
}

.feed-auth-modal-content::before,
.feed-auth-modal-content::after {
    content: '';
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    opacity: 0.2;
    pointer-events: none;
}

.feed-auth-modal-content::before {
    top: -18px;
    left: -14px;
    background: rgba(38, 152, 70, 0.45);
}

.feed-auth-modal-content::after {
    bottom: -20px;
    right: -12px;
    background: rgba(47, 155, 211, 0.45);
}

.feed-auth-modal-content .modal-body {
    padding: 1.35rem 1.2rem 1.2rem;
    text-align: center;
}

.feed-auth-modal-title {
    margin: 0 0 0.4rem;
    font-family: 'Gabarito', sans-serif;
    font-size: 1.28rem;
    font-weight: 800;
    color: #111827;
}

.feed-auth-modal-copy {
    margin: 0 0 1rem;
    color: #4b5563;
    font-size: 0.92rem;
}

.feed-auth-modal-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
}

.feed-auth-modal-actions .btn {
    min-height: 44px;
    justify-content: center;
    font-weight: 700;
}

.feed-auth-btn,
.feed-auth-btn-secondary,
.feed-auth-inline-btn,
.feed-auth-inline-btn-secondary {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feed-auth-btn,
.feed-auth-inline-btn {
    background: linear-gradient(135deg, var(--cc-forest) 0%, #1e7e34 100%);
    color: #fff;
    border: 1px solid transparent;
    box-shadow: var(--cc-green-shadow);
}

.feed-auth-btn:hover,
.feed-auth-inline-btn:hover,
.feed-auth-btn:focus-visible,
.feed-auth-inline-btn:focus-visible {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--cc-green-shadow-hover);
    filter: brightness(1.03);
}

.feed-auth-btn-secondary,
.feed-auth-inline-btn-secondary {
    background: #fff;
    color: var(--cc-slate);
    border: 2px solid rgba(22, 26, 39, 0.35);
    box-shadow: none;
}

.feed-auth-btn-secondary:hover,
.feed-auth-inline-btn-secondary:hover,
.feed-auth-btn-secondary:focus-visible,
.feed-auth-inline-btn-secondary:focus-visible {
    color: var(--cc-forest);
    border-color: var(--cc-forest);
    box-shadow: 0 10px 24px rgba(38, 152, 70, 0.15);
    transform: translateY(-1px);
}

.feed-auth-btn,
.feed-auth-btn-secondary {
    min-height: 44px;
    padding: 0.76rem 1rem;
    font-size: 1rem;
}

.feed-auth-inline-btn,
.feed-auth-inline-btn-secondary {
    min-height: 38px;
    padding: 0.45rem 0.88rem;
    font-size: 0.9rem;
}

.feed-guest-comment-actions .feed-auth-inline-btn,
.feed-guest-comment-actions .feed-auth-inline-btn-secondary {
    min-height: 38px;
    padding: 0.42rem 0.84rem;
    font-size: 0.88rem;
}

@media (min-width: 900px) {
    .feed-post-card {
        max-width: 970px;
        display: grid;
        grid-template-columns: minmax(0, 550px) minmax(0, 420px);
        align-items: stretch;
    }

    .feed-post-card .feed-post-media-col {
        display: flex;
        align-self: stretch;
        height: var(--feed-post-panel-height, auto);
    }

    .feed-post-card .feed-media-wrap {
        width: 100%;
        display: flex;
        height: 100%;
    }

    .feed-post-card .feed-media-frame {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: 100%;
        max-height: 550px;
    }

    .feed-post-card .feed-post-side-col {
        height: var(--feed-post-panel-height, auto);
        max-height: var(--feed-post-panel-height, 550px);
        border-left: 1px solid rgba(22, 26, 39, 0.12);
        overflow: hidden;
        box-sizing: border-box;
    }

    .feed-post-card .feed-card-head {
        padding: 1rem 1.15rem 0.8rem;
        border-bottom: 1px solid rgba(22, 26, 39, 0.1);
        flex: 0 0 auto;
    }

    .feed-post-card .feed-post-side-scroll {
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0.9rem 1.15rem 1rem;
    }

    .feed-post-card .feed-post-composer {
        flex: 0 0 auto;
        padding: 0.75rem 1.15rem 0.9rem;
    }

    .feed-post-card .feed-comments {
        margin-top: 0.85rem;
    }
}

@media (min-width: 992px) {
    body[data-feed-index-page="1"] .feed-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        align-items: start;
    }

    body[data-feed-index-page="1"] .feed-grid .feed-card {
        margin: 0 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    body[data-feed-index-page="1"] .feed-grid .feed-card-body {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
    }

    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-caption-body {
        --feed-preview-line-height: 1.45;
        --feed-preview-line-count: 8;
        position: relative;
        line-height: var(--feed-preview-line-height);
        max-height: calc(1em * var(--feed-preview-line-height) * var(--feed-preview-line-count));
        overflow: hidden;
    }

    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-caption-body p,
    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-caption-body ul,
    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-caption-body ol,
    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-caption-body blockquote {
        margin-bottom: 0.55rem;
    }

    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-caption-body[data-feed-caption-clamped="1"]::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 2.4rem;
        pointer-events: none;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 85%);
    }

    body[data-feed-index-page="1"] .feed-grid .feed-meta {
        margin-top: auto;
    }

    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-tags {
        flex-wrap: wrap;
        overflow: visible;
    }

    body[data-feed-index-page="1"] .feed-grid .feed-card .feed-tag {
        max-width: 100%;
    }

    .feed-widget-list {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 0.85rem;
        grid-auto-rows: 1fr;
    }
}

@media (min-width: 1200px) {
    .feed-post-card .feed-media-frame {
        min-height: 550px;
    }

    .feed-post-card .feed-post-side-col {
        min-height: 550px;
    }
}

@media (max-width: 991.98px) {
    .feed-desktop-modal-dialog {
        max-width: 100%;
        width: 100%;
        margin: 0;
        height: 100vh;
    }

    .feed-desktop-modal-content {
        min-height: 100vh;
        border-radius: 0;
    }

    .feed-desktop-modal-content iframe {
        min-height: 100vh;
    }
}

@media (max-width: 899.98px) {
    .feed-card .feed-media-frame,
    .feed-post-card .feed-media-frame {
        aspect-ratio: var(--feed-media-ratio, 1 / 1);
        max-height: min(78vh, 680px);
    }

    .feed-card .feed-media-img,
    .feed-card .feed-media-video,
    .feed-post-card .feed-media-img,
    .feed-post-card .feed-media-video {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
}

@media (max-width: 767.98px) {
    .feed-shell {
        padding-top: 1.25rem;
    }

    .feed-head {
        border-radius: 16px;
        padding: 1rem;
    }

    .feed-card-head,
    .feed-card-body,
    .feed-post-side-scroll,
    .feed-post-composer {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    .feed-widget-item {
        grid-template-columns: 64px 1fr;
    }

    .feed-widget-thumb {
        width: 64px;
        height: 48px;
    }

    .feed-comment-form-row {
        align-items: stretch !important;
    }

    .feed-comment-form-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .feed-guest-comment-actions .btn,
    .feed-guest-comment-actions a.btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .feed-head {
        border-radius: 0;
    }
}

@media (min-width: 768px) {
    .feed-gallery-nav {
        display: inline-flex;
    }
}
