:root {
    --bg: #fffaf7;
    --bg-soft: #fff4ef;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --text: #3b302d;
    --muted: #7f6a65;
    --line: rgba(121, 95, 90, 0.12);
    --accent: #c9898f;
    --accent-strong: #b76f76;
    --shadow: 0 24px 60px rgba(149, 111, 104, 0.16);
    --radius: 26px;
    --radius-sm: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 225, 225, 0.75), transparent 32%),
        radial-gradient(circle at top right, rgba(255, 240, 231, 0.95), transparent 28%),
        linear-gradient(180deg, #fffdfb 0%, #fff7f2 55%, #fffaf6 100%);
    min-height: 100vh;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

.site-shell {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 48px;
}

.site-header,
.site-footer,
.toolbar,
.section-soft,
.upload-card,
.info-card,
.flash,
.hero-frame,
.language-card,
.loader-card {
    backdrop-filter: blur(22px);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.site-header {
    position: sticky;
    top: 14px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.brand,
.site-nav,
.hero-actions,
.language-actions,
.photo-meta,
.admin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    font-weight: 700;
}

.brand-mark,
.dropzone-icon,
.hero-placeholder span {
    font-size: 1.2rem;
    color: var(--accent-strong);
}

.site-nav {
    display: none;
    color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible {
    color: var(--text);
}

.language-switcher select,
.toolbar-form select,
.admin-form input,
.admin-form textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
}

.page-content {
    display: grid;
    gap: 26px;
}

.mobile-top-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: -4px 0 6px;
    padding: 8px;
    border-radius: 22px;
    backdrop-filter: blur(22px);
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.mobile-top-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
    font-size: 0.92rem;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.mobile-top-link.is-active {
    background: linear-gradient(135deg, rgba(201, 137, 143, 0.18), rgba(183, 111, 118, 0.12));
    color: var(--text);
    font-weight: 700;
}

.hero {
    display: grid;
    gap: 24px;
    padding: 20px 0 10px;
}

.hero-copy h1,
.section-heading h2,
.section-header h1,
.language-card h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 0.96;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
}

.hero-text,
.section-header p,
.section-heading p,
.upload-meta p,
.info-card p,
.lightbox-caption {
    color: var(--muted);
    line-height: 1.7;
}

.hero-frame,
.section-soft,
.upload-card,
.info-card,
.toolbar,
.flash,
.language-card,
.loader-card {
    border-radius: var(--radius);
}

.hero-frame {
    overflow: hidden;
    min-height: 340px;
}

.hero-frame img,
.hero-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-placeholder {
    display: grid;
    place-items: center;
    min-height: 340px;
    background: linear-gradient(135deg, rgba(255, 239, 235, 0.95), rgba(255, 250, 248, 0.98));
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover,
.button:focus-visible,
.photo-trigger:hover,
.photo-trigger:focus-visible,
.like-button:hover,
.like-button:focus-visible {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: white;
    box-shadow: 0 16px 30px rgba(183, 111, 118, 0.25);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border: 1px solid var(--line);
}

.button-danger {
    background: #8d4b54;
    color: white;
}

.button-wide {
    width: 100%;
}

.eyebrow,
.admin-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--accent-strong);
    margin-bottom: 12px;
}

.section-soft,
.upload-card,
.info-card,
.toolbar,
.admin-table-card {
    padding: 20px;
}

.featured-grid,
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.photo-card {
    display: grid;
    gap: 12px;
}

.photo-trigger {
    position: relative;
    border: none;
    padding: 0;
    background: transparent;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.photo-trigger img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.photo-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
}

.photo-date,
.photo-status {
    margin: 0;
}

.photo-date {
    font-weight: 600;
}

.photo-status {
    color: var(--muted);
    font-size: 0.92rem;
}

.like-button {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 10px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
}

.like-button.is-liked .heart {
    animation: pulseHeart 0.55s ease;
    color: var(--accent-strong);
}

.toolbar-form,
.upload-layout {
    display: grid;
    gap: 14px;
}

.toolbar-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.load-more-wrap {
    display: flex;
    justify-content: center;
}

.is-hidden {
    display: none !important;
}

.lightbox,
.loader-overlay,
.language-overlay {
    position: fixed;
    inset: 0;
}

.loader-overlay,
.language-overlay {
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(255, 250, 247, 0.84);
    z-index: 90;
}

.language-overlay {
    z-index: 91;
}

.language-card,
.loader-card {
    width: min(100%, 430px);
    text-align: center;
    padding: 28px;
}

.heart-loader {
    width: 42px;
    height: 42px;
    margin: 0 auto 14px;
    background: var(--accent-strong);
    transform: rotate(45deg);
    animation: heartbeat 1.2s infinite ease-in-out;
    position: relative;
}

.heart-loader::before,
.heart-loader::after {
    content: "";
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: inherit;
}

.heart-loader::before {
    left: -21px;
}

.heart-loader::after {
    top: -21px;
}

.dropzone {
    position: relative;
    min-height: 280px;
    border-radius: var(--radius);
    border: 1.5px dashed rgba(183, 111, 118, 0.28);
    background: linear-gradient(180deg, rgba(255, 247, 245, 0.96), rgba(255, 255, 255, 0.92));
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
}

.dropzone.is-dragover {
    border-color: var(--accent-strong);
    background: linear-gradient(180deg, rgba(255, 238, 236, 0.98), rgba(255, 255, 255, 0.96));
}

.dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.preview-item {
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
}

.preview-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.upload-progress {
    height: 10px;
    border-radius: 999px;
    background: rgba(183, 111, 118, 0.12);
    overflow: hidden;
}

.upload-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    transition: width 0.25s ease;
}

.upload-response {
    min-height: 24px;
    color: var(--muted);
}

.flash {
    padding: 14px 18px;
}

.flash-success {
    color: #2f6c48;
}

.flash-error {
    color: #7a3943;
}

.lightbox {
    z-index: 95;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(34, 22, 22, 0.85);
    padding: 24px 14px;
}

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

.lightbox-stage {
    max-width: 960px;
    width: 100%;
}

.lightbox-stage img {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 20px;
}

.lightbox-caption {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: rgba(255, 255, 255, 0.82);
    padding-top: 14px;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.site-footer {
    margin-top: 26px;
    border-radius: 24px;
    padding: 20px;
    text-align: center;
    color: var(--muted);
}

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

.reveal {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes heartbeat {
    0%, 100% { transform: rotate(45deg) scale(1); }
    30% { transform: rotate(45deg) scale(1.12); }
    60% { transform: rotate(45deg) scale(0.96); }
}

@keyframes pulseHeart {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

@media (min-width: 760px) {
    .site-shell {
        width: min(1240px, calc(100% - 42px));
        padding-top: 26px;
        padding-bottom: 48px;
    }

    .site-nav,
    .toolbar-form,
    .upload-layout,
    .hero,
    .featured-grid,
    .gallery-grid {
        display: grid;
    }

    .site-nav {
        display: flex;
    }

    .hero,
    .upload-layout {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: center;
    }

    .toolbar-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }

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

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

    .mobile-top-nav {
        display: none;
    }
}

@media (min-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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