:root {
    --eg-bg: #f2efe8;
    --eg-surface: #fffaf2;
    --eg-accent: #ba6b34;
    --eg-text: #1f1a17;
    --eg-muted: #6d6259;
    --eg-button-text: #fffaf2;
}

* { box-sizing: border-box; }

body.event-gallery-body {
    margin: 0;
    font-family: var(--eg-font-family, Georgia, 'Times New Roman', serif);
    background: var(--eg-bg);
    color: var(--eg-text);
}

.event-gallery-header h1,
.event-gallery-hero-heading h1,
.event-gallery-hero-overlay h1,
.eg-selection-heading h1,
.event-gallery-shell > h1 {
    font-family: var(--eg-font-family, Georgia, 'Times New Roman', serif);
}

.event-gallery-body--custom-font .event-gallery-header h1,
.event-gallery-body--custom-font .event-gallery-hero-heading h1,
.event-gallery-body--custom-font .event-gallery-hero-overlay h1,
.event-gallery-body--custom-font .eg-selection-heading h1,
.event-gallery-body--custom-font .event-gallery-shell > h1 {
    font-weight: 400;
}

.event-gallery-shell {
    width: min(1400px, 94vw);
    margin: 0 auto;
    padding: 28px 0 80px;
}

.event-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(16px, 3vw, 32px);
    margin-bottom: 24px;
}

.event-gallery-header--has-event-logo {
    align-items: center;
}

.event-gallery-header-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.event-gallery-company-logo {
    max-height: 48px;
    max-width: min(180px, 36vw);
    object-fit: contain;
    margin-bottom: 12px;
    display: block;
}

.event-gallery-event-logo {
    flex: 0 0 auto;
    max-width: min(220px, 38vw);
    max-height: 90px;
    object-fit: contain;
    align-self: center;
}

.event-gallery-header h1 {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.05;
}

.event-gallery-subtitle {
    margin: 0;
    color: var(--eg-muted);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 760px;
}

.event-gallery-hero {
    margin-bottom: 28px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    position: relative;
    background: var(--eg-surface);
}

.event-gallery-hero--full {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 32px;
    border-radius: 0;
    box-shadow: none;
}

.event-gallery-hero-media {
    position: relative;
}

.event-gallery-hero-media img,
.event-gallery-hero-media video {
    display: block;
    width: 100%;
    max-height: min(52vh, 520px);
    object-fit: cover;
}

.event-gallery-hero--full .event-gallery-hero-media img,
.event-gallery-hero--full .event-gallery-hero-media video {
    max-height: min(58vh, 640px);
}

.event-gallery-hero-fade {
    position: absolute;
    inset: 0;
    background: var(--eg-surface);
    opacity: calc(1 - var(--eg-hero-opacity, 0.88));
    pointer-events: none;
}

.event-gallery-hero--has-overlay {
    display: grid;
}

.event-gallery-hero--has-overlay .event-gallery-hero-media,
.event-gallery-hero--has-overlay .event-gallery-hero-overlay {
    grid-area: 1 / 1;
}

.event-gallery-hero--has-overlay .event-gallery-hero-media img,
.event-gallery-hero--has-overlay .event-gallery-hero-media video {
    min-height: min(42vh, 420px);
}

.event-gallery-hero--has-overlay .event-gallery-hero-media {
    z-index: 0;
}

.event-gallery-hero-overlay {
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: clamp(18px, 4vw, 40px);
    pointer-events: none;
}

.event-gallery-hero-overlay--valign-top {
    align-items: flex-start;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.28) 52%, rgba(15, 23, 42, 0.05) 100%);
}

.event-gallery-hero-overlay--valign-center {
    align-items: center;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.2) 45%, rgba(15, 23, 42, 0.2) 55%, rgba(15, 23, 42, 0.55) 100%);
}

.event-gallery-hero-overlay--valign-bottom {
    align-items: flex-end;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.28) 52%, rgba(15, 23, 42, 0.05) 100%);
}

.event-gallery-hero-overlay-inner {
    width: 100%;
    max-width: min(1400px, 94vw);
    margin: 0 auto;
    color: #fff;
    pointer-events: auto;
}

.event-gallery-hero-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: clamp(16px, 3vw, 32px);
}

.event-gallery-hero-heading-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.event-gallery-hero-title-on-image h1,
.event-gallery-hero-overlay h1 {
    margin: 0 0 8px;
    line-height: 1.05;
    color: var(--eg-hero-title-color, #fff);
    opacity: 1;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.event-gallery-hero-title-on-image .event-gallery-subtitle,
.event-gallery-hero-overlay .event-gallery-subtitle {
    margin: 0;
    color: var(--eg-hero-title-color, #fff);
    opacity: 1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.event-gallery-hero-title-size-small h1,
.event-gallery-hero-title-size-small .eg-selection-heading h1 {
    font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.event-gallery-hero-title-size-medium h1,
.event-gallery-hero-title-size-medium .eg-selection-heading h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.event-gallery-hero-title-size-large h1,
.event-gallery-hero-title-size-large .eg-selection-heading h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
}

.event-gallery-hero-title-align-left.event-gallery-hero-heading,
.event-gallery-hero-title-align-left.event-gallery-header,
.event-gallery-hero-title-align-left.eg-selection-header {
    justify-content: flex-start;
    text-align: left;
}

.event-gallery-hero-title-align-center.event-gallery-hero-heading,
.event-gallery-hero-title-align-center.event-gallery-header,
.event-gallery-hero-title-align-center.eg-selection-header {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    align-items: center;
}

.event-gallery-hero-title-align-center .event-gallery-header-copy,
.event-gallery-hero-title-align-center .event-gallery-hero-heading-copy,
.event-gallery-hero-title-align-center .eg-selection-heading {
    text-align: center;
}

.event-gallery-hero-title-align-right.event-gallery-hero-heading,
.event-gallery-hero-title-align-right.event-gallery-header,
.event-gallery-hero-title-align-right.eg-selection-header {
    justify-content: flex-end;
    text-align: right;
}

.event-gallery-hero-title-align-right .event-gallery-header-copy,
.event-gallery-hero-title-align-right .event-gallery-hero-heading-copy,
.event-gallery-hero-title-align-right .eg-selection-heading {
    text-align: right;
}

.event-gallery-hero-title-below-image h1,
.event-gallery-header--below-hero h1,
.eg-selection-header--below-hero h1 {
    color: var(--eg-hero-title-color, var(--eg-text));
}

.event-gallery-hero-title-below-image .event-gallery-subtitle,
.event-gallery-header--below-hero .event-gallery-subtitle,
.eg-selection-header--below-hero .event-gallery-subtitle {
    color: var(--eg-muted);
}

.event-gallery-header--below-hero,
.eg-selection-header--below-hero {
    margin-top: 4px;
    margin-bottom: 24px;
}

.event-gallery-header--logos-only {
    margin-top: -12px;
    margin-bottom: 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(16px, 3vw, 32px);
}

.event-gallery-header--logos-only .event-gallery-header-copy--company-logo {
    flex: 0 1 auto;
    min-width: 0;
    text-align: left;
}

.event-gallery-header--logos-only .event-gallery-company-logo {
    margin-bottom: 0;
}

.event-gallery-header--logos-only .event-gallery-event-logo--below-hero {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: center;
}

.event-gallery-header--toolbar-beside-logo {
    margin-top: 0;
    margin-bottom: 20px;
}

.event-gallery-header--toolbar-beside-logo.event-gallery-header--logos-only {
    margin-top: -12px;
}

.event-gallery-header-toolbar {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.event-gallery-header-toolbar .event-gallery-tabs {
    margin: 0;
}

.event-gallery-header-toolbar .event-gallery-face-actions {
    margin: 0;
}

.event-gallery-header-toolbar .eg-photo-face-actions-top {
    margin-bottom: 0;
}

.event-gallery-hero-overlay--align-left {
    justify-content: flex-start;
}

.event-gallery-hero-overlay--align-center {
    justify-content: center;
}

.event-gallery-hero-overlay--align-right {
    justify-content: flex-end;
}

.eg-selection-page .event-gallery-shell {
    padding-top: 28px;
}

.eg-selection-back-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Keep the fixed filter control / saved bar from covering the open lightbox
   (e.g. the lightbox close button sat behind the top-right filter button). */
body.eg-lightbox-open .eg-filter-fab,
body.eg-lightbox-open .eg-filter-backdrop,
body.eg-lightbox-open .eg-filter-panel,
body.eg-lightbox-open .eg-saved-bar {
    display: none !important;
}

/* Fixed filter control — top-right while scrolling */
.eg-filter-fab {
    position: fixed;
    top: max(14px, env(safe-area-inset-top, 0px));
    right: max(14px, env(safe-area-inset-right, 0px));
    z-index: 1200;
}

.eg-filter-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: var(--eg-accent);
    color: var(--eg-button-text, #fffaf2);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.eg-filter-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
}

.eg-filter-toggle:focus-visible {
    outline: 2px solid var(--eg-text);
    outline-offset: 2px;
}

.eg-filter-toggle-icon--menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 20px;
}

.eg-filter-toggle-icon--menu span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.eg-filter-toggle-icon--close {
    display: none;
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 300;
}

.eg-filter-toggle[aria-expanded="true"] .eg-filter-toggle-icon--menu {
    display: none;
}

.eg-filter-toggle[aria-expanded="true"] .eg-filter-toggle-icon--close {
    display: block;
}

.eg-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #1f1a17;
    color: #fffaf2;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.eg-filter-badge[hidden] {
    display: none !important;
}

.eg-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1180;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    transition: opacity 0.22s ease;
    pointer-events: none;
}

.eg-filter-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.eg-filter-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1190;
    width: min(360px, 92vw);
    height: 100%;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--eg-surface, #fffaf2);
    color: var(--eg-text);
    border-left: 1px solid color-mix(in srgb, var(--eg-accent) 22%, transparent);
    box-shadow: -16px 0 40px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.eg-filter-panel.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.eg-filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--eg-accent) 18%, transparent);
    background: color-mix(in srgb, var(--eg-accent) 6%, var(--eg-surface, #fffaf2));
}

.eg-filter-panel-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.eg-filter-panel-close {
    border: none;
    background: transparent;
    color: var(--eg-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
}

.eg-filter-panel-close:hover {
    color: var(--eg-text);
    background: color-mix(in srgb, var(--eg-accent) 10%, transparent);
}

.eg-filter-panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 18px 24px;
    -webkit-overflow-scrolling: touch;
}

.eg-filter-panel-body .event-gallery-filters-row {
    grid-template-columns: 1fr;
}

.eg-filter-panel-body .event-gallery-filter-reset {
    width: 100%;
}

body.eg-filter-panel-open {
    overflow: hidden;
}

.event-gallery-filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    align-items: end;
}

.eg-filter-panel label,
.eg-filter-field,
.event-gallery-filters-row label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--eg-muted, #6d6259);
}

.eg-filter-field-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--eg-muted, #6d6259);
}

.eg-filter-field-hint {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.4;
    color: color-mix(in srgb, var(--eg-muted, #6d6259) 88%, transparent);
}

.eg-filter-category-select {
    width: 100%;
    min-height: 42px;
}

.eg-filter-panel .select2-container {
    width: 100% !important;
}

.eg-filter-panel .select2-container--default .select2-selection--multiple {
    min-height: 42px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
}

.eg-filter-panel .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--eg-accent);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--eg-accent) 18%, transparent);
}

.eg-filter-panel .select2-container--default .select2-selection--multiple .select2-selection__choice {
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--eg-accent) 14%, #fff);
    color: var(--eg-text);
    font-size: 0.8rem;
    padding: 4px 10px 4px 6px;
    margin: 3px 6px 3px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.eg-filter-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    position: static;
    border-right: none !important;
    color: var(--eg-muted);
    margin: 0;
    padding: 0 2px;
    font-size: 1rem;
    line-height: 1;
    order: -1;
}

.eg-filter-panel .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--eg-text);
    background: transparent;
}

.eg-filter-panel .select2-container--default .select2-search--inline .select2-search__field {
    font-family: inherit;
    font-size: 0.86rem;
    margin-top: 2px;
}

.eg-filter-panel .select2-dropdown {
    border-color: rgba(15, 23, 42, 0.15);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1300;
}

.eg-filter-panel .select2-results__option {
    font-size: 0.86rem;
    padding: 8px 12px;
}

.eg-filter-panel .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background: color-mix(in srgb, var(--eg-accent) 88%, #000);
}

.eg-filter-panel select,
.eg-filter-panel input[type="time"],
.event-gallery-filters-row select,
.event-gallery-filters-row input[type="time"] {
    font: inherit;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    color: var(--eg-text);
}

.event-gallery-filter-reset {
    font: inherit;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    cursor: pointer;
    color: var(--eg-text);
}

.event-gallery-filter-reset:hover {
    border-color: var(--eg-accent);
}

.event-gallery-filter-summary {
    margin: 14px 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--eg-muted, #6d6259);
}

.eg-filter-panel-body .eg-filter-face-actions,
.eg-filter-panel-body .eg-filter-engagement,
.eg-filter-panel-body .eg-filter-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    margin-top: 8px;
    flex-wrap: nowrap;
}

.eg-filter-panel-body .eg-filter-face-actions .event-gallery-face-btn,
.eg-filter-panel-body .eg-filter-engagement .event-gallery-face-btn,
.eg-filter-panel-body .eg-filter-panel-actions .event-gallery-face-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.eg-filter-panel-body label + label,
.eg-filter-panel-body .eg-filter-field + label {
    margin-top: 14px;
}

.event-gallery-grid {
    --eg-row-unit: clamp(108px, 12.5vw, 152px);
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: var(--eg-row-unit);
    grid-auto-flow: row dense;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.event-gallery-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 6px 16px rgba(15, 23, 42, 0.07),
        0 16px 36px rgba(15, 23, 42, 0.08);
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    z-index: 1;
    transition:
        box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.event-gallery-card:hover {
    z-index: 8;
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.05),
        0 14px 28px rgba(15, 23, 42, 0.12),
        0 32px 64px rgba(15, 23, 42, 0.16);
    transform: translateY(-8px);
}

.event-gallery-card:active {
    transform: translateY(-4px);
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.08),
        0 10px 22px rgba(15, 23, 42, 0.1),
        0 22px 44px rgba(15, 23, 42, 0.12);
}

.event-gallery-card-open {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.event-gallery-card-media {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.event-gallery-card-media > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.04);
}

.event-gallery-grid--uniform {
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    grid-auto-rows: auto;
    grid-auto-flow: row;
}

.event-gallery-grid--uniform .event-gallery-card {
    aspect-ratio: 1 / 1;
    grid-column: span 1 !important;
    grid-row: span 1 !important;
}

.event-gallery-grid--uniform .event-gallery-card--col-2,
.event-gallery-grid--uniform .event-gallery-card--col-3,
.event-gallery-grid--uniform .event-gallery-card--row-2,
.event-gallery-grid--uniform .event-gallery-card--row-3 {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
}

.event-gallery-tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
}

.event-gallery-tabs[hidden] {
    display: none !important;
}

.event-gallery-tab {
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--eg-text) 14%, transparent);
    background: var(--eg-surface);
    color: var(--eg-text);
    border-radius: 999px;
    padding: 10px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.event-gallery-tab:hover {
    border-color: color-mix(in srgb, var(--eg-accent) 40%, transparent);
}

.event-gallery-tab.is-active {
    background: var(--eg-accent);
    border-color: var(--eg-accent);
    color: var(--eg-button-text);
}

.event-gallery-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    width: 100%;
}

.event-gallery-video-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    background: var(--eg-surface);
}

.event-gallery-video-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.event-gallery-video-card-actions[hidden] {
    display: none !important;
}

.event-gallery-video-card-open {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.event-gallery-video-card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--eg-surface, rgba(0, 0, 0, 0.08));
    overflow: hidden;
}

.event-gallery-video-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-gallery-video-card-preview {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.event-gallery-video-card-preview.is-ready {
    opacity: 1;
}

.event-gallery-video-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    color: color-mix(in srgb, var(--eg-text) 45%, transparent);
}

.event-gallery-video-card-placeholder--branded {
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--eg-surface) 92%, var(--eg-bg)) 0%,
        color-mix(in srgb, var(--eg-surface) 78%, var(--eg-accent) 8%) 100%
    );
}

.event-gallery-video-card-placeholder-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(58%, 220px);
    max-height: 42%;
    object-fit: contain;
    opacity: 0.42;
    filter: saturate(0.85);
}

.event-gallery-video-card-play {
    position: absolute;
    inset: auto auto 12px 12px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 0.95rem;
    pointer-events: none;
}

.event-gallery-video-card-title {
    padding: 12px 14px 4px;
    font-weight: 600;
    line-height: 1.35;
}

.event-gallery-video-card-meta {
    padding: 0 14px 12px;
    color: var(--eg-muted);
    font-size: 0.88rem;
}

.eg-video-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 15, 30, 0.82);
}

.eg-video-modal[hidden] {
    display: none !important;
}

.eg-video-modal-panel {
    position: relative;
    width: min(960px, 100%);
    background: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.eg-video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.eg-video-modal-title {
    margin: 0;
    padding: 16px 56px 12px 18px;
    color: #fff;
    font-size: 1.05rem;
}

.eg-video-modal-body {
    background: #000;
}

.eg-video-modal-body video {
    display: block;
    width: 100%;
    max-height: min(72vh, 720px);
    background: #000;
}

.eg-video-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px 16px;
    background: #0f172a;
}

.eg-video-modal-actions[hidden] {
    display: none !important;
}

.eg-video-modal-actions .eg-action-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.eg-video-modal-actions .eg-action-share {
    padding: 0 14px;
    width: auto;
    font-size: 0.88rem;
    font-weight: 600;
}

.eg-video-modal-actions .eg-action-download {
    padding: 0 14px;
    width: auto;
    font-size: 0.88rem;
    font-weight: 600;
}

.eg-filter-panel.is-videos-tab .eg-filter-photo-only {
    display: none;
}

.eg-video-moments-hint {
    margin: 10px 0 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.eg-filter-panel.is-videos-tab .eg-filter-face-actions {
    margin-top: 0;
}

.event-gallery-face-videos {
    margin: 0 0 20px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
}

.event-gallery-face-videos-head h3 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.event-gallery-face-videos-head p {
    margin: 0 0 12px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

.event-gallery-video-face-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.82);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.eg-video-faces {
    margin-top: 12px;
}

.eg-video-faces-label {
    margin: 0 0 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.eg-video-faces-hint {
    margin: 0 0 8px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.62);
}

.eg-video-faces-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
}

.eg-video-faces-row .eg-face-tile {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    aspect-ratio: auto;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.eg-video-faces-row .eg-face-tile:hover,
.eg-video-faces-row .eg-face-tile:focus-visible {
    border-color: #fff;
}

.eg-video-faces-row .eg-face-tile.is-active {
    box-shadow: 0 0 0 2px var(--eg-accent);
    border-color: var(--eg-accent);
}

.eg-video-faces-row .eg-face-tile-more {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
}

.eg-video-moments {
    margin-top: 12px;
}

.eg-video-moments-label {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

.eg-video-moments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 120px;
    overflow: auto;
}

.eg-video-moment-btn {
    border: 1px solid color-mix(in srgb, var(--eg-accent) 50%, rgba(255, 255, 255, 0.28));
    border-radius: 999px;
    background: color-mix(in srgb, var(--eg-accent) 10%, rgba(255, 255, 255, 0.08));
    color: rgba(255, 255, 255, 0.92);
    padding: 6px 12px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.eg-video-moment-btn:hover {
    background: color-mix(in srgb, var(--eg-accent) 72%, #fff);
    border-color: var(--eg-accent);
    color: var(--eg-button-text);
}

.eg-video-moment-btn.is-active {
    background: var(--eg-accent);
    border-color: var(--eg-accent);
    color: var(--eg-button-text);
}

.eg-watermark {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.eg-watermark.corner {
    display: flex;
    padding: 14px;
}

.eg-watermark.corner.top-left { justify-content: flex-start; align-items: flex-start; }
.eg-watermark.corner.top-right { justify-content: flex-end; align-items: flex-start; }
.eg-watermark.corner.bottom-left { justify-content: flex-start; align-items: flex-end; }
.eg-watermark.corner.bottom-right { justify-content: flex-end; align-items: flex-end; }
.eg-watermark.corner.center { justify-content: center; align-items: center; }

.eg-watermark.corner img {
    flex: 0 0 auto;
    width: calc(var(--wm-scale, 0.22) * 100%);
    height: auto;
    max-width: 180px;
    object-fit: contain;
    opacity: var(--wm-opacity, 0.16);
    filter: grayscale(1) brightness(1);
}

.eg-watermark.full {
    display: flex;
    align-items: center;
    justify-content: center;
}

.eg-watermark.full img {
    flex: 0 0 auto;
    width: calc(var(--wm-scale, 1) * 100%);
    height: calc(var(--wm-scale, 1) * 100%);
    object-fit: contain;
    opacity: var(--wm-opacity, 0.16);
    filter: grayscale(1) brightness(1);
}

.eg-watermark.tiled {
    background-repeat: repeat;
    background-size: calc(var(--wm-scale, 0.22) * 420px);
    opacity: var(--wm-opacity, 0.12);
    filter: grayscale(1) brightness(1);
}

.event-gallery-lightbox-media {
    position: relative;
    display: inline-block;
    max-width: 100%;
    touch-action: pan-y pinch-zoom;
}

.event-gallery-lightbox-media .eg-watermark {
    z-index: 2;
}

.event-gallery-card--col-2 {
    grid-column: span 2;
}

.event-gallery-card--col-3 {
    grid-column: span 3;
}

.event-gallery-card--row-2 {
    grid-row: span 2;
}

.event-gallery-card--row-3 {
    grid-row: span 3;
}

.event-gallery-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.eg-action-btn {
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--eg-text);
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
    font-size: 0.85rem;
}

.eg-action-btn[hidden],
.event-gallery-card-actions[hidden],
.event-gallery-lightbox-actions[hidden] {
    display: none !important;
}

.eg-action-btn.is-active {
    color: var(--eg-accent);
}

.eg-action-like.is-active .eg-action-icon {
    color: #d14343;
}

.eg-action-count {
    font-size: 0.75rem;
    font-weight: 600;
}

.eg-download-chunks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 8px;
}

.eg-download-chunk-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.eg-saved-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 1100;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(31, 26, 23, 0.92);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.eg-saved-bar[hidden] {
    display: none !important;
}

.eg-saved-bar-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: var(--eg-accent);
    color: #fff;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    cursor: pointer;
}

.eg-saved-bar-btn.secondary {
    background: transparent;
}

.eg-saved-bar-btn.ghost {
    background: transparent;
    border-color: transparent;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: underline;
}

.eg-saved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.eg-saved-tile {
    display: block;
    width: 100%;
    border: none;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1;
    cursor: pointer;
    background: var(--eg-bg);
    text-align: left;
}

.eg-saved-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-gallery-lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 14px;
}

.event-gallery-lightbox-actions .eg-action-btn {
    min-height: 40px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--eg-text);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.event-gallery-lightbox-actions .eg-action-like.is-active {
    color: var(--eg-accent);
}

.event-gallery-lightbox-actions .eg-action-like.is-active .eg-action-icon {
    color: #d14343;
}

.event-gallery-lightbox-actions .eg-action-bookmark.is-active {
    color: var(--eg-accent);
}

.event-gallery-lightbox-actions .eg-action-bookmark.is-active .eg-action-icon {
    color: #c9922e;
}

.eg-lightbox-action-label {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
}

.event-gallery-card-pills,
.event-gallery-lightbox-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.event-gallery-lightbox-pills--side {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    max-width: 45%;
    max-height: calc(100% - 20px);
    overflow: hidden;
    pointer-events: none;
}

.event-gallery-lightbox-pills--side .event-gallery-category-pill {
    pointer-events: auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-gallery-lightbox-face-hotspots {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.event-gallery-lightbox-face-hotspot {
    position: absolute;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
}

.event-gallery-lightbox-face-hotspot:focus-visible {
    outline: none;
}

.eg-face-link-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.eg-face-link-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.event-gallery-card-pills {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 8px;
}

.event-gallery-category-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: var(--eg-pill-color, var(--eg-accent));
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.event-gallery-category-pill.is-more {
    background: rgba(15, 23, 42, 0.72);
}

.event-gallery-card-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
    color: #fff;
    font-size: 0.78rem;
    text-align: left;
}

.event-gallery-lightbox-time {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
}

.event-gallery-sentinel {
    height: 1px;
}

.event-gallery-status,
.event-gallery-empty {
    text-align: center;
    color: var(--eg-muted);
    padding: 16px 0;
}

.event-gallery-event-list {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
}

.event-gallery-event-list li + li {
    margin-top: 10px;
}

.event-gallery-event-list a {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--eg-surface);
    color: var(--eg-text);
    text-decoration: none;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-gallery-event-list--landing a:hover,
.event-gallery-landing-grid-card:hover {
    border-color: color-mix(in srgb, var(--eg-accent) 35%, transparent);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.event-gallery-shell--landing {
    padding-top: 32px;
}

.event-gallery-header--landing {
    margin-bottom: 8px;
}

.event-gallery-header--below-hero {
    margin-top: 28px;
}

.event-gallery-body--landing {
    background: var(--eg-bg);
}

/* Landing hero */
.event-gallery-landing-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1f1a17;
}

.event-gallery-landing-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-gallery-landing-hero--small { min-height: 220px; }
.event-gallery-landing-hero--medium { min-height: 320px; }
.event-gallery-landing-hero--large { min-height: 440px; }
.event-gallery-landing-hero--full { min-height: min(72vh, 720px); }

.event-gallery-landing-hero--small .event-gallery-landing-hero-image,
.event-gallery-landing-hero--medium .event-gallery-landing-hero-image,
.event-gallery-landing-hero--large .event-gallery-landing-hero-image,
.event-gallery-landing-hero--full .event-gallery-landing-hero-image {
    position: absolute;
    inset: 0;
}

.event-gallery-landing-hero-copy {
    position: relative;
    z-index: 2;
    width: min(1400px, 94vw);
    margin: 0 auto;
    padding: clamp(32px, 6vw, 72px) 0;
    color: #fffaf2;
}

.event-gallery-landing-hero--overlay-light .event-gallery-landing-hero-copy {
    color: var(--eg-text);
}

.event-gallery-landing-hero--overlay-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 12, 10, 0.15) 0%, rgba(15, 12, 10, 0.72) 100%);
}

.event-gallery-landing-hero--overlay-light::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 250, 242, 0.1) 0%, rgba(255, 250, 242, 0.82) 100%);
}

.event-gallery-landing-hero-logo {
    max-height: 56px;
    max-width: min(200px, 40vw);
    object-fit: contain;
    margin-bottom: 16px;
    display: block;
}

.event-gallery-landing-hero-copy h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
    max-width: 18ch;
}

.event-gallery-landing-hero-copy .event-gallery-subtitle {
    margin: 0;
    max-width: 42ch;
    color: inherit;
    opacity: 0.92;
}

/* Landing cards layout */
.event-gallery-landing-cards {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px 18px;
}

.event-gallery-landing-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: var(--eg-surface);
    color: var(--eg-text);
    text-decoration: none;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 6px 16px rgba(15, 23, 42, 0.07),
        0 16px 36px rgba(15, 23, 42, 0.08);
    transition:
        border-color 0.22s ease,
        box-shadow 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.event-gallery-landing-card:hover {
    border-color: color-mix(in srgb, var(--eg-accent) 22%, rgba(15, 23, 42, 0.08));
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.05),
        0 14px 28px rgba(15, 23, 42, 0.12),
        0 32px 64px rgba(15, 23, 42, 0.16);
    transform: translateY(-8px);
}

.event-gallery-landing-card:active {
    transform: translateY(-4px);
    box-shadow:
        0 2px 6px rgba(15, 23, 42, 0.08),
        0 10px 22px rgba(15, 23, 42, 0.1),
        0 22px 44px rgba(15, 23, 42, 0.12);
}

.event-gallery-landing-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: color-mix(in srgb, var(--eg-accent) 12%, var(--eg-surface));
    overflow: hidden;
}

.event-gallery-landing-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-gallery-landing-card-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--eg-accent) 18%, var(--eg-surface)), var(--eg-surface));
}

.event-gallery-landing-card-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px 18px;
}

.event-gallery-landing-card-copy strong {
    font-size: 1.05rem;
    line-height: 1.25;
}

.event-gallery-landing-card-copy span {
    color: var(--eg-muted);
    font-size: 0.92rem;
}

.event-gallery-landing-cards--highlight-latest > li:first-child {
    grid-column: 1 / -1;
}

.event-gallery-landing-card--featured .event-gallery-landing-card-media {
    aspect-ratio: 21 / 9;
}

.event-gallery-landing-card--featured .event-gallery-landing-card-copy {
    padding: 18px 20px 20px;
}

.event-gallery-landing-card--featured .event-gallery-landing-card-copy strong {
    font-size: 1.25rem;
}

.event-gallery-landing-card--featured {
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.06),
        0 12px 28px rgba(15, 23, 42, 0.1),
        0 28px 56px rgba(15, 23, 42, 0.14);
}

.event-gallery-landing-card--featured:hover {
    box-shadow:
        0 4px 8px rgba(15, 23, 42, 0.08),
        0 18px 36px rgba(15, 23, 42, 0.14),
        0 40px 72px rgba(15, 23, 42, 0.18);
}

@media (min-width: 720px) {
    .event-gallery-landing-cards--highlight-latest {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-gallery-landing-cards--highlight-latest > li:first-child {
        grid-column: span 2;
    }
}

@media (min-width: 1024px) {
    .event-gallery-landing-cards--highlight-latest {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .event-gallery-landing-cards--highlight-latest > li:first-child {
        grid-column: span 2;
    }
}

/* Landing grid layout */
.event-gallery-landing-grid {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.event-gallery-landing-grid-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--eg-surface);
    color: var(--eg-text);
    text-decoration: none;
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.event-gallery-landing-grid-media {
    display: block;
    aspect-ratio: 1;
    background: color-mix(in srgb, var(--eg-accent) 12%, var(--eg-surface));
    overflow: hidden;
}

.event-gallery-landing-grid-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.event-gallery-landing-grid-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, color-mix(in srgb, var(--eg-accent) 18%, var(--eg-surface)), var(--eg-surface));
}

.event-gallery-landing-grid-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 14px;
}

.event-gallery-landing-grid-copy strong {
    font-size: 0.98rem;
    line-height: 1.25;
}

.event-gallery-landing-grid-copy span {
    color: var(--eg-muted);
    font-size: 0.85rem;
}

.event-gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    display: grid;
    place-items: center;
    z-index: 1000;
    padding: 24px;
}

.event-gallery-lightbox[hidden] {
    display: none !important;
}

.event-gallery-lightbox figure {
    margin: 0;
    max-width: min(1200px, 96vw);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.event-gallery-lightbox-faces {
    width: 100%;
    margin-bottom: 12px;
    text-align: center;
}

.event-gallery-lightbox-faces[hidden] {
    display: none !important;
}

.event-gallery-lightbox-faces-label {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-gallery-lightbox-faces-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.event-gallery-lightbox-faces-row .eg-face-tile {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    aspect-ratio: auto;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.event-gallery-lightbox-faces-row .eg-face-tile:hover,
.event-gallery-lightbox-faces-row .eg-face-tile:focus-visible {
    border-color: #fff;
}

.eg-face-tile-more {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.28);
}

.eg-face-tile-more:hover,
.eg-face-tile-more:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.event-gallery-lightbox-media > img {
    max-width: 100%;
    max-height: calc(92vh - 120px);
    display: block;
    margin: 0 auto;
}

.event-gallery-lightbox figcaption {
    color: #fff;
    text-align: center;
    margin-top: 12px;
    font-size: 0.95rem;
}

.event-gallery-lightbox-close {
    position: absolute;
    top: max(12px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 6;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.event-gallery-lightbox-close:hover,
.event-gallery-lightbox-close:focus-visible {
    background: rgba(0, 0, 0, 0.78);
}

.event-gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.event-gallery-lightbox-nav:hover,
.event-gallery-lightbox-nav:focus-visible {
    background: rgba(0, 0, 0, 0.68);
}

.event-gallery-lightbox-nav--prev {
    left: max(12px, env(safe-area-inset-left, 0px));
}

.event-gallery-lightbox-nav--next {
    right: max(12px, env(safe-area-inset-right, 0px));
}

.event-gallery-lightbox-nav[hidden] {
    display: none !important;
}

@media (max-width: 640px) {
    .event-gallery-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }
}

.event-gallery-error h1 {
    margin-top: 0;
}

.event-gallery-face-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.eg-photo-face-actions-top {
    margin-top: 0;
    margin-bottom: 14px;
}

.eg-filter-clear-face-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 0;
    margin-top: 0;
}

.eg-filter-clear-face-actions .event-gallery-face-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.eg-download-choice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1rem 0;
}

.eg-download-choice-actions .event-gallery-face-btn {
    flex: 1 1 180px;
    justify-content: center;
    text-align: center;
}

.event-gallery-face-btn {
    border: 1px solid var(--eg-accent);
    background: var(--eg-accent);
    color: var(--eg-button-text);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
}

.event-gallery-face-btn.secondary {
    background: transparent;
    color: var(--eg-accent);
}

.event-gallery-face-btn.ghost {
    border-color: transparent;
    background: transparent;
    color: var(--eg-muted);
    text-decoration: underline;
    padding-left: 0;
}

.eg-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
}

#eventGalleryVideoFacesModal.eg-modal {
    z-index: 12100;
}

.eg-modal[hidden] {
    display: none !important;
}

.eg-modal-panel {
    position: relative;
    width: min(480px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.eg-modal-panel-wide {
    width: min(720px, 100%);
}

.eg-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: var(--eg-muted);
}

.eg-modal-email-wrap {
    margin: 0 0 16px;
}

.eg-modal-email-label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.92rem;
}

.eg-modal-email-label input {
    width: 100%;
    border: 1px solid rgba(31, 26, 23, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: var(--eg-text);
    background: var(--eg-surface, #fff);
}

.eg-modal-email-hint {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 0.85rem;
}

.eg-modal-note {
    color: var(--eg-muted);
    font-size: 0.92rem;
    margin: 0 0 16px;
}

.eg-selfie-source-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.eg-selfie-tab {
    flex: 1;
    border: 1px solid var(--eg-border, #d8d0c4);
    border-radius: 999px;
    background: var(--eg-bg, #fff);
    color: var(--eg-text);
    font: inherit;
    font-size: 0.9rem;
    padding: 10px 14px;
    cursor: pointer;
}

.eg-selfie-tab.is-active {
    border-color: var(--eg-accent);
    background: color-mix(in srgb, var(--eg-accent) 12%, var(--eg-bg, #fff));
    font-weight: 600;
}

.eg-selfie-panel {
    margin-bottom: 16px;
}

.eg-selfie-camera-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    margin-bottom: 12px;
}

.eg-selfie-video,
.eg-selfie-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eg-selfie-video {
    transform: scaleX(-1);
}

.eg-selfie-camera-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.eg-modal-file {
    display: block;
    margin-bottom: 0;
}

.eg-modal-file span {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.eg-modal-file input[type="file"] {
    display: block;
    width: 100%;
}

.eg-modal-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    margin: 0 0 16px;
    color: var(--eg-text);
}

.eg-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.88rem;
    margin-bottom: 16px;
    color: var(--eg-text);
}

.eg-file-label {
    display: block;
    margin-bottom: 16px;
}

.eg-file-label span {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.eg-file-label input[type="file"] {
    display: block;
    width: 100%;
}

.eg-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.eg-modal-status {
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: var(--eg-muted);
}

.eg-modal-status.is-error {
    color: #b42318;
}

.eg-modal-panel-narrow {
    max-width: 420px;
    text-align: center;
}

.eg-zip-progress-spinner {
    width: 48px;
    height: 48px;
    margin: 16px auto;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--eg-accent, #1a6eff);
    border-radius: 50%;
    animation: eg-zip-spin 0.85s linear infinite;
}

@keyframes eg-zip-spin {
    to {
        transform: rotate(360deg);
    }
}

.eg-zip-progress-hint {
    margin-top: 12px;
    font-size: 0.85rem;
}

.eg-zip-download-frame {
    position: absolute;
    width: 0;
    height: 0;
    border: 0;
    visibility: hidden;
}

.eg-faces-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.eg-face-tile {
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    background: var(--eg-bg);
    cursor: pointer;
    aspect-ratio: 1;
}

.eg-face-tile:hover,
.eg-face-tile:focus-visible {
    border-color: var(--eg-accent);
}

.eg-face-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eg-public-footer {
    margin-top: 48px;
    padding: 28px 0 8px;
    border-top: 1px solid color-mix(in srgb, var(--eg-text) 12%, transparent);
}

.eg-public-footer-grid {
    display: grid;
    gap: 24px;
}

.eg-public-footer--cols-1 .eg-public-footer-grid { grid-template-columns: 1fr; }
.eg-public-footer--cols-2 .eg-public-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eg-public-footer--cols-3 .eg-public-footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.eg-public-footer--dividers .eg-public-footer-grid {
    gap: 0;
}

.eg-public-footer--dividers .eg-public-footer-column + .eg-public-footer-column {
    border-left: 1px solid var(--eg-footer-divider, color-mix(in srgb, var(--eg-text) 16%, transparent));
    padding-left: 24px;
}

.eg-public-footer-heading {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.eg-public-footer-body {
    color: var(--eg-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.eg-public-footer-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--eg-accent);
    text-decoration: none;
    font-weight: 600;
}

.eg-public-footer-column--align-center { text-align: center; }
.eg-public-footer-column--align-right { text-align: right; }

.eg-field-label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--eg-muted);
}

.eg-field-label input {
    font: inherit;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    color: var(--eg-text);
}

.eg-selection-link-row {
    display: flex;
    gap: 8px;
    margin: 12px 0 4px;
}

.eg-selection-link-row input {
    flex: 1 1 auto;
    min-width: 0;
    font: inherit;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.15);
    background: #fff;
    color: var(--eg-text);
}

.eg-selection-header {
    margin-bottom: 20px;
}

.eg-selection-back-btn:hover {
    text-decoration: none;
    opacity: 0.92;
}

.eg-selection-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.eg-selection-note {
    margin: 0 0 20px;
    color: var(--eg-muted);
    line-height: 1.5;
}

.eg-selection-note a {
    color: var(--eg-accent);
}

.eg-selection-grid {
    margin-bottom: 40px;
}

.eg-share-preview {
    display: flex;
    gap: 14px;
    align-items: center;
    margin: 16px 0;
    padding: 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--eg-accent) 8%, #fff);
    border: 1px solid color-mix(in srgb, var(--eg-accent) 18%, transparent);
}

.eg-share-preview img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 10px;
    flex: 0 0 auto;
}

.eg-share-preview-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.eg-share-preview-copy strong {
    font-size: 1rem;
    line-height: 1.3;
}

.eg-share-preview-copy span {
    color: var(--eg-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.eg-share-cover-label {
    margin: 0 0 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--eg-muted);
}

.eg-share-cover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    max-height: 220px;
    overflow-y: auto;
}

.eg-share-cover-tile {
    position: relative;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    aspect-ratio: 1;
}

.eg-share-cover-tile.is-selected {
    border-color: var(--eg-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--eg-accent) 25%, transparent);
}

.eg-share-cover-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eg-share-actions {
    flex-wrap: wrap;
}

.eg-share-cache-note {
    margin-top: 10px;
    font-size: 0.82rem;
}

.eg-social-share {
    margin-top: 18px;
    text-align: center;
}

.eg-social-share-label {
    margin: 0 0 14px;
    color: var(--eg-muted);
    font-size: 0.92rem;
}

.eg-social-share-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
}

.eg-social-share-btn {
    border: none;
    background: transparent;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.eg-social-share-btn:hover {
    transform: translateY(-1px);
    opacity: 0.82;
}

.eg-social-share-btn img {
    width: 50px;
    height: 50px;
    display: block;
    object-fit: contain;
}

.eg-modal-status.is-error {
    color: #d14343;
}

@media (max-width: 640px) {
    .event-gallery-header:not(.event-gallery-header--logos-only),
    .event-gallery-header--has-event-logo:not(.event-gallery-header--logos-only) {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-gallery-header--logos-only {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .event-gallery-header--toolbar-beside-logo {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .event-gallery-header-toolbar {
        max-width: calc(100% - 120px);
    }

    .event-gallery-event-logo {
        max-height: 72px;
    }

    .eg-public-footer--cols-2 .eg-public-footer-grid,
    .eg-public-footer--cols-3 .eg-public-footer-grid {
        grid-template-columns: 1fr;
    }

    .eg-public-footer--dividers .eg-public-footer-column + .eg-public-footer-column {
        border-left: none;
        border-top: 1px solid var(--eg-footer-divider, color-mix(in srgb, var(--eg-text) 16%, transparent));
        padding-left: 0;
        padding-top: 20px;
        margin-top: 20px;
    }

    .event-gallery-grid {
        --eg-row-unit: clamp(100px, 28vw, 136px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .event-gallery-grid--uniform {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .event-gallery-card--col-2,
    .event-gallery-card--col-3 {
        grid-column: span 2;
    }
}

.eg-lang-switcher {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

.eg-lang-select {
    appearance: none;
    border: 1px solid color-mix(in srgb, var(--eg-text) 18%, transparent);
    background: var(--eg-surface);
    color: var(--eg-text);
    border-radius: 999px;
    padding: 6px 28px 6px 12px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--eg-muted) 50%),
        linear-gradient(135deg, var(--eg-muted) 50%, transparent 50%);
    background-position:
        calc(100% - 14px) calc(50% - 2px),
        calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.eg-lang-select:focus-visible {
    outline: 2px solid var(--eg-accent);
    outline-offset: 2px;
}

.eg-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 980px) and (min-width: 641px) {
    .event-gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .event-gallery-card--col-3 {
        grid-column: span 4;
    }
}

/* ---------------- Cross-gallery "Find my face" ---------------- */
.event-gallery-find-me-cta {
    text-align: center;
    margin: 8px auto 28px;
    padding: 20px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--eg-accent) 8%, var(--eg-surface, #fff));
    max-width: 640px;
}

.event-gallery-find-me-cta .eg-btn {
    display: inline-block;
    text-decoration: none;
}

.event-gallery-find-me-cta-note {
    margin: 12px 0 0;
    color: var(--eg-muted);
    font-size: 0.92rem;
}

.eg-find-me {
    max-width: 1100px;
}

.eg-find-me-step {
    margin-top: 24px;
}

.eg-find-me-card {
    background: var(--eg-surface, #fff);
    border-radius: 16px;
    padding: 28px;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.eg-find-me-card h2 {
    margin: 0;
    color: var(--eg-text);
    font-size: 1.25rem;
}

.eg-find-me-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--eg-text);
    font-weight: 600;
}

.eg-find-me-field input[type="email"],
.eg-find-me-field input[type="file"] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--eg-text) 18%, transparent);
    background: #fff;
    color: #111;
    font-size: 1rem;
}

.eg-find-me-note {
    margin: 0;
    color: var(--eg-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.eg-find-me-error {
    margin: 0;
    color: #c0392b;
    font-size: 0.9rem;
    font-weight: 600;
}

.eg-find-me-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--eg-text);
    font-size: 0.92rem;
    line-height: 1.4;
}

.eg-find-me-consent input {
    margin-top: 3px;
    flex: 0 0 auto;
}

.eg-find-me-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.eg-btn {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.eg-btn:disabled,
.eg-btn.is-busy {
    opacity: 0.6;
    cursor: progress;
}

.eg-btn--primary {
    background: var(--eg-accent);
    color: var(--eg-button-text, #fff);
}

.eg-btn--ghost {
    background: transparent;
    color: var(--eg-text);
    border: 1px solid color-mix(in srgb, var(--eg-text) 22%, transparent);
}

.eg-find-me-results {
    margin-top: 28px;
}

.eg-find-me-results-head {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.eg-find-me-results-head h2 {
    margin: 0 0 4px;
    color: var(--eg-text);
}

.eg-find-me-results-count {
    margin: 0;
    color: var(--eg-muted);
    font-size: 0.92rem;
}

.eg-find-me-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--eg-text);
    font-size: 0.85rem;
    font-weight: 600;
}

.eg-find-me-filter select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--eg-text) 18%, transparent);
    background: #fff;
    color: #111;
    font-size: 0.95rem;
    min-width: 200px;
}

.eg-find-me-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    grid-auto-rows: auto !important;
    grid-auto-flow: row !important;
}

.eg-find-me-item {
    position: relative;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    display: block;
}

.eg-find-me-item > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eg-find-me-item-badge {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 8px 6px;
    font-size: 0.72rem;
    color: #fff;
    text-align: left;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eg-action-open {
    text-decoration: none;
}

@media (max-width: 640px) {
    .eg-find-me-card {
        padding: 20px;
    }

    .eg-find-me-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
    }
}
