:root {
    --surface: rgba(255, 255, 252, 0.95);
    --line: rgba(204, 148, 163, 0.18);
    --text: #5d5054;
    --muted: #908387;
    --accent: #cb7586;
    --accent-strong: #b45569;
    --heading: #9f262f;
    --success: #3d8b63;
    --success-soft: rgba(61, 139, 99, 0.12);
    --error: #a04b59;
    --error-soft: rgba(160, 75, 89, 0.12);
    --shadow: 0 24px 70px rgba(164, 129, 136, 0.08);
    --radius: clamp(24px, 3vw, 30px);
    --body-size: clamp(1rem, 0.25vw + 0.96rem, 1.06rem);
}

@font-face {
    font-family: "Abramo Script";
    src: url("./abramo-script.otf") format("opentype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(231, 217, 204, 0.65), transparent 28%),
        radial-gradient(circle at 100% 14%, rgba(244, 236, 228, 0.82), transparent 26%),
        linear-gradient(180deg, #f9f5ef 0%, #f1e8de 100%);
    font-family: "Aptos", "Segoe UI", sans-serif;
    font-size: var(--body-size);
    line-height: 1.65;
    overflow-x: hidden;
}

body.is-access-locked {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

.page-wash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 62%, rgba(232, 210, 215, 0.12), transparent 20%),
        radial-gradient(circle at 96% 74%, rgba(239, 226, 219, 0.16), transparent 24%);
}

.site-shell {
    width: min(1120px, calc(100% - 6px));
    margin: 0 auto;
}

.site-shell.is-access-locked {
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
}

.access-screen {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
}

.access-screen-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(245, 239, 232, 0.72);
    backdrop-filter: blur(18px);
}

.access-card {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: clamp(24px, 4vw, 32px);
    border: 1px solid rgba(204, 148, 163, 0.18);
    border-radius: clamp(24px, 3vw, 30px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.94)),
        radial-gradient(circle at top, rgba(250, 228, 233, 0.26), transparent 38%);
    box-shadow: 0 28px 80px rgba(164, 129, 136, 0.16);
    text-align: center;
}

.access-copy {
    margin: 14px auto 0;
    width: min(28rem, 100%);
    color: var(--muted);
    line-height: 1.75;
}

.access-form {
    display: grid;
    gap: 14px;
    margin-top: 24px;
    text-align: left;
}

.access-feedback {
    margin: 0;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--muted);
    line-height: 1.55;
}

.access-feedback.is-error {
    background: rgba(160, 75, 89, 0.08);
    color: var(--error);
}

.hero-card {
    position: relative;
    width: 100vw;
    min-height: 100svh;
    margin: 0 calc(50% - 50vw);
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
    border: 1px solid var(--line);
    border-top: 0;
    border-inline: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.94)),
        radial-gradient(circle at 50% 22%, rgba(250, 228, 233, 0.2), transparent 28%);
    box-shadow: var(--shadow);
    isolation: isolate;
}

.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    background-image: url("./hero-floral-reference.png");
    background-size: cover;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0;
    will-change: transform, opacity;
}

.hero-card::before {
    top: -2px;
    left: -2px;
    width: clamp(196px, 28vw, 320px);
    aspect-ratio: 523 / 746;
    background-position: top left;
    transform: translate3d(-34%, -34%, 0) scale(-0.84);
    transition:
        transform 1680ms cubic-bezier(0.22, 1, 0.36, 1) 260ms,
        opacity 1180ms ease 260ms;
}

.hero-card::after {
    right: -2px;
    bottom: -2px;
    width: clamp(220px, 33vw, 360px);
    aspect-ratio: 523 / 746;
    background-position: bottom right;
    transform: translate3d(34%, 34%, 0) scale(0.84);
    transition:
        transform 1680ms cubic-bezier(0.22, 1, 0.36, 1) 420ms,
        opacity 1180ms ease 420ms;
}

.hero-corners-active .hero-card::before {
    opacity: 0.94;
    transform: translate3d(0, 0, 0) scale(-1);
}

.hero-corners-active .hero-card::after {
    opacity: 0.94;
    transform: translate3d(0, 0, 0) scale(1);
}

.card-inner {
    position: relative;
    z-index: 1;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    padding: clamp(56px, 7vw, 88px) clamp(8px, 2vw, 18px);
    text-align: center;
}

.eyebrow {
    margin: 0;
    color: var(--muted);
    font-family: "Georgia", "Palatino Linotype", serif;
    font-size: clamp(0.68rem, 0.3vw + 0.64rem, 0.78rem);
    letter-spacing: clamp(0.18em, 0.35vw + 0.14em, 0.26em);
    text-transform: uppercase;
}

.hero-heading {
    margin: 0;
    color: var(--heading);
    font-family: "Cormorant Garamond", "Georgia", serif;
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 600;
    line-height: 0.96;
}

.hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 1.5vw, 10px);
    margin: 0;
    color: var(--heading);
    line-height: 1.02;
}

.hero-title span {
    font-family: "Abramo Script", "Snell Roundhand", "Segoe Script", "Brush Script MT", cursive;
    font-size: clamp(3.45rem, 11.8vw, 7.8rem);
    font-weight: 500;
    text-shadow:
        0.01em 0 0 currentColor,
        -0.01em 0 0 currentColor;
}

.hero-title small {
    display: inline-block;
    font-family: "Georgia", "Palatino Linotype", serif;
    font-size: clamp(0.82rem, 2.2vw, 1.3rem);
    letter-spacing: 0.18em;
    color: var(--muted);
    transform: translateY(-0.3em);
}

.hero-date {
    margin: clamp(0.3rem, 1.4vh, 0.85rem) 0 0;
    color: var(--heading);
    font-family: "Georgia", "Palatino Linotype", serif;
    font-size: clamp(0.86rem, 0.36vw + 0.8rem, 0.96rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.hero-copy {
    width: min(32rem, 100%);
    margin: clamp(1.25rem, 4vh, 2rem) 0 0;
    color: rgba(144, 131, 135, 0.78);
    font-size: clamp(0.92rem, 0.24vw + 0.88rem, 0.98rem);
    line-height: 1.85;
    text-wrap: pretty;
}

.upload-form,
.selection-state,
.status-panel {
    width: min(620px, 100%);
}

.upload-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(14px, 2.6vw, 18px);
    margin-top: clamp(22px, 4vw, 30px);
    padding: clamp(18px, 3vw, 24px);
    border: 1px solid rgba(204, 148, 163, 0.14);
    border-radius: clamp(22px, 3vw, 26px);
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(6px);
    text-align: left;
}

.field {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.field span {
    color: var(--muted);
    font-size: 0.94rem;
}

.field input {
    width: 100%;
    border: 1px solid rgba(204, 148, 163, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    font: inherit;
    font-size: max(16px, 1rem);
    padding: clamp(14px, 2.6vw, 15px) clamp(14px, 3vw, 16px);
    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.field input:focus {
    outline: none;
    border-color: rgba(180, 85, 105, 0.34);
    box-shadow: 0 0 0 4px rgba(203, 117, 134, 0.12);
    background: #ffffff;
}

.field-wide,
.form-actions,
.selection-state,
.status-panel {
    grid-column: 1 / -1;
}

.dropzone-wrap {
    position: relative;
}

.file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.dropzone {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 220px;
    padding: clamp(24px, 4vw, 32px);
    border: 1px dashed rgba(203, 117, 134, 0.34);
    border-radius: clamp(20px, 3vw, 24px);
    background:
        radial-gradient(circle at top, rgba(241, 214, 221, 0.54), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 242, 0.94));
    text-align: center;
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.dropzone:hover,
.dropzone.is-active {
    border-color: rgba(180, 85, 105, 0.34);
    box-shadow: 0 16px 34px rgba(180, 85, 105, 0.1);
    transform: translateY(-1px);
}

.dropzone strong {
    color: var(--heading);
    font-family: "Cormorant Garamond", "Georgia", serif;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 1;
}

.dropzone span {
    color: var(--muted);
    line-height: 1.7;
}

.dropzone-icon {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(241, 214, 221, 0.6);
    color: var(--accent-strong);
    font-size: 2rem;
    line-height: 1;
}

.selection-state,
.status-panel {
    margin-top: 16px;
    padding: clamp(18px, 3vw, 24px);
    border: 1px solid rgba(204, 148, 163, 0.14);
    border-radius: clamp(20px, 2.8vw, 24px);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.selection-summary,
.status-copy {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 12px;
}

.selection-summary strong,
.status-copy strong {
    color: var(--heading);
    font-family: "Cormorant Garamond", "Georgia", serif;
    font-size: clamp(1.45rem, 2.6vw, 1.8rem);
    font-weight: 600;
}

.selection-summary span,
.status-copy span,
.result-meta {
    color: var(--muted);
}

.file-list,
.result-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-list {
    grid-template-columns: repeat(auto-fill, minmax(88px, 88px));
    justify-content: center;
    gap: 10px;
}

.file-list li {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 8px;
    border: 1px solid rgba(204, 148, 163, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    min-width: 0;
}

.file-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle at top, rgba(241, 214, 221, 0.3), transparent 44%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 242, 0.94));
}

.file-preview.is-video::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(69, 48, 53, 0.52);
    box-shadow: 0 10px 20px rgba(69, 48, 53, 0.18);
    pointer-events: none;
}

.file-preview.is-video::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 0;
    height: 0;
    margin: auto;
    margin-left: calc(50% - 4px);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid #fff;
    pointer-events: none;
}

.file-preview-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-list li > div {
    display: block;
    width: 100%;
}

.file-list li .badge {
    min-width: 0;
    width: 100%;
    padding: 0.3rem 0.5rem;
    font-size: 0.74rem;
}

.result-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(204, 148, 163, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    min-width: 0;
}

.result-list li > div {
    display: grid;
    gap: 4px;
}

.result-list li > div:last-child {
    justify-items: end;
}

.result-list li.is-success {
    border-color: rgba(61, 139, 99, 0.18);
}

.result-list li.is-error {
    border-color: rgba(160, 75, 89, 0.18);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.75rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.badge.is-photo {
    color: var(--accent-strong);
    background: rgba(241, 214, 221, 0.56);
}

.badge.is-video {
    color: var(--heading);
    background: rgba(203, 117, 134, 0.14);
}

.badge.is-success {
    color: var(--success);
    background: var(--success-soft);
}

.badge.is-error {
    color: var(--error);
    background: var(--error-soft);
}

.result-link {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration: none;
}

.result-link:hover {
    text-decoration: underline;
}

.progress-track {
    width: 100%;
    height: 10px;
    margin-bottom: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(203, 117, 134, 0.14);
}

.progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #cf7988 0%, #b65468 100%);
    transition: width 140ms ease;
}

.form-actions {
    display: flex;
    justify-content: stretch;
    padding-top: 8px;
}

.form-actions .button {
    width: 100%;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(46px, 6vw, 50px);
    padding: 0 clamp(18px, 2.8vw, 22px);
    border: 1px solid var(--line);
    border-radius: 999px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, #cf7988 0%, #b65468 100%);
    border-color: rgba(180, 85, 105, 0.28);
    box-shadow: 0 14px 28px rgba(182, 84, 104, 0.16);
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-bottom: clamp(18px, 2.8vw, 26px);
}

.top-nav .button {
    width: auto;
    text-decoration: none;
}

.button-secondary {
    color: var(--accent-strong);
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(203, 117, 134, 0.16);
    box-shadow: 0 12px 28px rgba(164, 129, 136, 0.08);
}

.button-secondary.is-current {
    color: var(--heading);
    background: rgba(241, 214, 221, 0.56);
    border-color: rgba(180, 85, 105, 0.22);
}

.gallery-card {
    min-height: 100svh;
}

.gallery-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(22px, 3.4vw, 30px);
    min-height: 100svh;
    padding: clamp(52px, 7vw, 84px) clamp(8px, 2vw, 18px);
    text-align: center;
}

.gallery-inner .top-nav {
    align-self: center;
    justify-content: center;
    margin-bottom: 0;
}

.gallery-copy {
    width: min(50rem, 100%);
    margin: 0 auto;
}

.section-head {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 16px;
    flex-wrap: wrap;
    text-align: center;
}

.gallery-panel .section-head {
    width: min(52rem, 100%);
    margin-inline: auto;
}

.section-title {
    margin: 0;
    color: var(--heading);
    font-family: "Cormorant Garamond", "Georgia", serif;
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    font-weight: 600;
    line-height: 1;
}

.section-meta {
    color: var(--muted);
    font-size: 0.94rem;
}

.gallery-panel {
    --gallery-frame-gap: clamp(3px, 0.7vw, 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(16px, 2.8vw, 22px);
    width: calc(100vw - (var(--gallery-frame-gap) * 2));
    min-height: clamp(40rem, 92svh, 100svh);
    margin-inline: calc(50% - 50vw + var(--gallery-frame-gap));
    padding: clamp(18px, 3vw, 24px);
    border: 1px solid rgba(204, 148, 163, 0.14);
    border-radius: clamp(22px, 3vw, 26px);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.gallery-collection {
    --gallery-gap: 2px;
    display: grid;
    width: 100%;
    min-height: calc(100svh - clamp(138px, 14vw, 178px));
    align-content: start;
    gap: var(--gallery-gap);
}

.gallery-slideshow-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
}

.gallery-slideshow-card[hidden] {
    display: none;
}

.slideshow-frame {
    position: relative;
    width: 100%;
    min-height: clamp(220px, 30vw, 340px);
    max-height: min(42svh, 340px);
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    background:
        radial-gradient(circle at top, rgba(241, 214, 221, 0.44), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 242, 0.94));
    aspect-ratio: 16 / 7.8;
    isolation: isolate;
}

.slideshow-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-slide {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0;
    transform: scale(1.03);
    cursor: pointer;
    transition:
        opacity 560ms ease,
        transform 900ms ease;
}

.slideshow-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

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

.slideshow-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(38, 24, 28, 0.04), rgba(38, 24, 28, 0.18));
}

.slideshow-controls {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.slideshow-button {
    position: absolute;
    top: 50%;
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(225, 190, 198, 0.96);
    cursor: pointer;
    pointer-events: auto;
    opacity: 0.88;
    filter: drop-shadow(0 6px 16px rgba(56, 36, 40, 0.26));
    transform: translateY(-50%);
    transition:
        opacity 180ms ease,
        filter 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.slideshow-button:hover,
.slideshow-button:focus-visible {
    opacity: 1;
    color: rgba(245, 226, 231, 0.98);
    filter: drop-shadow(0 10px 22px rgba(56, 36, 40, 0.34));
    outline: none;
}

.slideshow-button::before,
.lightbox-arrow::before {
    content: "";
    width: 18px;
    height: 18px;
    display: block;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transition: transform 180ms ease;
}

#slideshow-prev,
.lightbox-arrow-prev {
    left: clamp(14px, 2vw, 20px);
}

#slideshow-next,
.lightbox-arrow-next {
    right: clamp(14px, 2vw, 20px);
}

#slideshow-prev::before,
.lightbox-arrow-prev::before {
    transform: rotate(135deg);
}

#slideshow-next::before,
.lightbox-arrow-next::before {
    transform: rotate(-45deg);
}

#slideshow-prev:hover::before,
#slideshow-prev:focus-visible::before,
.lightbox-arrow-prev:hover::before,
.lightbox-arrow-prev:focus-visible::before {
    transform: translateX(-1px) rotate(135deg);
}

#slideshow-next:hover::before,
#slideshow-next:focus-visible::before,
.lightbox-arrow-next:hover::before,
.lightbox-arrow-next:focus-visible::before {
    transform: translateX(1px) rotate(-45deg);
}

.slideshow-dots {
    position: absolute;
    left: 50%;
    bottom: clamp(16px, 3vw, 24px);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
}

.slideshow-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
    transition:
        transform 180ms ease,
        background-color 180ms ease;
}

.slideshow-dot[aria-current="true"] {
    background: #ffffff;
    transform: scale(1.14);
}

.slideshow-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    text-align: center;
    color: var(--muted);
    background:
        radial-gradient(circle at top, rgba(241, 214, 221, 0.36), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 246, 242, 0.94));
}

.slideshow-empty p {
    margin: 10px 0 0;
}

.gallery-status,
.empty-gallery {
    padding: 18px 20px;
    border: 1px dashed rgba(203, 117, 134, 0.28);
    border-radius: 18px;
    background: rgba(251, 246, 242, 0.94);
    color: var(--muted);
}

.gallery-status.is-error {
    border-color: rgba(160, 75, 89, 0.24);
    background: rgba(160, 75, 89, 0.06);
    color: var(--error);
}

.gallery-status {
    width: min(52rem, 100%);
    margin-inline: auto;
    text-align: center;
}

.gallery-grid {
    --gallery-columns: 6;
    position: relative;
    display: block;
    width: 100%;
    min-height: clamp(24rem, 58svh, 76svh);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
}

.media-card {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    min-width: 0;
    padding: calc(var(--gallery-gap) / 2);
    border: 0;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: opacity 180ms ease;
    will-change: transform;
}

.media-card:hover,
.media-card:focus-visible {
    opacity: 0.98;
    outline: none;
}

.media-card-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: rgba(247, 240, 234, 0.92);
    border-radius: 0;
}

.media-card-frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 420ms ease;
}

.media-card:hover .media-card-frame img,
.media-card:focus-visible .media-card-frame img {
    transform: scale(1.035);
}

.media-card-frame.is-fallback::before {
    content: "Moment";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--heading);
    font-family: "Cormorant Garamond", "Georgia", serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
}

.media-card-play {
    position: absolute;
    inset: 0;
    margin: auto;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(69, 48, 53, 0.6);
    box-shadow: 0 14px 24px rgba(69, 48, 53, 0.18);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.media-card-play::before {
    content: "";
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #fff;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(76, 60, 64, 0.48);
    backdrop-filter: blur(14px);
}

.lightbox-panel {
    position: relative;
    width: min(1120px, 100%);
    max-height: calc(100svh - 48px);
    overflow: hidden;
    padding: clamp(12px, 2vw, 18px);
    border: 1px solid rgba(204, 148, 163, 0.14);
    border-radius: clamp(22px, 3vw, 26px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(253, 250, 246, 0.94)),
        radial-gradient(circle at 50% 22%, rgba(250, 228, 233, 0.2), transparent 28%);
    box-shadow: 0 28px 80px rgba(59, 39, 44, 0.2);
}

.lightbox-stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: min(82svh, 820px);
    padding: clamp(18px, 3vw, 28px);
    overflow: hidden;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(241, 214, 221, 0.3), transparent 38%),
        linear-gradient(180deg, rgba(249, 245, 239, 0.98), rgba(241, 232, 222, 0.92));
}

.lightbox-stage img,
.lightbox-stage video {
    width: auto;
    max-width: 100%;
    max-height: min(76svh, 760px);
    display: block;
    object-fit: contain;
}

.lightbox-close,
.lightbox-arrow {
    position: absolute;
    display: inline-grid;
    place-items: center;
    z-index: 2;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition:
        transform 180ms ease,
        opacity 180ms ease,
        color 180ms ease,
        filter 180ms ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-arrow:hover,
.lightbox-arrow:focus-visible {
    outline: none;
}

.lightbox-close {
    top: clamp(16px, 2.4vw, 22px);
    right: clamp(16px, 2.4vw, 22px);
    width: 46px;
    height: 46px;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    transform: translateY(-1px);
}

.lightbox-close::before,
.lightbox-close::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 1.8px;
    border-radius: 999px;
    background: currentColor;
}

.lightbox-close::before {
    transform: rotate(45deg);
}

.lightbox-close::after {
    transform: rotate(-45deg);
}

.lightbox-arrow {
    top: 50%;
    width: 54px;
    min-width: 54px;
    height: 54px;
    color: rgba(221, 186, 192, 0.96);
    filter: drop-shadow(0 6px 16px rgba(56, 36, 40, 0.16));
    transform: translateY(-50%);
}

.lightbox-arrow:hover,
.lightbox-arrow:focus-visible {
    color: var(--accent);
    filter: drop-shadow(0 10px 22px rgba(56, 36, 40, 0.22));
}

.slideshow-button[disabled],
.lightbox-close[disabled],
.lightbox-arrow[disabled] {
    opacity: 0.34;
    cursor: default;
    filter: none;
}

.lightbox-close[disabled] {
    transform: none;
}

.slideshow-button[disabled] {
    transform: translateY(-50%);
}

.lightbox-arrow[disabled] {
    transform: translateY(-50%);
}

body.is-lightbox-open {
    overflow: hidden;
}

@media (max-width: 960px) {
    .gallery-grid {
        --gallery-columns: 3;
    }
}

@media (max-width: 640px) {
    .site-shell {
        width: min(100% - 4px, 1120px);
    }

    .access-screen {
        padding: 14px;
    }

    .access-card {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .hero-inner {
        justify-content: flex-start;
        padding:
            max(28px, env(safe-area-inset-top, 0px) + 16px)
            clamp(6px, 3vw, 12px)
            max(24px, env(safe-area-inset-bottom, 0px) + 16px);
    }

    .hero-title {
        gap: clamp(0.05rem, 0.7vw, 0.24rem);
        max-width: min(20rem, 100%);
    }

    .hero-heading {
        font-size: clamp(2.4rem, 10vw, 3.4rem);
    }

    .hero-title span {
        font-size: clamp(3.15rem, 14.2vw, 4.2rem);
    }

    .hero-title small {
        font-size: clamp(0.52rem, 2vw, 0.64rem);
    }

    .hero-copy {
        font-size: clamp(0.72rem, 0.26rem + 1.2vw, 0.82rem);
        line-height: 1.75;
    }

    .upload-form,
    .selection-state,
    .status-panel {
        width: 100%;
    }

    .upload-form {
        gap: 14px;
        margin-top: 18px;
        padding: 16px;
        border-radius: 22px;
    }

    .dropzone {
        min-height: 180px;
        padding: 22px 18px;
    }

    .dropzone strong {
        font-size: 1.75rem;
    }

    .selection-summary,
    .status-copy,
    .result-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-list {
        grid-template-columns: repeat(auto-fill, minmax(74px, 74px));
        justify-content: center;
        gap: 8px;
    }

    .result-list li > div:last-child {
        justify-items: start;
    }

    .selection-state,
    .status-panel {
        margin-top: 12px;
        padding: 16px;
    }

    .hero-card::before {
        width: 146px;
    }

    .hero-card::after {
        width: 168px;
    }

    .button {
        width: 100%;
    }

    .top-nav .button {
        flex: 1 1 0;
    }

    .gallery-inner {
        padding:
            max(28px, env(safe-area-inset-top, 0px) + 16px)
            clamp(6px, 3vw, 12px)
            max(24px, env(safe-area-inset-bottom, 0px) + 16px);
    }

    .gallery-panel {
        --gallery-frame-gap: 2px;
        min-height: clamp(34rem, 96svh, 100svh);
        padding: 12px;
        border-radius: 22px;
    }

    .gallery-collection {
        min-height: calc(100svh - 124px);
    }

    .gallery-grid {
        min-height: clamp(22rem, 62svh, 78svh);
    }

    .gallery-inner .top-nav .button {
        flex: 1 1 0;
    }

    .section-head {
        align-items: flex-start;
    }

    .gallery-panel .section-head {
        align-items: center;
    }

    .slideshow-frame {
        width: 100%;
        min-height: clamp(170px, 40vw, 230px);
        max-height: 230px;
        aspect-ratio: 16 / 9.2;
    }

    .slideshow-controls {
        inset: 0;
    }

    .slideshow-button {
        width: 46px;
        height: 46px;
    }

    .slideshow-dots {
        bottom: 14px;
    }

    .lightbox {
        padding: 12px;
    }

    .lightbox-panel {
        max-height: calc(100svh - 24px);
        padding: 10px;
    }

    .lightbox-stage {
        min-height: 52svh;
        padding: 14px 10px;
        border-radius: 18px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }

    .lightbox-arrow {
        width: 44px;
        min-width: 44px;
        height: 44px;
    }

    #slideshow-prev,
    .lightbox-arrow-prev {
        left: 10px;
    }

    #slideshow-next,
    .lightbox-arrow-next {
        right: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card::before,
    .hero-card::after {
        transition: none;
    }

    .hero-card::before,
    .hero-corners-active .hero-card::before {
        opacity: 0.94;
        transform: translate3d(0, 0, 0) scale(-1);
    }

    .hero-card::after,
    .hero-corners-active .hero-card::after {
        opacity: 0.94;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

/* Upload-Status-Modal */
body.is-status-modal-open {
    overflow: hidden;
}

.site-shell.is-status-modal-open {
    filter: blur(10px);
    pointer-events: none;
    user-select: none;
}

.upload-status-screen {
    z-index: 80;
}

.status-modal {
    width: min(560px, 100%);
    text-align: left;
}

.status-modal .status-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
}

.status-modal .status-copy strong {
    line-height: 1;
}

.status-modal .status-copy span {
    line-height: 1.7;
}

.status-note {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(241, 214, 221, 0.28);
    color: var(--muted);
    line-height: 1.6;
}

.status-modal .progress-track {
    margin: 0 0 16px;
}

.status-modal .result-list {
    max-height: min(38svh, 320px);
    overflow: auto;
}

.status-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(159, 38, 47, 0.72);
    cursor: pointer;
    transition:
        transform 180ms ease,
        color 180ms ease,
        opacity 180ms ease;
}

.status-close:hover,
.status-close:focus-visible {
    color: var(--heading);
    transform: translateY(-1px);
    outline: none;
}

.status-close::before,
.status-close::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 16px;
    height: 1.8px;
    margin: auto;
    border-radius: 999px;
    background: currentColor;
}

.status-close::before {
    transform: rotate(45deg);
}

.status-close::after {
    transform: rotate(-45deg);
}

.status-gallery-link {
    display: inline-flex;
    margin-top: 16px;
    color: var(--accent-strong);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.status-gallery-link:hover,
.status-gallery-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

@media (max-width: 640px) {
    .status-modal {
        width: min(100%, 560px);
        padding-top: 52px;
    }

    .status-close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .status-modal .result-list {
        max-height: min(42svh, 280px);
    }
}
