.gallery-month-header {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 12px 0;
    z-index: 10;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    margin-top: 24px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

@media (min-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1200px) {
    .gallery-grid { grid-template-columns: repeat(6, 1fr); }
}

.gallery-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f3f3f3;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-thumb .uploader-initials {
    position: absolute;
    left: 6px;
    bottom: 6px;
    background: rgba(33,37,80,0.8);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-lightbox.d-none { display: none; }

.gallery-lightbox-inner {
    display: flex;
    flex-direction: row;
    max-width: 95vw;
    max-height: 95vh;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.gallery-lightbox img {
    max-height: 85vh;
    max-width: 65vw;
    object-fit: contain;
    background: #000;
    display: block;
}
.gallery-lightbox-side {
    width: 320px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}
@media (max-width: 768px) {
    .gallery-lightbox-inner {
        flex-direction: column;
        width: 95vw;
        max-width: 95vw;
    }
    .gallery-lightbox img {
        width: 100%;
        max-width: 100%;
        max-height: 55vh;
    }
    .gallery-lightbox-side {
        width: 100%;
        max-height: 40vh;
    }
}
.gallery-lightbox-side header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}
.gallery-lightbox-close {
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 12px));
    right: max(12px, env(safe-area-inset-right, 12px));
    background: rgba(255,255,255,0.95);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2100;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    touch-action: manipulation;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.gallery-reactions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.gallery-reaction {
    border: 1px solid #ddd;
    background: #fff;
    padding: 4px 8px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 14px;
}
.gallery-reaction.active {
    background: #eaf3ff;
    border-color: #4c8bf5;
}
.gallery-comments {
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
}
.gallery-comment {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.gallery-comment .meta {
    font-size: 12px;
    color: #666;
}
