:root {
    --gallery-bg: #f8f1e5;
    --gallery-ink: #2f241e;
    --gallery-muted: #68574b;
    --gallery-accent: #bd6e42;
    --gallery-accent-2: #3f6e5d;
    --gallery-card: #fffdf7;
    --gallery-border: rgba(47, 36, 30, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--gallery-ink);
    min-height: 100vh;
    background:
        radial-gradient(circle at 5% -12%, rgba(189, 110, 66, 0.2), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(63, 110, 93, 0.16), transparent 32%),
        linear-gradient(180deg, #f9f3e8 0%, var(--gallery-bg) 55%, #efe4d5 100%);
}

.gallery-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gallery-border);
    background: rgba(248, 241, 229, 0.88);
}

.gallery-header-inner {
    width: min(1140px, calc(100% - 1.5rem));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
}

.brand-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
}

.brand-wrap img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.brand-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.8rem;
    line-height: 1;
}

.gallery-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.gallery-nav a {
    text-decoration: none;
    color: var(--gallery-ink);
    border: 1px solid var(--gallery-border);
    border-radius: 999px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.95rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.8);
}

.gallery-nav a:hover {
    border-color: rgba(189, 110, 66, 0.6);
}

.gallery-shell {
    width: min(1140px, calc(100% - 1.5rem));
    margin: 0 auto;
    padding: 2.4rem 0 2.6rem;
}

.gallery-hero {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.4rem;
}

.gallery-hero h1 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.2rem, 8vw, 4rem);
    line-height: 0.94;
}

.gallery-hero p {
    margin: 0;
    color: var(--gallery-muted);
    width: min(680px, 100%);
    line-height: 1.65;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.8rem;
}

.gallery-tile {
    border: 1px solid var(--gallery-border);
    border-radius: 15px;
    overflow: hidden;
    background: var(--gallery-card);
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 14px 28px rgba(47, 36, 30, 0.08);
}

.gallery-tile img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

.gallery-tile-caption {
    padding: 0.65rem 0.7rem;
    color: var(--gallery-muted);
    font-size: 0.87rem;
    min-height: 44px;
}

.gallery-empty {
    border: 1px dashed var(--gallery-border);
    border-radius: 14px;
    text-align: center;
    color: var(--gallery-muted);
    padding: 2rem 1rem;
    background: rgba(255, 255, 255, 0.55);
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(24, 15, 11, 0.88);
    display: none;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

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

.lightbox-panel {
    width: min(980px, 100%);
    max-height: 96dvh;
    background: #f5ecdf;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

.lightbox-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    border-bottom: 1px solid rgba(47, 36, 30, 0.14);
}

.lightbox-btn {
    min-height: 40px;
    min-width: 40px;
    border-radius: 999px;
    border: 1px solid rgba(47, 36, 30, 0.2);
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

.lightbox-count {
    color: var(--gallery-muted);
    font-size: 0.9rem;
}

.lightbox-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #eee1d0;
}

.lightbox-image-wrap img {
    width: 100%;
    height: 100%;
    max-height: 76dvh;
    object-fit: contain;
    user-select: none;
    pointer-events: none;
}

.lightbox-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem;
    border-top: 1px solid rgba(47, 36, 30, 0.14);
}

.lightbox-caption {
    margin: 0;
    color: var(--gallery-muted);
    font-size: 0.9rem;
}

.lightbox-actions {
    display: inline-flex;
    gap: 0.45rem;
}

@media (max-width: 640px) {
    .gallery-hero {
        margin-bottom: 1rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .lightbox {
        padding: 0;
    }

    .lightbox-panel {
        width: 100%;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        border: none;
    }

    .lightbox-image-wrap img {
        max-height: calc(100dvh - 134px);
    }
}
