* {
    box-sizing: border-box;
}

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

body {
    font-family: "Cormorant Garamond", Georgia, serif;
    color: #3a342e;
    background: #fbf6ea;
    min-height: 100vh;
    overflow-x: hidden;
}

.leaves {
    position: fixed;
    top: 0;
    height: 100vh;
    width: clamp(120px, 18vw, 240px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.85;
}

.leaves-left { left: 0; }
.leaves-right { right: 0; transform: scaleX(-1); }

@media (max-width: 640px) {
    .leaves { width: 80px; opacity: 0.55; }
}

.site-header {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1.5rem 1rem;
}

.site-title {
    font-family: "Great Vibes", "Parisienne", cursive;
    font-weight: 400;
    font-size: clamp(2.8rem, 6vw, 4.2rem);
    color: #c17a45;
    margin: 0 0 1.5rem;
    line-height: 1;
    letter-spacing: 0.01em;
}

.site-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1.25rem, 4vw, 2.75rem);
}

.site-nav a {
    font-family: "Cormorant Garamond", serif;
    font-size: 0.95rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #b3a99c;
    text-decoration: none;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.site-nav a:hover { color: #6b4f42; }
.site-nav a.active { color: #3a342e; font-weight: 600; }

.page {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem clamp(1.25rem, 5vw, 3rem) 4rem;
    text-align: center;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.illustration {
    width: min(100%, 520px);
    aspect-ratio: 1 / 1;
    margin: 1rem 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(170, 200, 215, 0.35), transparent 60%),
        radial-gradient(ellipse at 30% 70%, rgba(180, 200, 160, 0.4), transparent 65%),
        radial-gradient(ellipse at 75% 75%, rgba(210, 180, 140, 0.35), transparent 60%),
        #fbf7f0;
}

.illustration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.placeholder-text {
    font-family: "Great Vibes", cursive;
    color: #b3a99c;
    font-size: 1.5rem;
    display: none;
}

.illustration.empty .placeholder-text { display: block; }

.ornament {
    margin: 0.5rem 0 1.75rem;
    width: 160px;
}
.ornament svg { width: 100%; height: auto; display: block; }

.hero-place {
    font-family: "Great Vibes", cursive;
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    color: #c17a45;
    margin: 0 0 1rem;
    line-height: 1;
}

.hero-date {
    font-size: 0.95rem;
    letter-spacing: 0.32em;
    color: #6b6258;
    margin: 0 0 0.6rem;
    font-weight: 500;
}

.hero-countdown {
    font-size: 0.9rem;
    letter-spacing: 0.25em;
    color: #b3a99c;
    margin: 0;
    text-transform: uppercase;
    min-height: 1.2em;
}

.rsvp-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.85rem 2.5rem;
    font-family: "Cormorant Garamond", serif;
    font-size: 0.95rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #3a342e;
    background: transparent;
    border: 1px solid #3a342e;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.rsvp-btn:hover {
    background: #3a342e;
    color: #ffffff;
}

.section-title {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-size: clamp(2rem, 4.5vw, 2.6rem);
    color: #c17a45;
    margin: 4rem 0 1.5rem;
}

.timeline-section {
    margin-top: 1rem;
}

.timeline {
    list-style: none;
    margin: 0 auto;
    padding: 0 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.5rem;
    position: relative;
    max-width: 820px;
    overflow-x: auto;
    scrollbar-width: none;
}

.timeline::-webkit-scrollbar { display: none; }

.timeline::before {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 50%;
    height: 1px;
    background: rgba(193, 122, 69, 0.4);
    z-index: 0;
}

.timeline li {
    flex: 1 0 auto;
    min-width: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.timeline li::before {
    content: "";
    order: 2;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c17a45;
    box-shadow: 0 0 0 4px #fbf6ea;
}

.timeline .t-time {
    order: 1;
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    color: #6b6258;
    font-weight: 500;
    min-height: 2.6rem;
    display: flex;
    align-items: flex-end;
}

.timeline .t-title {
    order: 3;
    font-family: "Great Vibes", cursive;
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    color: #c17a45;
    line-height: 1.15;
    text-align: center;
    min-height: 2.6rem;
    display: flex;
    align-items: flex-start;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .timeline {
        justify-content: flex-start;
        padding-bottom: 1.5rem;
        scroll-snap-type: x mandatory;
    }
    .timeline li {
        min-width: 110px;
        scroll-snap-align: center;
    }
    .timeline .t-time { font-size: 0.82rem; letter-spacing: 0.18em; }
    .timeline .t-title { font-size: 1.4rem; }
}

.location-section {
    margin-top: 2rem;
}

.map-frame {
    width: min(100%, 720px);
    margin: 0 auto 1rem;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border: 1px solid rgba(120, 100, 75, 0.15);
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    filter: saturate(0.8) sepia(0.12);
}

.map-link {
    margin: 0;
    font-size: 1rem;
    font-style: italic;
}

.map-link a {
    color: #c17a45;
    text-decoration: none;
    border-bottom: 1px solid rgba(193, 122, 69, 0.4);
}
.map-link a:hover { border-bottom-color: #c17a45; }

/* menu page */
.menu-list {
    margin-top: 1rem;
}

.menu-list h2 {
    font-family: "Cormorant Garamond", serif;
    font-size: 0.95rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: #b3a99c;
    font-weight: 500;
    margin: 2.5rem 0 0.75rem;
}

.menu-list h2:first-child { margin-top: 0.5rem; }

.menu-list p {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin: 0;
    color: #3a342e;
}

/* estate map page */
.estate-map {
    width: 100%;
    max-width: 900px;
    margin: 1rem auto 1.5rem;
    border: 1px solid rgba(120, 100, 75, 0.2);
    background: #fbf6ea;
    overflow: hidden;
}

.estate-map svg {
    width: 100%;
    height: auto;
    display: block;
}

.label-title {
    font-family: "Great Vibes", cursive;
    font-size: 26px;
    fill: #3a342e;
}

.label-sub {
    font-family: "Cormorant Garamond", serif;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    fill: #6b6258;
}

.street-label {
    font-family: "Cormorant Garamond", serif;
    font-size: 13px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    fill: #8a7a60;
    opacity: 0.8;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem 2rem;
    margin: 1rem auto 0;
    max-width: 700px;
    text-align: left;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1rem;
    color: #3a342e;
}

.legend-swatch {
    width: 22px;
    height: 22px;
    border: 1.5px solid #7a5a3f;
    display: inline-block;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .label-title { font-size: 22px; }
    .label-sub { font-size: 11px; letter-spacing: 0.14em; }
    .map-legend { gap: 0.75rem 1.25rem; font-size: 0.9rem; }
}

/* upload page */
.upload-page { max-width: 760px; }

.upload-lead {
    font-size: 1.15rem;
    color: #6b6258;
    margin: 0 0 2rem;
    line-height: 1.5;
}

.upload-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 2.5rem 1.5rem;
    border: 1.5px dashed rgba(193, 122, 69, 0.6);
    background: #fdfaf3;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.upload-drop:hover,
.upload-drop.drag-active {
    background: #f7efe0;
    border-color: #c17a45;
}

.upload-drop-title {
    font-size: 1.2rem;
    color: #3a342e;
    letter-spacing: 0.05em;
}

.upload-drop-hint {
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #b3a99c;
}

.upload-status {
    margin: 1.25rem 0 0;
    font-style: italic;
    color: #4f7a4a;
}

.upload-status.error { color: #a14e3a; }

.upload-gallery {
    margin: 2rem 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.6rem;
}

.gallery-empty {
    grid-column: 1 / -1;
    color: #b3a99c;
    font-style: italic;
    margin: 0;
}

.thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f7efe0;
}

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

.thumb-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(58, 52, 46, 0.7);
    color: #fdfaf3;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

.thumb:hover .thumb-del { opacity: 1; }

.upload-projector-link {
    margin: 1.5rem 0 0;
    font-size: 0.95rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.upload-projector-link a {
    color: #c17a45;
    text-decoration: none;
    border-bottom: 1px solid rgba(193, 122, 69, 0.4);
}

/* slideshow page */
.slideshow-body {
    margin: 0;
    background: #000;
    color: #fdfaf3;
    overflow: hidden;
    height: 100vh;
}

.slideshow {
    position: fixed;
    inset: 0;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #000;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.slide.active { opacity: 1; }

.slideshow-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fdfaf3;
    padding: 2rem;
}

.slideshow-empty h1 {
    font-family: "Great Vibes", cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #e6a877;
    margin: 0 0 1.5rem;
}

.slideshow-empty p {
    font-size: 1.3rem;
    line-height: 1.5;
    color: #c9bfb1;
    margin: 0;
}

/* mobile */
@media (max-width: 720px) {
    .site-header {
        padding: 2rem 1rem 0.75rem;
    }
    .site-title {
        font-size: clamp(2.4rem, 12vw, 3.4rem);
        margin-bottom: 1rem;
    }
    .site-nav {
        gap: 0.9rem 1.3rem;
        padding: 0 0.5rem;
    }
    .site-nav a {
        font-size: 0.78rem;
        letter-spacing: 0.18em;
    }
    .page {
        padding: 1.5rem 1rem 3rem;
    }
    .illustration {
        margin: 0.5rem 0 1.25rem;
    }
    .ornament { width: 130px; margin: 0.25rem 0 1.25rem; }
    .hero-place { font-size: clamp(1.7rem, 7vw, 2.2rem); }
    .hero-date { font-size: 0.78rem; letter-spacing: 0.22em; }
    .hero-countdown { font-size: 0.75rem; letter-spacing: 0.18em; }
    .rsvp-btn {
        margin-top: 1.5rem;
        padding: 0.8rem 1.75rem;
        font-size: 0.82rem;
        letter-spacing: 0.22em;
    }
    .section-title { margin: 2.5rem 0 1rem; }
    .map-frame { aspect-ratio: 4 / 5; }
    .menu-list h2 { font-size: 0.8rem; letter-spacing: 0.25em; margin: 1.75rem 0 0.5rem; }
    .menu-list p { font-size: 1.15rem; }
    .upload-lead { font-size: 1rem; }
    .upload-drop { padding: 2rem 1rem; }
    .upload-drop-title { font-size: 1.05rem; text-align: center; }
    .upload-drop-hint { font-size: 0.72rem; letter-spacing: 0.15em; text-align: center; }
    .upload-gallery {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.4rem;
    }
    .thumb-del { opacity: 1; }
    .slideshow-empty h1 { font-size: clamp(2.5rem, 14vw, 4rem); }
    .slideshow-empty p { font-size: 1rem; }
}

@media (max-width: 420px) {
    .leaves { display: none; }
    .site-nav { gap: 0.7rem 1rem; }
    .site-nav a { font-size: 0.72rem; letter-spacing: 0.15em; }
    .site-title { font-size: clamp(2.2rem, 13vw, 3rem); }
}
