:root {
    --bg: #dfe9dc;
    --bg-accent: #cddcc7;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --text: #172018;
    --muted: #5d6b5f;
    --border: rgba(23, 32, 24, 0.08);
    --shadow: 0 18px 40px rgba(24, 40, 24, 0.08);
    --radius: 20px;
    --radius-sm: 14px;
    --content-width: 1200px;
    --like-bg: rgba(255, 255, 255, 0.94);
    --like-border: rgba(23, 32, 24, 0.12);
    --like-active-bg: #fff4f6;
    --heart: #e34b6f;
    --heart-strong: #cc2f58;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 28%),
        linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 100%);
    background-color: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 28%),
        linear-gradient(180deg, var(--bg-accent) 0%, var(--bg) 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.5;
}

body.intro-active {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.intro-screen {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent 45%),
        linear-gradient(180deg, #b9ceb0 0%, #8eac86 100%);
    color: #f8fbf6;
    opacity: 1;
    visibility: visible;
    transition: opacity 500ms ease, visibility 500ms ease;
}

.intro-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.intro-content {
    text-align: center;
    max-width: 42rem;
}

.intro-kicker {
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    opacity: 0.85;
}

.intro-content h2 {
    margin: 0;
    font-size: clamp(2rem, 6vw, 4.2rem);
    line-height: 1.05;
    font-weight: 600;
}

.site-shell {
    width: min(calc(100% - 2rem), var(--content-width));
    margin: 0 auto;
    padding: 2rem 0 2rem;
}


main {
    padding-bottom: 2.75rem;
}

.site-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    padding: 0 0 2rem;
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--muted);
}

h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.05;
}

h2 {
    margin: 0;
    font-size: 1.2rem;
}

.breadcrumb {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--text);
}

.category-grid,
.image-grid {
    display: grid;
    gap: 1.5rem;
}

.category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card,
.image-card {
    display: block;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover,
.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 46px rgba(24, 40, 24, 0.12);
}

.thumb-frame {
    position: relative;
    overflow: hidden;
    background: #d9e4d6;
}

.category-thumb {
    aspect-ratio: 4 / 3;
}

.image-thumb {
    aspect-ratio: 1 / 1;
}

.thumb-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-copy {
    padding: 1rem 1.1rem 1.2rem;
}

.card-copy p,
.image-label,
.empty-state {
    color: var(--muted);
}

.card-copy p {
    margin: 0.3rem 0 0;
}

.image-link {
    display: block;
}

.image-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0.95rem 1rem;
}

.image-meta-row-like-only {
    justify-content: flex-end;
}

.image-label {
    display: block;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toolbar,
.pager {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.toolbar {
    justify-content: space-between;
}

.pager {
    justify-content: space-between;
    margin-top: 1.25rem;
}

.pager-slot {
    flex: 1 1 220px;
}

.pager-slot-right {
    display: flex;
    justify-content: flex-end;
}

.button-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.8rem 1rem;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(24, 40, 24, 0.05);
}

.button-link:hover {
    border-color: rgba(23, 32, 24, 0.18);
}

.button-link-accent {
    background: #f2f7ef;
    border-color: rgba(58, 115, 58, 0.22);
}

.button-link-accent:hover {
    border-color: rgba(58, 115, 58, 0.35);
}

.pager-link {
    gap: 0.9rem;
    padding-inline: 1.35rem;
}

.arrow {
    font-size: 1.1rem;
    line-height: 1;
}

.like-button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--like-border);
    border-radius: 999px;
    background: var(--like-bg);
    color: var(--text);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(24, 40, 24, 0.05);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.like-button:hover {
    transform: translateY(-1px);
    border-color: rgba(23, 32, 24, 0.25);
}

.like-button.is-liked {
    background: var(--like-active-bg);
    border-color: rgba(227, 75, 111, 0.28);
}

.like-icon {
    font-size: 1rem;
    line-height: 1;
    color: var(--heart);
}

.like-button.is-liked .like-icon {
    color: var(--heart-strong);
}

.like-burst-heart {
    position: fixed;
    z-index: 1200;
    pointer-events: none;
    font-size: clamp(0.9rem, 1.2vw, 1.15rem);
    line-height: 1;
    color: var(--heart);
    will-change: transform, opacity;
    animation: heart-burst 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    text-shadow: 0 4px 10px rgba(227, 75, 111, 0.18);
}

@keyframes heart-burst {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.5) rotate(0deg);
    }

    15% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate3d(var(--tx, 0), var(--ty, -80px), 0) scale(var(--scale, 1.2)) rotate(var(--rot, 0deg));
    }
}

.like-count {
    min-width: 1.1rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.like-button-large {
    padding: 0.7rem 1rem;
}

.lightbox-view {
    margin: 0;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.lightbox-image-wrap {
    background: #e6eee3;
    border-radius: calc(var(--radius) - 6px);
    overflow: hidden;
    min-height: 40vh;
}

.lightbox-image-wrap img {
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    background: #e6eee3;
}

.lightbox-caption-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0.15rem 0.15rem;
    color: var(--muted);
}

.lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
}

.placeholder,
.empty-state {
    display: grid;
    place-items: center;
}

.placeholder {
    min-height: 14rem;
    color: var(--muted);
}

.empty-state {
    min-height: 18rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

@media (max-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .image-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-shell {
        width: min(calc(100% - 1.2rem), var(--content-width));
        padding-top: 1.2rem;
    }

    .site-header,
    .lightbox-caption-row,
    .image-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .lightbox-actions {
        width: 100%;
        justify-content: stretch;
    }

    .category-grid,
    .image-grid {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .pager {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    .pager-slot {
        width: auto;
        display: flex;
        flex: 0 0 auto;
    }

    .pager-slot-left {
        justify-content: flex-start;
    }

    .pager-slot-right {
        width: auto;
        display: flex;
        justify-content: flex-end;
    }

    .button-link,
    .like-button {
        width: 100%;
        justify-content: center;
    }

    .pager .button-link {
        width: auto;
        max-width: none;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .pager-link {
        width: auto;
        max-width: none;
        padding: 0.85rem 1.15rem;
        min-height: 0;
        aspect-ratio: auto;
        border-radius: 999px;
    }
}

.site-footer {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.5rem 0 0.25rem;
    border-top: 1px solid rgba(23, 32, 24, 0.08);
    color: var(--muted);
    font-size: 0.95rem;
    display: flex;
    justify-content: center;
}

.site-footer p {
    margin: 0 auto;
    width: 100%;
    max-width: 72rem;
    text-align: center;
}

.lightbox-caption-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.render-note {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.placeholder-small {
    min-height: 100%;
    padding: 1rem;
    text-align: center;
}

.placeholder-large {
    min-height: 40vh;
    padding: 2rem;
    text-align: center;
}


main {
    padding-bottom: 2.5rem;
}

.site-footer {
    margin-top: 2.75rem;
    padding-top: 2rem;
}

.like-icon,
.like-button .like-icon,
.like-button.is-liked .like-icon {
    color: var(--heart);
}

.like-button.is-liked .like-icon {
    color: var(--heart-strong);
}



@media (max-width: 720px) {
    main {
        padding-bottom: 2rem;
    }

    .site-footer {
        margin-top: 2.25rem;
    }
}

