.community-index #view-gallery {
    --gallery-cyan: #46dff1;
    --gallery-violet: #9670ff;
    --gallery-pink: #f25aa9;
    --gallery-panel: #121625;
    --gallery-line: rgba(192, 201, 232, .14);
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

/* Intro compacto e centrado nas fotografias. */
.community-index #view-gallery .gallery-public-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 34%);
    align-items: center;
    min-height: 250px;
    margin-bottom: 14px;
    padding: clamp(30px, 4vw, 48px);
    overflow: hidden;
    border: 1px solid rgba(70, 223, 241, .18);
    border-radius: 28px;
    background:
        radial-gradient(circle at 86% 18%, rgba(242, 90, 169, .18), transparent 28%),
        linear-gradient(112deg, rgba(31, 18, 61, .97), rgba(16, 20, 37, .98) 58%, rgba(7, 43, 56, .94));
}
.community-index #view-gallery .gallery-public-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .26;
    background-image: radial-gradient(circle, rgba(255, 255, 255, .2) 1px, transparent 1.5px);
    background-size: 27px 27px;
    mask-image: linear-gradient(90deg, transparent 38%, #000);
}
.community-index #view-gallery .gallery-public-hero-copy { max-width: 750px; }
.community-index #view-gallery .gallery-public-hero h1 {
    max-width: 720px;
    margin: 9px 0 13px;
    font-size: clamp(2.45rem, 5vw, 4.8rem);
    line-height: .92;
    letter-spacing: -.06em;
}
.community-index #view-gallery .gallery-public-hero p {
    max-width: 620px;
    margin: 0;
    color: #aeb5ca;
    font-size: clamp(.94rem, 1.4vw, 1.07rem);
    line-height: 1.55;
}
.community-index #view-gallery .gallery-public-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 22px;
    color: #919ab2;
    font-size: .74rem;
    font-weight: 750;
}
.community-index #view-gallery .gallery-public-summary span { display: inline-flex; align-items: baseline; gap: 6px; }
.community-index #view-gallery .gallery-public-summary strong { color: #fff; font-size: 1.08rem; }
.community-index #view-gallery .gallery-public-hero-visual {
    position: relative;
    justify-self: end;
    width: min(310px, 100%);
    aspect-ratio: 1.18;
}
.community-index #view-gallery .gallery-public-hero-visual i {
    position: absolute;
    width: 62%;
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 15px;
    background: linear-gradient(150deg, rgba(255, 255, 255, .13), transparent 42%), linear-gradient(135deg, rgba(150, 112, 255, .72), rgba(70, 223, 241, .32));
    box-shadow: 0 22px 45px rgba(0, 0, 0, .3);
}
.community-index #view-gallery .gallery-public-hero-visual i:nth-child(1) { top: 7%; left: 1%; transform: rotate(-9deg); opacity: .58; }
.community-index #view-gallery .gallery-public-hero-visual i:nth-child(2) { top: 18%; right: 0; transform: rotate(8deg); opacity: .72; }
.community-index #view-gallery .gallery-public-hero-visual i:nth-child(3) { top: 29%; left: 19%; display: grid; place-items: center; transform: rotate(-1.5deg); background: radial-gradient(circle at 54% 42%, rgba(242, 90, 169, .7), transparent 25%), linear-gradient(135deg, #45318a, #116b7d); }
.community-index #view-gallery .gallery-public-hero-visual i:nth-child(3)::before { content: ""; width: 38%; aspect-ratio: 1; border: 3px solid rgba(255, 255, 255, .86); border-radius: 50%; box-shadow: 0 0 0 9px rgba(255, 255, 255, .1); }

/* Um único trilho para buscar, ordenar e atualizar. */
.community-index #view-gallery .gallery-public-tools {
    position: sticky;
    z-index: 7;
    top: 78px;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto auto;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    padding: 8px;
    border: 1px solid var(--gallery-line);
    border-radius: 16px;
    background: rgba(13, 16, 29, .9);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
    backdrop-filter: blur(18px);
}
.community-index #view-gallery .gallery-public-search { position: relative; display: flex; min-width: 0; align-items: center; }
.community-index #view-gallery .gallery-public-search svg { position: absolute; z-index: 2; left: 14px; width: 18px; height: 18px; fill: none; stroke: #9da8c0; stroke-width: 1.8; pointer-events: none; }
.community-index #view-gallery .gallery-public-search input,
.community-index #view-gallery .gallery-public-sort select { min-height: 46px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 11px; background: #090d19; color: #fff; outline: 0; }
.community-index #view-gallery .gallery-public-search input { width: 100%; padding: 0 46px 0 42px; }
.community-index #view-gallery .gallery-public-search input:focus,
.community-index #view-gallery .gallery-public-sort select:focus { border-color: rgba(70, 223, 241, .62); box-shadow: 0 0 0 3px rgba(70, 223, 241, .1); }
.community-index #view-gallery .gallery-public-search button { position: absolute; z-index: 3; right: 7px; display: grid; width: 33px; height: 33px; place-items: center; padding: 0; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .07); color: #cdd3e4; font-size: 1.1rem; cursor: pointer; }
.community-index #view-gallery .gallery-public-search button[hidden] { display: none; }
.community-index #view-gallery .gallery-public-sort { display: flex; align-items: center; gap: 8px; color: #8e98b1; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.community-index #view-gallery .gallery-public-sort select { min-width: 154px; padding: 0 34px 0 11px; }
.community-index #view-gallery .gallery-public-count { min-width: 105px; color: #9cecf6; font-size: .7rem; font-weight: 850; text-align: right; white-space: nowrap; }
.community-index #view-gallery .gallery-public-refresh { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; gap: 7px; padding: 0 13px; border: 1px solid rgba(255, 255, 255, .11); border-radius: 11px; background: rgba(255, 255, 255, .045); color: #dce1ef; font: inherit; font-size: .72rem; font-weight: 850; cursor: pointer; }
.community-index #view-gallery .gallery-public-refresh svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.community-index #view-gallery .gallery-public-refresh:hover { border-color: rgba(70, 223, 241, .38); background: rgba(70, 223, 241, .08); }
.community-index #view-gallery .gallery-public-refresh.is-loading svg { animation: spin .8s linear infinite; }

/* Mosaico fotográfico no desktop; cartões legíveis no celular. */
.community-index #view-gallery .gallery-album-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 242px; grid-auto-flow: dense; gap: 10px; }
.community-index #view-gallery .gallery-album-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--gallery-line); border-radius: 18px; background: var(--gallery-panel); cursor: pointer; transition: border-color .22s ease, transform .22s ease, box-shadow .22s ease; }
.community-index #view-gallery .gallery-album-card.is-featured { grid-column: span 2; grid-row: span 2; }
.community-index #view-gallery .gallery-album-card:hover,
.community-index #view-gallery .gallery-album-card:focus-visible { z-index: 2; border-color: rgba(70, 223, 241, .46); outline: 0; transform: translateY(-3px); box-shadow: 0 22px 48px rgba(0, 0, 0, .3); }
.community-index #view-gallery .gallery-album-media { position: relative; isolation: isolate; width: 100%; height: 100%; overflow: hidden; background: #101526; }
.community-index #view-gallery .gallery-album-media::after { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg, rgba(4, 6, 14, .14) 22%, rgba(4, 6, 14, .92) 100%); pointer-events: none; }
.community-index #view-gallery .gallery-album-media > img { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16, 1, .3, 1), filter .25s ease; }
.community-index #view-gallery .gallery-album-card:hover .gallery-album-media > img { transform: scale(1.045); }
.community-index #view-gallery .gallery-album-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, rgba(150, 112, 255, .24), transparent 34%), linear-gradient(145deg, #171a30, #0b1722); }
.community-index #view-gallery .gallery-album-placeholder svg { width: 54px; fill: none; stroke: rgba(255, 255, 255, .48); stroke-width: 1.4; }
.community-index #view-gallery .gallery-album-topline { position: absolute; z-index: 3; top: 12px; right: 12px; left: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.community-index #view-gallery .gallery-album-topline span { padding: 5px 8px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 999px; background: rgba(6, 8, 17, .68); color: rgba(255, 255, 255, .88); font-size: .6rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; backdrop-filter: blur(10px); }
.community-index #view-gallery .gallery-album-card.is-featured .gallery-album-topline span:first-child { border-color: rgba(242, 90, 169, .38); background: rgba(242, 90, 169, .16); color: #ffc1e3; }
.community-index #view-gallery .gallery-album-caption { position: absolute; z-index: 3; right: 0; bottom: 0; left: 0; padding: 18px; }
.community-index #view-gallery .gallery-album-date { color: #a9f2fa; font-size: .63rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.community-index #view-gallery .gallery-album-caption h2 { margin: 7px 0 5px; color: #fff; font-size: clamp(1.15rem, 1.8vw, 1.48rem); line-height: 1.06; letter-spacing: -.035em; overflow-wrap: anywhere; }
.community-index #view-gallery .gallery-album-card.is-featured .gallery-album-caption { padding: clamp(22px, 3vw, 34px); }
.community-index #view-gallery .gallery-album-card.is-featured .gallery-album-caption h2 { max-width: 680px; font-size: clamp(2rem, 4vw, 3.7rem); line-height: .94; }
.community-index #view-gallery .gallery-album-caption p { display: none; margin: 0 0 16px; color: rgba(231, 234, 245, .78); font-size: .82rem; line-height: 1.5; }
.community-index #view-gallery .gallery-album-card.is-featured .gallery-album-caption p { display: -webkit-box; max-width: 620px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.community-index #view-gallery .gallery-album-caption footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: #abb2c6; font-size: .68rem; font-weight: 750; }
.community-index #view-gallery .gallery-album-caption footer > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.community-index #view-gallery .gallery-album-caption footer strong { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: #fff; }
.community-index #view-gallery .gallery-album-caption footer i { color: var(--gallery-cyan); font-size: 1rem; font-style: normal; transition: transform .2s ease; }
.community-index #view-gallery .gallery-album-card:hover footer i { transform: translateX(3px); }
.community-index #view-gallery .gallery-album-skeleton { min-height: 242px; border-radius: 18px; }
.community-index #view-gallery .gallery-album-skeleton.is-featured { grid-column: span 2; grid-row: span 2; }
.community-index #view-gallery .gallery-empty-state { grid-column: 1 / -1; display: grid; min-height: 260px; place-items: center; align-content: center; gap: 8px; padding: 34px; border: 1px dashed rgba(150, 112, 255, .26); border-radius: 18px; background: linear-gradient(145deg, rgba(150, 112, 255, .06), rgba(70, 223, 241, .025)); text-align: center; }
.community-index #view-gallery .gallery-empty-state > span { color: var(--gallery-violet); font-size: 2rem; }
.community-index #view-gallery .gallery-empty-state strong { color: #fff; font-size: 1.1rem; }
.community-index #view-gallery .gallery-empty-state p { max-width: 430px; margin: 0 0 8px; color: #929bb3; line-height: 1.5; }

/* Álbum aberto: mais espaço para as imagens no PC. */
.community-index #albumModal .event-modal-card { width: min(1320px, calc(100vw - 36px)); max-height: min(920px, calc(100dvh - 28px)); border-radius: 24px; background: #0b0e19; }
.community-index #albumModalContent { scrollbar-gutter: stable; }
.community-index #albumModal .gallery-album-detail { min-height: 100%; padding-bottom: 22px; }
.community-index #albumModal .gallery-album-detail-loading { display: grid; gap: 14px; padding: 24px; }
.community-index #albumModal .gallery-album-detail-loading .skeleton:first-child { height: min(46vw, 430px); border-radius: 18px; }
.community-index #albumModal .gallery-album-detail-loading .skeleton:nth-child(2) { width: 48%; height: 44px; }
.community-index #albumModal .gallery-album-detail-loading .skeleton:nth-child(3) { height: 260px; }
.community-index #albumModal .gallery-album-detail-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); min-height: 390px; border-bottom: 1px solid var(--gallery-line); background: linear-gradient(135deg, rgba(150, 112, 255, .1), rgba(70, 223, 241, .025)); }
.community-index #albumModal .gallery-album-detail-hero:not(.has-cover) { grid-template-columns: 1fr; min-height: 280px; }
.community-index #albumModal .gallery-album-detail-cover { position: relative; min-width: 0; min-height: 390px; overflow: hidden; padding: 0; border: 0; background: #070a12; cursor: zoom-in; }
.community-index #albumModal .gallery-album-detail-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, rgba(9, 12, 22, .34)); pointer-events: none; }
.community-index #albumModal .gallery-album-detail-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.community-index #albumModal .gallery-album-detail-cover:hover img { transform: scale(1.025); }
.community-index #albumModal .gallery-album-detail-cover > span { position: absolute; z-index: 2; bottom: 16px; left: 16px; padding: 7px 10px; border: 1px solid rgba(255, 255, 255, .17); border-radius: 10px; background: rgba(5, 7, 15, .68); color: #fff; font-size: .65rem; font-weight: 850; backdrop-filter: blur(9px); }
.community-index #albumModal .gallery-album-detail-copy { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: clamp(32px, 4vw, 52px); }
.community-index #albumModal .gallery-album-detail-copy h2 { margin: 12px 0 15px; color: #fff; font-size: clamp(2.2rem, 4.6vw, 4.6rem); line-height: .9; letter-spacing: -.06em; overflow-wrap: anywhere; }
.community-index #albumModal .gallery-album-detail-copy p { display: -webkit-box; margin: 22px 0 0; overflow: hidden; color: #adb5ca; font-size: .88rem; line-height: 1.62; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.community-index #albumModal .gallery-album-photos { margin: 0; padding: 26px clamp(18px, 3vw, 34px) 8px; }
.community-index #albumModal .gallery-album-toolbar { position: sticky; z-index: 4; top: 0; align-items: center; margin: -6px 0 12px; padding: 10px 0; background: rgba(11, 14, 25, .94); backdrop-filter: blur(14px); }
.community-index #albumModal .gallery-album-toolbar .face-search-trigger { min-height: 42px; gap: 7px; border-color: rgba(150, 112, 255, .38); background: rgba(150, 112, 255, .1); color: #e3dcff; }
.community-index #albumModal .event-gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-flow: dense; gap: 7px; }
.community-index #albumModal .gallery-photo-tile { position: relative; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; background: #101321; cursor: zoom-in; }
.community-index #albumModal .gallery-photo-tile:first-child { grid-column: span 2; grid-row: span 2; }
.community-index #albumModal .gallery-photo-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s cubic-bezier(.16, 1, .3, 1), filter .2s ease; }
.community-index #albumModal .gallery-photo-tile > span { position: absolute; z-index: 2; right: 7px; bottom: 7px; min-width: 25px; padding: 4px 6px; border-radius: 7px; background: rgba(4, 6, 14, .72); color: rgba(255, 255, 255, .78); font-size: .58rem; font-weight: 900; opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; backdrop-filter: blur(8px); }
.community-index #albumModal .gallery-photo-tile:hover img { transform: scale(1.045); filter: saturate(1.06); }
.community-index #albumModal .gallery-photo-tile:hover > span,
.community-index #albumModal .gallery-photo-tile:focus-visible > span { opacity: 1; transform: none; }
.community-index #albumModal .gallery-photo-tile:focus-visible { border-color: var(--gallery-cyan); outline: 3px solid rgba(70, 223, 241, .14); outline-offset: 1px; }
.community-index #albumModal .gallery-load-more { min-width: min(320px, 100%); }
.community-index #albumModal .gallery-empty-state {
    grid-column: 1 / -1;
    display: grid;
    min-height: 220px;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 28px;
    border: 1px dashed rgba(150, 112, 255, .25);
    border-radius: 14px;
    background: rgba(150, 112, 255, .045);
    color: #959eb5;
    text-align: center;
}
.community-index #albumModal .gallery-empty-state > span { color: #9670ff; font-size: 2rem; }
.community-index #albumModal .gallery-empty-state strong { color: #fff; font-size: 1.05rem; }
.community-index #albumModal .gallery-empty-state p { max-width: 420px; margin: 0; line-height: 1.55; }

/* Visualizador com comandos previsíveis e próximos às bordas. */
.community-index .photo-modal-card { border-radius: 18px; background: #03050a; }
.community-index .photo-viewer-header,
.community-index .photo-viewer-toolbar,
.community-index .photo-viewer-thumbs { background: rgba(8, 10, 18, .97); }
.community-index .photo-viewer-stage { background: radial-gradient(circle at 50% 44%, rgba(150, 112, 255, .09), transparent 46%), #010205; }
.community-index .photo-viewer-close { min-width: 42px; min-height: 42px; border-radius: 11px; }
.community-index .photo-viewer-nav { width: 50px; height: 50px; border-radius: 14px; background: rgba(8, 10, 18, .78); }
.community-index .photo-viewer-thumb { flex-basis: 76px; width: 76px; height: 54px; border-radius: 8px; }

@media (max-width: 1180px) {
    .community-index #view-gallery .gallery-album-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .community-index #albumModal .event-gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .community-index #view-gallery .gallery-public-hero { grid-template-columns: minmax(0, 1fr) minmax(190px, 30%); min-height: 220px; }
    .community-index #view-gallery .gallery-album-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 230px; }
    .community-index #view-gallery .gallery-album-skeleton { min-height: 230px; }
    .community-index #albumModal .gallery-album-detail-hero { grid-template-columns: 1fr 1fr; min-height: 340px; }
    .community-index #albumModal .gallery-album-detail-cover { min-height: 340px; }
    .community-index #albumModal .event-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .community-index #view-gallery .gallery-public-hero { display: block; min-height: 0; padding: 24px 20px; border-radius: 21px; }
    .community-index #view-gallery .gallery-public-hero::after,
    .community-index #view-gallery .gallery-public-hero-visual { display: none; }
    .community-index #view-gallery .gallery-public-hero h1 { max-width: 100%; font-size: clamp(2.1rem, 10vw, 2.85rem); overflow-wrap: anywhere; }
    .community-index #view-gallery .gallery-public-hero p { max-width: 100%; overflow-wrap: anywhere; }
    .community-index #view-gallery .gallery-public-summary { margin-top: 18px; }
    .community-index #view-gallery .gallery-public-tools { position: static; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) 46px; gap: 7px; padding: 7px; border-radius: 14px; }
    .community-index #view-gallery .gallery-public-search { grid-column: 1 / -1; }
    .community-index #view-gallery .gallery-public-search,
    .community-index #view-gallery .gallery-public-sort,
    .community-index #view-gallery .gallery-public-sort select { max-width: 100%; min-width: 0; }
    .community-index #view-gallery .gallery-public-sort > span { display: none; }
    .community-index #view-gallery .gallery-public-sort select { width: 100%; min-width: 0; }
    .community-index #view-gallery .gallery-public-count { grid-column: 1 / -1; grid-row: 3; min-width: 0; padding: 2px 4px 0; text-align: left; }
    .community-index #view-gallery .gallery-public-refresh { width: 46px; padding: 0; }
    .community-index #view-gallery .gallery-public-refresh span { display: none; }
    .community-index #view-gallery .gallery-album-grid { grid-template-columns: 1fr; grid-auto-rows: 290px; gap: 10px; }
    .community-index #view-gallery .gallery-album-card.is-featured,
    .community-index #view-gallery .gallery-album-skeleton.is-featured { grid-column: auto; grid-row: auto; }
    .community-index #view-gallery .gallery-album-skeleton { min-height: 290px; }
    .community-index #view-gallery .gallery-album-card.is-featured .gallery-album-caption { padding: 20px; }
    .community-index #view-gallery .gallery-album-card.is-featured .gallery-album-caption h2,
    .community-index #view-gallery .gallery-album-caption h2 { font-size: clamp(1.55rem, 7vw, 2rem); }
    .community-index #view-gallery .gallery-album-card.is-featured .gallery-album-caption p { display: none; }

    .community-index #albumModal { align-items: stretch; padding: 0; }
    .community-index #albumModal .event-modal-card { width: 100%; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; }
    .community-index #albumModal .event-modal-close { top: max(10px, env(safe-area-inset-top)); right: 10px; width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 12px; }
    .community-index #albumModal .event-modal-close strong { display: none; }
    .community-index #albumModalContent { scrollbar-gutter: auto; }
    .community-index #albumModal .gallery-album-detail-hero { display: flex; min-height: 0; flex-direction: column; }
    .community-index #albumModal .gallery-album-detail-cover { min-height: 0; aspect-ratio: 4 / 3; }
    .community-index #albumModal .gallery-album-detail-cover::after { background: linear-gradient(180deg, transparent 65%, rgba(9, 12, 22, .38)); }
    .community-index #albumModal .gallery-album-detail-copy { padding: 23px 18px 20px; }
    .community-index #albumModal .gallery-album-detail-copy h2 { max-width: calc(100% - 36px); margin-block: 9px 12px; font-size: clamp(2rem, 10vw, 3rem); }
    .community-index #albumModal .gallery-album-detail-copy p { margin-top: 17px; -webkit-line-clamp: 4; }
    .community-index #albumModal .gallery-album-photos { padding: 18px 8px max(18px, env(safe-area-inset-bottom)); }
    .community-index #albumModal .gallery-album-toolbar { align-items: stretch; flex-direction: column; margin-inline: -8px; padding: 10px 8px; }
    .community-index #albumModal .gallery-album-toolbar .face-search-trigger { width: 100%; }
    .community-index #albumModal .event-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
    .community-index #albumModal .gallery-photo-tile,
    .community-index #albumModal .gallery-photo-tile:first-child { grid-column: auto; grid-row: auto; aspect-ratio: 1; border-radius: 8px; }
    .community-index #albumModal .gallery-photo-tile > span { display: none; }

    .community-index .photo-modal { padding: 0; }
    .community-index .photo-modal-card { border-radius: 0; }
    .community-index .photo-viewer-close { width: 42px; padding: 0; border-radius: 11px; }
    .community-index .photo-viewer-close strong { display: none; }
    .community-index .photo-viewer-stage { padding: 0; }
    .community-index .photo-viewer-nav { top: auto; bottom: 12px; width: 44px; height: 44px; border-radius: 12px; transform: none; }
    .community-index .photo-viewer-prev { left: 10px; }
    .community-index .photo-viewer-next { right: 10px; }
    .community-index .photo-viewer-toolbar { min-height: calc(62px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
    .community-index #view-gallery .gallery-album-grid { grid-auto-rows: 260px; }
    .community-index #view-gallery .gallery-album-skeleton { min-height: 260px; }
    .community-index #view-gallery .gallery-album-caption { padding: 16px; }
}

@media (pointer: coarse) {
    .community-index #view-gallery .gallery-album-card:hover { transform: none; box-shadow: none; }
    .community-index #albumModal .gallery-photo-tile > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .community-index #view-gallery .gallery-album-card,
    .community-index #view-gallery .gallery-album-media > img,
    .community-index #albumModal .gallery-photo-tile img { transition: none; }
}
