.mcfg-gallery-shell {
    --mcfg-bg: #0f172a;
    --mcfg-card: #ffffff;
    --mcfg-muted: #64748b;
    --mcfg-text: #0f172a;
    --mcfg-accent: #2563eb;
    --mcfg-accent-dark: #1d4ed8;
    --mcfg-border: rgba(15, 23, 42, 0.12);
    font-family: inherit;
    color: var(--mcfg-text);
}

.mcfg-login-card,
.mcfg-gallery-header,
.mcfg-cta-box,
.mcfg-empty {
    border-radius: 24px;
    background: var(--mcfg-card);
    border: 1px solid var(--mcfg-border);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.10);
}

.mcfg-login-card {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.85fr);
    gap: 24px;
    padding: clamp(22px, 4vw, 42px);
    overflow: hidden;
    position: relative;
}

.mcfg-login-card:before {
    content: "";
    position: absolute;
    inset: auto -12% -25% 50%;
    height: 260px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.20), transparent 64%);
    pointer-events: none;
}

.mcfg-login-content {
    position: relative;
    z-index: 1;
}

.mcfg-kicker {
    margin: 0 0 8px;
    color: var(--mcfg-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
}

.mcfg-login-card h2,
.mcfg-gallery-header h2 {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.05;
}

.mcfg-login-card p,
.mcfg-gallery-header p {
    color: var(--mcfg-muted);
    margin: 0 0 20px;
}

.mcfg-login-form {
    display: grid;
    gap: 10px;
    max-width: 460px;
}

.mcfg-login-form label {
    font-weight: 700;
}

.mcfg-login-form input {
    width: 100%;
    min-height: 54px;
    border: 1px solid var(--mcfg-border);
    border-radius: 14px;
    padding: 0 16px;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mcfg-login-form button,
.mcfg-cta-box a,
.mcfg-logout,
.mcfg-download-all,
.mcfg-lightbox-download,
.mcfg-lightbox-secondary,
.mcfg-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    border-radius: 999px;
    padding: 0 20px;
    border: 0;
    background: var(--mcfg-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.mcfg-login-form button:hover,
.mcfg-cta-box a:hover,
.mcfg-download-all:hover,
.mcfg-lightbox-download:hover,
.mcfg-load-more:hover {
    background: var(--mcfg-accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.mcfg-error {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.mcfg-login-note {
    margin-top: 14px !important;
    font-size: 0.95rem;
}

.mcfg-cta-box {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.mcfg-cta-box strong,
.mcfg-cta-box span {
    display: block;
}

.mcfg-cta-box span {
    margin-top: 4px;
    color: var(--mcfg-muted);
}

.mcfg-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(20px, 4vw, 34px);
    margin-bottom: 18px;
}

.mcfg-gallery-header h2 {
    font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.mcfg-gallery-header p {
    margin-bottom: 0;
}

.mcfg-gallery-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.mcfg-logout,
.mcfg-lightbox-secondary {
    background: #e2e8f0;
    color: #0f172a;
    white-space: nowrap;
}

.mcfg-logout:hover,
.mcfg-lightbox-secondary:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.mcfg-mobile-download-note {
    display: none;
    color: var(--mcfg-muted);
    font-size: 0.95rem;
    max-width: 260px;
    text-align: right;
}

.mcfg-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.mcfg-photo-card {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #e2e8f0;
    cursor: zoom-in;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.10);
}

.mcfg-photo-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.mcfg-photo-card:hover img {
    transform: scale(1.035);
}

.mcfg-empty {
    padding: clamp(28px, 5vw, 46px);
    color: var(--mcfg-muted);
    margin-top: 20px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.mcfg-load-more-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    margin: 28px 0 6px;
}

.mcfg-load-more:disabled {
    opacity: 0.65;
    cursor: progress;
}

.mcfg-load-more-count {
    color: var(--mcfg-muted);
    font-size: 0.95rem;
}

.mcfg-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.mcfg-lightbox.is-open {
    display: flex;
}

.mcfg-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.88);
}

.mcfg-lightbox-dialog {
    position: relative;
    max-width: min(1100px, 96vw);
    max-height: 92vh;
    display: grid;
    gap: 14px;
    justify-items: center;
}

.mcfg-lightbox-dialog img {
    display: block;
    max-width: 100%;
    max-height: 76vh;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.mcfg-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: #fff;
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.mcfg-lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.mcfg-no-scroll {
    overflow: hidden;
}

@media (max-width: 760px) {
    .mcfg-login-card {
        grid-template-columns: 1fr;
    }

    .mcfg-gallery-header,
    .mcfg-cta-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .mcfg-gallery-actions {
        align-items: flex-start;
        width: 100%;
    }

    .mcfg-desktop-only {
        display: none !important;
    }

    .mcfg-mobile-download-note {
        display: block;
        text-align: left;
    }

    .mcfg-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
        gap: 10px;
    }

    .mcfg-lightbox-dialog img {
        max-height: 68vh;
    }
}

.mcfg-login-content .mcfg-kicker:first-child,
.mcfg-gallery-header .mcfg-kicker:first-child { margin-top: 0; }


.mcfg-empty-placeholder h3 {
    margin: 0 0 10px;
    color: var(--mcfg-text);
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.mcfg-empty-placeholder p {
    margin: 0 auto;
    max-width: 720px;
    color: var(--mcfg-muted);
}
