:root {
    --bg: #f7f1ea;
    --bg-soft: #fffaf5;
    --surface: rgba(255, 250, 245, 0.9);
    --surface-strong: #ffffff;
    --surface-muted: #f3e5d6;
    --text: #4a3b31;
    --text-soft: #7a6659;
    --line: rgba(122, 102, 89, 0.15);
    --accent: #c89f87;
    --accent-deep: #a8765f;
    --shadow: 0 18px 45px rgba(90, 63, 44, 0.12);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.8), transparent 32%),
        radial-gradient(circle at top right, rgba(231, 212, 194, 0.55), transparent 26%),
        linear-gradient(180deg, #fbf7f2 0%, #f6efe7 45%, #f2e6db 100%);
}

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

.page-shell {
    padding: 24px 16px 48px;
}

.site-wrap {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.hero-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 24px;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(255, 251, 247, 0.96), rgba(247, 237, 227, 0.88));
    box-shadow: var(--shadow);
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(200, 159, 135, 0.18), transparent 70%);
}

.hero-copy h1,
.section-heading h2,
.upload-card h2,
.stats-card h2,
.photo-card h3,
.admin-photo-card h3,
.empty-state h3 {
    margin: 0;
    font-family: "Cormorant Garamond", serif;
    letter-spacing: 0.01em;
}

.hero-copy h1 {
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    line-height: 0.92;
    margin-bottom: 12px;
}

.hero-text,
.photo-caption,
.empty-state p,
.admin-meta,
.feed-status {
    color: var(--text-soft);
}

.caption-examples {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.65);
}

.caption-examples p,
.caption-examples ul {
    margin: 0;
}

.caption-examples p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.caption-examples ul {
    padding-left: 18px;
    color: var(--text-soft);
}

.caption-examples li + li {
    margin-top: 6px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-deep);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-meta span {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    font-size: 0.92rem;
}

.upload-card,
.stats-card {
    position: relative;
    z-index: 1;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
}

.upload-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 0.92rem;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    color: var(--text);
    font: inherit;
    border: 1px solid rgba(122, 102, 89, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.95);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: rgba(168, 118, 95, 0.6);
    box-shadow: 0 0 0 4px rgba(200, 159, 135, 0.16);
}

.image-preview {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--bg-soft);
}

.image-preview img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.button-primary,
.button-secondary,
.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.button-primary:hover,
.button-secondary:hover,
.button-danger:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
}

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

.button-danger {
    color: #fff;
    background: linear-gradient(135deg, #9f6c61, #c0877c);
}

.feed-section {
    margin-top: 28px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.masonry-grid {
    column-count: 1;
    column-gap: 18px;
}

.photo-card,
.empty-state,
.admin-photo-card {
    break-inside: avoid;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid rgba(122, 102, 89, 0.12);
    background: rgba(255, 252, 248, 0.94);
    box-shadow: 0 14px 35px rgba(90, 63, 44, 0.08);
}

.photo-frame {
    background: #ead9ca;
}

.photo-frame img,
.admin-photo-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.photo-body,
.admin-photo-body,
.empty-state {
    padding: 18px;
}

.photo-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.photo-header h3 {
    font-size: 2rem;
}

.photo-header time,
.admin-meta {
    font-size: 0.85rem;
}

.admin-wrap .hero-card {
    align-items: start;
}

.admin-grid {
    display: grid;
    gap: 18px;
}

.admin-photo-card {
    display: grid;
}

.admin-photo-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.toast-stack {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    display: grid;
    gap: 10px;
    max-width: min(380px, calc(100vw - 36px));
}

.toast {
    padding: 14px 16px;
    color: #fff;
    border-radius: 16px;
    background: rgba(74, 59, 49, 0.92);
    box-shadow: 0 14px 28px rgba(74, 59, 49, 0.2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.toast-error {
    background: rgba(145, 78, 68, 0.94);
}

.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

@media (min-width: 760px) {
    .page-shell {
        padding: 34px 24px 56px;
    }

    .hero-card {
        grid-template-columns: minmax(0, 1.15fr) minmax(320px, 420px);
        padding: 36px;
    }

    .masonry-grid {
        column-count: 2;
    }

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

@media (min-width: 1080px) {
    .masonry-grid {
        column-count: 3;
    }

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