:root {
    --bg: #f7f3ea;
    --ink: #1f2a2b;
    --muted: #5f6768;
    --card: rgba(255, 255, 255, 0.72);
    --line: rgba(34, 48, 49, 0.15);
    --accent: #ca5b1f;
    --accent-2: #2c7168;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(1200px 700px at 5% -10%, #ffe2b2 0%, transparent 70%),
        radial-gradient(900px 650px at 95% 0%, #b8dfd8 0%, transparent 70%),
        linear-gradient(180deg, #f9f5ee 0%, #efe7da 100%);
}

.ambient {
    position: fixed;
    border-radius: 999px;
    filter: blur(40px);
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.ambient-a {
    width: 300px;
    height: 300px;
    background: #ff9a58;
    top: 10vh;
    left: -100px;
}

.ambient-b {
    width: 340px;
    height: 340px;
    background: #4aa399;
    right: -110px;
    bottom: 5vh;
}

.layout {
    width: min(1200px, 92vw);
    margin: 2rem auto 3rem;
    animation: rise 500ms ease-out;
}

.topbar {
    display: block;
    margin-bottom: 1.4rem;
}

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

h1 {
    margin: 0.3rem 0;
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 4.8vw, 4rem);
    line-height: 1;
}

.sub {
    margin: 0;
    color: var(--muted);
}

.panel {
    padding: 1rem;
    border: 1px solid var(--line);
    background: var(--card);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(35, 42, 45, 0.08);
}

.event-form {
    display: grid;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
}

.event-form label {
    font-weight: 700;
    font-size: 0.9rem;
}

select {
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}

.hint {
    display: block;
    padding: 0.5rem 0.6rem;
    border-radius: 8px;
    background: rgba(31, 42, 43, 0.07);
    font-size: 0.78rem;
    overflow-x: auto;
}

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.section-title h2 {
    margin: 0;
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
}

.section-title p {
    margin: 0;
    color: var(--muted);
}

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

.card {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #fff;
    cursor: zoom-in;
    transition: transform 180ms ease, box-shadow 180ms ease;
    opacity: 0;
    animation: cardIn 450ms ease forwards;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 34px rgba(18, 27, 28, 0.14);
}

.card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.8rem;
    font-size: 0.86rem;
}

.meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
}

.meta a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.empty {
    border: 1px dashed var(--line);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
}

.empty h2,
.empty h3 {
    margin-top: 0;
    font-family: 'Syne', sans-serif;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.86);
    padding: 1rem;
    z-index: 20;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    margin: 0;
    max-width: min(92vw, 1200px);
    max-height: 86vh;
    display: grid;
    gap: 0.8rem;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border-radius: 12px;
}

.lightbox-content figcaption {
    color: #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.lightbox-content a {
    color: #fff;
    background: var(--accent);
    padding: 0.5rem 0.8rem;
    border-radius: 9px;
    text-decoration: none;
    font-weight: 700;
}

.close,
.nav {
    border: none;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .topbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .layout {
        margin-top: 1.2rem;
    }
}

@media (max-width: 640px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.7rem;
    }

    .card img {
        height: 160px;
    }

    .nav {
        width: 42px;
        height: 42px;
        font-size: 1.6rem;
    }
}
