@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&family=Montserrat:wght@700;800;900&family=Rouge+Script&display=swap');

:root {
    --background: #FFFCF8;
    --background-soft: #F8F4EE;
    --title: #5E7084;
    --text: #70767C;
    --button: #AFC4D8;
    --button-hover: #96B2CC;
    --accent: #D9E4EE;
    --accent-soft: #EEF4F8;
    --decorative: #D9E4EE;
    --bg: var(--background);
    --paper: var(--background-soft);
    --ink: var(--text);
    --muted: var(--text);
    --line: var(--decorative);
    --accent-dark: var(--title);
    --sage: var(--button);
    --action: var(--button);
    --action-hover: var(--button-hover);
    --action-text: var(--title);
    --white: #ffffff;
    --shadow: 0 22px 60px rgba(94, 112, 132, 0.14);
    --hero-image: url("../assets/images/hero-placeholder.svg");
    --detail-image: url("../assets/images/detail-placeholder.svg");
}

body[data-palette="dulce"] {
    --background: #FFF9F8;
    --background-soft: #FDF3F4;
    --title: #7A5660;
    --text: #6F6A6C;
    --button: #D9A3B4;
    --button-hover: #C98EA2;
    --accent: #EBC8D2;
    --decorative: #F4DEE5;
    --shadow: 0 22px 60px rgba(122, 86, 96, 0.14);
}

body[data-palette="brisa"] {
    --background: #F7FAFD;
    --background-soft: #EDF4FA;
    --title: #4C6075;
    --text: #66717C;
    --button: #89A9C9;
    --button-hover: #7398BE;
    --accent: #C9DCEC;
    --decorative: #E2ECF5;
    --shadow: 0 22px 60px rgba(76, 96, 117, 0.14);
}

body[data-palette="natura"] {
    --background: #FAFCF8;
    --background-soft: #F1F6EE;
    --title: #5E7464;
    --text: #6C746E;
    --button: #91B097;
    --button-hover: #7E9F84;
    --accent: #CFE0D0;
    --decorative: #E7F0E6;
    --shadow: 0 22px 60px rgba(94, 116, 100, 0.14);
}

body[data-palette="dulce"],
body[data-palette="brisa"],
body[data-palette="natura"] {
    --bg: var(--background);
    --paper: var(--background-soft);
    --ink: var(--text);
    --muted: var(--text);
    --line: var(--decorative);
    --accent-dark: var(--title);
    --sage: var(--button);
    --action: var(--button);
    --action-hover: var(--button-hover);
    --action-text: #ffffff;
}

body[data-palette="home"] {
    --background: #fffaf6;
    --background-soft: #fffdf9;
    --title: #1d2a33;
    --text: #7a7772;
    --button: #cf7b76;
    --button-hover: #c66f68;
    --decorative: #eaded4;
    --bg: #fffaf6;
    --paper: #fffdf9;
    --ink: #1d2a33;
    --muted: #7a7772;
    --line: #eaded4;
    --accent: #cf7b76;
    --accent-dark: #c66f68;
    --sage: #6f998d;
    --action: #cf7b76;
    --action-hover: #c66f68;
    --action-text: #ffffff;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(90, 70, 58, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
}

[hidden] {
    display: none !important;
}

h1,
h2,
h3 {
    margin: 0;
    color: var(--title);
    font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
    line-height: 1.05;
}

a {
    color: inherit;
}

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

.home-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 2% 5%, rgba(207, 123, 118, 0.12), transparent 24%),
        radial-gradient(circle at 96% 86%, rgba(207, 123, 118, 0.12), transparent 22%),
        linear-gradient(180deg, #fffaf6 0%, #fffdfb 52%, #fff9f4 100%);
}

.home-hero {
    position: relative;
    min-height: 72vh;
    display: grid;
    place-items: center;
    padding: 58px 24px 44px;
    overflow: hidden;
}

.event-access {
    position: absolute;
    top: 48px;
    right: max(24px, calc((100vw - 1160px) / 2));
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(220px, 300px) 64px;
    gap: 10px;
    align-items: start;
}

.event-access input {
    margin: 0;
    min-height: 58px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 32px rgba(65, 50, 42, 0.06);
}

.event-access button {
    min-height: 58px;
    border-radius: 7px;
    text-transform: uppercase;
}

.event-access .form-status {
    grid-column: 1 / -1;
    min-height: 18px;
    font-size: 0.82rem;
    text-align: right;
}

.brand-mark {
    position: relative;
    width: min(640px, calc(100vw - 48px));
    aspect-ratio: 1.2;
    display: grid;
    place-items: center;
    margin-top: 56px;
}

.brand-arc,
.brand-mark::before {
    position: absolute;
    inset: 5% 8%;
    content: "";
    border: 4px solid transparent;
    border-top-color: #d6877a;
    border-right-color: #6f998d;
    border-bottom-color: #de987e;
    border-radius: 50%;
    transform: rotate(-11deg);
}

.brand-mark::before {
    inset: 14% 18%;
    border-width: 0;
    background:
        linear-gradient(#d6877a, #d6877a) 42% 85% / 42px 2px no-repeat,
        linear-gradient(#6f998d, #6f998d) 58% 85% / 42px 2px no-repeat;
    transform: none;
}

.brand-mark h1 {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 7.2rem;
    font-weight: 400;
}

.brand-mark h1 span {
    color: #1d2a33;
}

.brand-mark h1 em {
    margin-left: 8px;
    color: #c97b70;
    font-family: "Segoe Script", "Brush Script MT", cursive;
    font-size: 0.92em;
    font-style: italic;
    font-weight: 400;
}

.brand-leaves {
    position: absolute;
    top: 24%;
    left: 50%;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.brand-leaves span {
    width: 28px;
    height: 58px;
    border-radius: 100% 0 100% 0;
    background: #d7837b;
}

.brand-leaves span:first-child {
    width: 22px;
    height: 44px;
    background: #9ea58e;
    transform: rotate(-42deg) translateY(16px);
}

.brand-leaves span:last-child {
    width: 22px;
    height: 48px;
    background: #4f857b;
    transform: rotate(42deg) translateY(15px);
}

.brand-heart {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
}

.brand-heart span,
.brand-heart span::before,
.brand-heart span::after {
    display: block;
    width: 22px;
    height: 22px;
    background: #cf7b76;
}

.brand-heart span {
    transform: rotate(45deg);
}

.brand-heart span::before,
.brand-heart span::after {
    position: absolute;
    content: "";
    border-radius: 50%;
}

.brand-heart span::before {
    left: -11px;
}

.brand-heart span::after {
    top: -11px;
}

.home-tagline {
    margin: -24px 0 42px;
    color: #1d2a33;
    font-size: 1.35rem;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(860px, 100%);
    margin: 0 auto;
    border-radius: 4px;
}

.home-features div {
    display: grid;
    gap: 12px;
    place-items: center;
    min-height: 112px;
    border-right: 1px solid var(--line);
    color: #1d2a33;
}

.home-features div:last-child {
    border-right: 0;
}

.home-features strong {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.feature-icon {
    position: relative;
    width: 52px;
    height: 52px;
    color: var(--sage);
}

.feature-calendar {
    border: 4px solid #d87b72;
    border-radius: 10px;
}

.feature-calendar::before,
.feature-calendar::after {
    position: absolute;
    content: "";
}

.feature-calendar::before {
    left: 8px;
    right: 8px;
    top: 15px;
    border-top: 4px solid #d87b72;
    box-shadow: 0 12px 0 #d87b72, 0 24px 0 #d87b72;
}

.feature-calendar::after {
    left: 11px;
    top: -10px;
    width: 6px;
    height: 15px;
    border-radius: 8px;
    background: #d87b72;
    box-shadow: 23px 0 0 #d87b72;
}

.feature-pin {
    border: 4px solid var(--sage);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.feature-pin::before {
    position: absolute;
    inset: 13px;
    content: "";
    border: 4px solid var(--sage);
    border-radius: 50%;
}

.feature-people::before,
.feature-people::after {
    position: absolute;
    content: "";
    border: 4px solid #d49a4f;
    border-radius: 50%;
}

.feature-people::before {
    top: 0;
    left: 6px;
    width: 16px;
    height: 16px;
    box-shadow: 24px 0 0 -4px #fffaf6, 24px 0 0 0 #d49a4f;
}

.feature-people::after {
    left: 1px;
    bottom: 2px;
    width: 46px;
    height: 28px;
    border-radius: 26px 26px 0 0;
}

.feature-chat {
    border: 4px solid var(--sage);
    border-radius: 50%;
}

.feature-chat::before,
.feature-chat::after {
    position: absolute;
    content: "";
}

.feature-chat::before {
    right: 3px;
    bottom: -6px;
    width: 16px;
    height: 16px;
    border-right: 4px solid var(--sage);
    border-bottom: 4px solid var(--sage);
    transform: rotate(26deg);
}

.feature-chat::after {
    left: 18px;
    top: 17px;
    width: 14px;
    height: 14px;
    background: var(--sage);
    transform: rotate(45deg);
    box-shadow: -7px 0 0 var(--sage), 0 -7px 0 var(--sage);
}

.home-contact {
    position: relative;
    padding: 44px 24px 56px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.home-contact h2 {
    margin-bottom: 26px;
    text-align: center;
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
}

.home-contact h2::after {
    display: block;
    width: 54px;
    height: 2px;
    margin: 12px auto 0;
    background: var(--accent);
    content: "";
}

.contact-form {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    width: min(740px, 100%);
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    margin: 0;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.7);
}

.contact-wide,
.contact-form button,
.contact-form .form-status {
    grid-column: 1 / -1;
}

.contact-form button {
    justify-self: center;
    min-width: 220px;
    min-height: 54px;
    border-radius: 7px;
    text-transform: uppercase;
}

.home-footer {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    padding: 34px 24px 38px;
    color: #1d2a33;
    font-size: 1.18rem;
    flex-wrap: wrap;
}

.home-footer i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sage);
}

.home-footer i:nth-of-type(2) {
    background: var(--accent);
}

.leaf {
    position: absolute;
    width: 180px;
    height: 170px;
    opacity: 0.2;
    pointer-events: none;
}

.leaf::before,
.leaf::after {
    position: absolute;
    content: "";
    border-radius: 100% 0 100% 0;
    background: linear-gradient(135deg, var(--sage), transparent 70%);
}

.leaf::before {
    width: 72px;
    height: 118px;
    left: 42px;
    top: 10px;
    transform: rotate(42deg);
}

.leaf::after {
    width: 52px;
    height: 94px;
    left: 92px;
    top: 52px;
    transform: rotate(72deg);
}

.leaf-left {
    left: -42px;
    top: 58px;
    transform: rotate(-32deg);
}

.leaf-bottom-left {
    left: -48px;
    bottom: -18px;
}

.leaf-bottom-right {
    right: -34px;
    bottom: 18px;
    transform: rotate(210deg);
}

@media (max-width: 760px) {
    .home-hero {
        min-height: auto;
        padding: 28px 18px 38px;
    }

    .event-access {
        position: static;
        width: min(420px, 100%);
        grid-template-columns: 1fr 58px;
        margin: 0 auto 20px;
    }

    .brand-mark {
        width: min(420px, calc(100vw - 28px));
        margin-top: 8px;
    }

    .brand-mark h1 {
        font-size: 4.1rem;
    }

    .brand-leaves {
        top: 20%;
    }

    .brand-leaves span {
        width: 20px;
        height: 42px;
    }

    .brand-leaves span:first-child,
    .brand-leaves span:last-child {
        width: 16px;
        height: 34px;
    }

    .brand-heart {
        bottom: 14%;
    }

    .home-tagline {
        margin: -10px 0 24px;
        font-size: 1.05rem;
        text-align: center;
    }

    .home-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 0;
    }

    .home-features div:nth-child(2) {
        border-right: 0;
    }

    .home-features div {
        min-height: 96px;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .home-footer {
        gap: 14px;
        font-size: 1rem;
    }
}

.hero {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
        linear-gradient(rgba(47, 42, 37, 0.2), rgba(47, 42, 37, 0.5)),
        var(--event-image-url, var(--hero-image)) center/cover no-repeat;
    color: var(--white);
    text-align: center;
}

.event-admin-link {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    background: rgba(47, 42, 37, 0.28);
    color: var(--white);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.hero-content {
    position: relative;
    width: min(920px, 100%);
}

.hero h1 {
    margin: 12px 0;
    font-size: clamp(3rem, 13vw, 7rem);
    letter-spacing: 0;
}

.hero [data-event-title],
.hero [data-event-subtitle],
.section-text [data-presentation-title] {
    font-family: "Rouge Script", Georgia, serif;
    font-weight: 400;
    letter-spacing: 0;
}

.hero [data-event-title] {
    font-size: clamp(4.2rem, 15vw, 8.5rem);
}

.hero [data-event-subtitle] {
    margin: 0 auto;
    font-size: clamp(2.1rem, 6vw, 3.6rem);
    line-height: 1.05;
}

.section-text [data-presentation-title] {
    font-size: clamp(3rem, 8vw, 5rem);
}

.section-text [data-presentation-text] {
    font-family: "Caveat", "Manrope", cursive;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    line-height: 1.25;
}

#event-info-title,
#event-info-secondary-title,
#message-title,
#memories-title {
    font-family: "Rouge Script", Georgia, serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 400;
    letter-spacing: 0;
}

.hero p {
    font-size: 1.1rem;
}

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

.hero .eyebrow,
.hero .countdown span {
    color: #f8e9d6;
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: min(620px, 100%);
    margin: 34px auto 0;
}

.countdown div {
    padding: 16px 8px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.countdown strong {
    display: block;
    font-size: clamp(1.7rem, 8vw, 3.2rem);
}

.countdown span {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.section {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.intro-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

.section-text p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.image-panel {
    min-height: 320px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background:
        linear-gradient(rgba(255, 250, 244, 0.15), rgba(255, 250, 244, 0.15)),
        var(--event-image-url, var(--detail-image)) center/cover no-repeat;
    box-shadow: var(--shadow);
}

.event-card,
.form-card,
.data-panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.event-card {
    padding: 30px;
}

.event-locations-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 24px;
}

.event-locations-section .event-card {
    min-width: 0;
}

.attendance-cta {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 24px 0 28px;
}

.attendance-cta::after {
    position: absolute;
    right: 32px;
    bottom: 0;
    left: 32px;
    height: 1px;
    content: "";
    background: var(--line);
}

.attendance-cta[hidden] {
    display: none;
}

.attendance-cta .secondary-button {
    width: min(100%, 420px);
}

.attendance-cta + .form-section {
    padding-top: 28px;
}

@media (min-width: 760px) {
    .attendance-cta .secondary-button {
        width: auto;
        min-width: 280px;
    }
}

.event-details {
    display: grid;
    gap: 18px;
    margin: 28px 0;
}

.event-details div {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.event-details dt {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.event-details dd {
    margin: 6px 0 0;
    font-family: "Caveat", "Manrope", cursive;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 700;
}

.primary-link,
.secondary-link,
button,
.page-link,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--action);
    color: var(--action-text);
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.secondary-link,
.secondary-button,
.page-link {
    background: var(--action);
}

.outline-secondary-button,
.secondary-button.outline-secondary-button,
.page-link.outline-secondary-button {
    border: 2px solid var(--action);
    background: rgba(255, 255, 255, 0.62);
    color: var(--accent-dark);
}

.outline-secondary-button:hover,
.secondary-button.outline-secondary-button:hover,
.page-link.outline-secondary-button:hover {
    border-color: var(--action-hover);
    background: var(--action-hover);
    color: var(--action-text);
}

.primary-link:hover,
.secondary-link:hover,
button:not(.danger-button):not(.login-icon-button):not(.text-link-button):hover,
.page-link:hover,
.secondary-button:hover {
    background: var(--action-hover);
}

.danger-button {
    background: #a63d3d;
    color: var(--white);
}

.form-section h2 {
    margin-bottom: 20px;
}

.event-footer {
    width: min(420px, calc(100% - 32px));
    display: grid;
    justify-items: center;
    gap: 7px;
    margin: 0 auto;
    padding: 0 0 52px;
    text-align: center;
}

.developer-credit {
    color: var(--muted);
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
}

.developer-credit:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

.eventin-discover-link {
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.eventin-discover-link:hover {
    text-decoration: underline;
}

.form-card {
    display: grid;
    gap: 18px;
    padding: 24px;
}

label,
legend {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 800;
}

input,
textarea,
select {
    width: 100%;
    margin-top: 8px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

textarea {
    resize: vertical;
}

fieldset {
    margin: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.radio-line {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    font-weight: 700;
}

.radio-line input {
    width: auto;
    margin: 0;
}

.form-status {
    min-height: 22px;
    margin: 0;
    color: var(--sage);
    font-weight: 800;
}

.form-status.error {
    color: #b42318;
}

.form-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.simple-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 16px;
}

.access-layout {
    width: min(460px, 100%);
    text-align: center;
}

.access-layout h1 {
    margin-bottom: 18px;
    color: var(--accent-dark);
    text-transform: uppercase;
}

.page-link {
    width: 100%;
    margin-top: 16px;
}


.invitation-layout {
    gap: 18px;
}

.invitation-header {
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.invitation-header h1 {
    margin: 0;
    color: var(--accent-dark);
    font-family: "Rouge Script", "Georgia", cursive;
    font-size: clamp(2.7rem, 8vw, 4.3rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0;
    text-transform: none;
}

.invitation-heading {
    text-align: center;
}

.invitation-heading h2 {
    margin: 0 0 8px;
    color: var(--accent-dark);
    font-size: clamp(1.35rem, 5vw, 2rem);
    text-transform: uppercase;
}

.invitation-heading p {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.guest-greeting {
    color: var(--accent-dark);
    font-size: 1.1rem;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(47, 42, 37, 0.42);
    backdrop-filter: blur(6px);
}

.modal-card {
    width: min(420px, 100%);
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: var(--shadow);
    text-align: center;
}

.modal-card-wide {
    width: min(680px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-form {
    text-align: left;
}

.modal-card h2 {
    margin-bottom: 10px;
    color: var(--accent-dark);
}

.modal-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-radio-group {
    margin: 0 0 18px;
    text-align: left;
}

.admin-page {
    display: block;
}

.admin-layout {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    padding: 32px 0;
}

.admin-content[hidden] {
    display: none;
}

.admin-header {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.admin-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.admin-logo {
    width: 74px;
    height: auto;
    flex: 0 0 auto;
}

.brand-home-link {
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 0;
    text-decoration: none;
}

.admin-brand h1 {
    margin: 0;
}

.admin-brand .eyebrow {
    margin-bottom: 4px;
    color: var(--title);
    overflow-wrap: anywhere;
}

.event-selector {
    display: block;
    max-width: 420px;
    margin-bottom: 24px;
}

.event-admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.event-user-title {
    color: var(--accent-dark);
    font-family: "Rouge Script", "Georgia", cursive;
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    line-height: 0.95;
    letter-spacing: 0;
}

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

.data-panel {
    min-width: 0;
    padding: 20px;
}

.data-panel h2 {
    margin-bottom: 16px;
}

.admin-tools {
    margin-bottom: 20px;
}
.admin-footer-actions {
    display: flex;
    justify-content: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.bottom-view-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

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

.admin-form > label,
.admin-form > .image-upload-field {
    min-width: 0;
}

.admin-form button {
    justify-self: start;
}

.public-link {
    margin: 0 0 16px;
    color: var(--muted);
    overflow-wrap: anywhere;
    font-weight: 800;
}

.event-links {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.event-link-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
}

.event-link-row span {
    color: var(--muted);
    font-weight: 800;
}

.event-link-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.event-link-row button,
.event-link-row a {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.86rem;
}

.image-upload-field {
    display: grid;
    gap: 8px;
}

.image-upload-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.image-upload-heading label {
    margin: 0;
}

.image-upload-heading .icon-button {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
}

.admin-tools .image-upload-heading .danger-button {
    margin-top: 0;
}

.image-upload-field input[type="file"] {
    padding: 10px;
}

.field-hint {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
}

.admin-tools .danger-button {
    margin-top: 16px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.message-list {
    display: grid;
    gap: 12px;
}

.message-item {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
}

.message-item strong {
    display: block;
    margin-bottom: 6px;
}

.message-item time {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.message-item h3 {
    margin: 10px 0 6px;
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
}

.contact-request-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.contact-request-header a {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.contact-request-header time {
    margin-top: 0;
    text-align: right;
}

@media (min-width: 760px) {
    .intro-section {
        grid-template-columns: 1fr 0.9fr;
    }

    .event-details {
        grid-template-columns: repeat(3, 1fr);
    }

    .event-details div {
        border-bottom: 0;
        border-right: 1px solid var(--line);
        padding-right: 18px;
        padding-bottom: 0;
    }

    .event-details div:last-child {
        border-right: 0;
    }

    .event-details div:not([hidden]):not(:has(~ div:not([hidden]))) {
        border-right: 0;
    }

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

    .admin-form label:has(textarea),
    .admin-form button {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    .hero {
        min-height: 100vh;
        background-color: #f4eee6;
        background-image:
            linear-gradient(rgba(47, 42, 37, 0.18), rgba(47, 42, 37, 0.46)),
            var(--event-image-url, var(--hero-image));
        background-position: center center;
        background-size: contain;
        background-repeat: no-repeat;
    }

    .image-panel {
        min-height: 460px;
        background-color: #f4eee6;
        background-image:
            linear-gradient(rgba(255, 250, 244, 0.08), rgba(255, 250, 244, 0.08)),
            var(--event-image-url, var(--detail-image));
        background-position: center center;
        background-size: contain;
        background-repeat: no-repeat;
    }
}

.access-event-code {
    margin-top: 16px;
}

.admin-menu,
.admin-view-header,
.table-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-menu {
    margin-bottom: 22px;
}

.admin-menu button.active {
    outline: 3px solid rgba(159, 107, 69, 0.22);
}

.admin-view-header {
    justify-content: space-between;
    margin-bottom: 20px;
}

.admin-view-header .event-selector {
    margin-bottom: 0;
}

.table-actions {
    min-width: 170px;
}

.admin-shortcut-panel {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
}

.admin-shortcut-panel p {
    margin: 6px 0 0;
    color: var(--muted);
}

.guests-layout {
    width: min(1240px, calc(100% - 28px));
}

.admin-inline-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.guests-table tbody tr[data-guest-id] {
    cursor: pointer;
}

.guests-table tbody tr[data-guest-id]:hover,
.guests-table tbody tr[data-guest-id]:focus-visible {
    background: var(--background-soft);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.guest-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    color: #26332b;
    font-size: 0.82rem;
    font-weight: 800;
}

.guest-status-pill.status-pending {
    background: #eee7d8;
}

.guest-status-pill.status-viewed {
    background: #dceaf4;
}

.guest-status-pill.status-confirmed {
    background: #d9eadc;
}

.guest-status-pill.status-declined {
    background: #f1d9d9;
}

.disabled-link {
    opacity: 0.45;
    pointer-events: none;
}

.icon-actions {
    display: grid;
    grid-template-columns: repeat(4, 38px);
    align-items: center;
    justify-content: start;
    min-width: 150px;
    gap: 12px;
}

.icon-button,
.table-actions .icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    margin: 0;
    border: 0;
    appearance: none;
    border-radius: 8px;
    line-height: 0;
    vertical-align: middle;
}

.whatsapp-button {
    background: #1f9d55;
    color: var(--white);
    text-decoration: none;
}

.icon-button svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.guest-list-controls {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
    gap: 14px;
    align-items: end;
    margin-bottom: 12px;
}

.pagination-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    flex-wrap: wrap;
}

.pagination-controls button {
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.pagination-controls button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-controls span {
    color: var(--muted);
    font-weight: 800;
}

.table-actions button:not(.icon-button),
.message-item .table-actions button:not(.icon-button) {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
}

.admin-form input:disabled,
.admin-form input[readonly],
.admin-form select:disabled,
.admin-form textarea:disabled {
    background: #f5efe7;
    color: var(--muted);
}

.debug-layout {
    display: grid;
    gap: 20px;
}

.debug-panel h1 {
    margin-bottom: 18px;
    color: var(--accent-dark);
}

.debug-links,
.debug-card {
    display: grid;
    gap: 12px;
}

.debug-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.debug-card h2 {
    margin-bottom: 8px;
}

.debug-card .secondary-button,
.debug-links .secondary-button {
    width: 100%;
    border-radius: 8px;
}

@media (max-width: 760px) {
    .admin-view-header {
        align-items: stretch;
    }

    .admin-view-header .event-selector,
    .admin-view-header .event-admin-actions,
    .admin-view-header .event-user-title,
    .admin-view-header .secondary-button,
    .admin-menu button {
        width: 100%;
    }

    .debug-grid {
        grid-template-columns: 1fr;
    }

    .guest-list-controls {
        grid-template-columns: 1fr;
    }

    .admin-inline-actions {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr;
    }

    .admin-inline-actions button {
        width: 100%;
    }

    .pagination-controls {
        align-items: stretch;
    }

    .pagination-controls button {
        flex: 1 1 110px;
    }

    .pagination-controls span {
        width: 100%;
        text-align: center;
    }

    .guests-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .guests-table,
    .guests-table tbody,
    .guests-table tr {
        display: block;
        width: 100%;
    }

    .guests-table thead,
    .guests-table td[data-label="Teléfono 2"],
    .guests-table td[data-label="Adultos"],
    .guests-table td[data-label="Niños"],
    .guests-table td[data-label="Asistirá"] {
        display: none;
    }

    .guests-table tr {
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.62);
        box-shadow: 0 10px 26px rgba(70, 47, 30, 0.08);
    }

    .guests-table td {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 10px;
        align-items: baseline;
        border-bottom: 0;
        padding: 5px 0;
        overflow-wrap: anywhere;
    }

    .guests-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.74rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .guests-table td[data-label="Nombre"] {
        display: block;
        padding: 0 0 8px;
        color: var(--accent-dark);
        font-size: 1.08rem;
        font-weight: 900;
    }

    .guests-table td[data-label="Nombre"]::before {
        content: none;
    }

    .admin-shortcut-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-shortcut-panel .secondary-button {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .admin-header {
        flex-direction: column;
        align-items: center;
    }

    .admin-brand {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }

    .admin-logo {
        width: 88px;
        order: -1;
    }

    .admin-brand h1 {
        font-size: 0.78rem;
        line-height: 1.2;
    }
}
/* Home v2 */
body[data-palette="home"] {
    --ink: #172638;
    --muted: #6d706e;
    --rose: #ce7b76;
    --rose-dark: #b96561;
    --sage: #6f9589;
    --gold: #caa15a;
    --line: rgba(23, 38, 56, 0.14);
    --paper: #fffdf9;
    --paper-soft: #fbf5ee;
    --shadow: 0 22px 70px rgba(38, 43, 48, 0.12);
    background:
        radial-gradient(circle at 8% 12%, rgba(210, 123, 118, 0.15), transparent 24%),
        radial-gradient(circle at 95% 35%, rgba(111, 149, 137, 0.12), transparent 25%),
        linear-gradient(135deg, #fffaf4 0%, #ffffff 45%, #f7fbf8 100%);
    font-family: "Montserrat", "Manrope", system-ui, sans-serif;
}

body[data-palette="home"] .home-page {
    width: min(100%, 1500px);
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: var(--shadow);
}

body[data-palette="home"] .home-hero {
    position: relative;
    min-height: 78vh;
    display: grid;
    place-items: center;
    padding: 7.5rem 1.5rem 4rem;
    isolation: isolate;
    overflow: hidden;
    background: transparent;
}

body[data-palette="home"] .home-hero::before {
    position: absolute;
    inset: 0;
    z-index: -3;
    content: "";
    background:
        radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.45) 52%, transparent 80%),
        radial-gradient(circle at 8% 70%, rgba(210, 123, 118, 0.09), transparent 22%),
        radial-gradient(circle at 92% 62%, rgba(111, 149, 137, 0.1), transparent 24%);
}

body[data-palette="home"] .event-access {
    position: absolute;
    top: clamp(1rem, 3vw, 2.2rem);
    right: clamp(1rem, 3vw, 2.8rem);
    z-index: 5;
    display: grid;
    grid-template-columns: minmax(190px, 17rem) 4.5rem;
    gap: 0.7rem;
    align-items: start;
}

body[data-palette="home"] .event-access input {
    width: 100%;
    height: 3.4rem;
    min-height: 0;
    margin: 0;
    padding: 0 1.1rem;
    border: 1px solid rgba(23, 38, 56, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--ink);
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

body[data-palette="home"] .event-access input:focus {
    border-color: rgba(206, 123, 118, 0.72);
    box-shadow: 0 0 0 4px rgba(206, 123, 118, 0.14);
    background: rgba(255, 255, 255, 0.96);
}

body[data-palette="home"] .event-access button,
body[data-palette="home"] .contact-form button {
    min-height: 3.4rem;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #d99792, var(--rose-dark));
    color: #fff;
    box-shadow: 0 10px 28px rgba(185, 101, 97, 0.22);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

body[data-palette="home"] .event-access button:hover,
body[data-palette="home"] .contact-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(185, 101, 97, 0.28);
    filter: saturate(1.05);
}

body[data-palette="home"] .event-access .form-status {
    grid-column: 1 / -1;
    min-height: 1.2rem;
    margin: 0;
    color: var(--sage);
    font-size: 0.85rem;
    text-align: right;
}

body[data-palette="home"] .event-access .form-status.error,
body[data-palette="home"] .form-status.error {
    color: #b42318;
}

body[data-palette="home"] .home-hero-content {
    width: min(860px, 100%);
    display: grid;
    justify-items: center;
    text-align: center;
}

body[data-palette="home"] .brand-logo {
    display: block;
    width: min(620px, 86vw);
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(23, 38, 56, 0.07));
}

body[data-palette="home"] .home-tagline {
    margin: clamp(1.4rem, 3vw, 2.3rem) 0 clamp(1.8rem, 4vw, 3rem);
    color: var(--ink);
    font-size: clamp(1.25rem, 2.6vw, 2rem);
    font-weight: 300;
    letter-spacing: clamp(0.14em, 1vw, 0.28em);
    text-align: center;
    text-transform: lowercase;
}

body[data-palette="home"] .home-features {
    width: min(840px, 100%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    align-items: center;
    margin: 0 auto;
}

body[data-palette="home"] .feature {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.85rem;
    min-height: auto;
    padding: 0.4rem 1rem;
    border-right: 0;
    color: var(--ink);
}

body[data-palette="home"] .feature + .feature::before {
    position: absolute;
    left: 0;
    top: 20%;
    width: 1px;
    height: 60%;
    content: "";
    background: var(--line);
}

body[data-palette="home"] .feature-icon {
    width: clamp(2.7rem, 5vw, 4.1rem);
    height: clamp(2.7rem, 5vw, 4.1rem);
    display: grid;
    place-items: center;
}

body[data-palette="home"] .feature-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body[data-palette="home"] .feature:nth-child(1) .feature-icon { color: var(--rose); }
body[data-palette="home"] .feature:nth-child(2) .feature-icon { color: var(--sage); }
body[data-palette="home"] .feature:nth-child(3) .feature-icon { color: var(--gold); }
body[data-palette="home"] .feature:nth-child(4) .feature-icon { color: var(--sage); }

body[data-palette="home"] .feature strong {
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

body[data-palette="home"] .home-bg,
body[data-palette="home"] .contact-decoration {
    position: absolute;
    width: min(21rem, 40vw);
    aspect-ratio: 1;
    opacity: 0.34;
    background:
        radial-gradient(ellipse at 45% 12%, transparent 57%, rgba(111, 149, 137, 0.55) 58% 61%, transparent 62%),
        radial-gradient(ellipse at 63% 28%, transparent 57%, rgba(210, 123, 118, 0.45) 58% 61%, transparent 62%),
        radial-gradient(ellipse at 35% 40%, transparent 57%, rgba(151, 165, 133, 0.45) 58% 61%, transparent 62%);
    filter: blur(0.2px);
    pointer-events: none;
}

body[data-palette="home"] .home-bg {
    z-index: -2;
}

body[data-palette="home"] .home-bg-left {
    left: -5.2rem;
    top: 4rem;
    transform: rotate(-28deg);
}

body[data-palette="home"] .home-bg-right {
    right: -5rem;
    bottom: 1.5rem;
    transform: rotate(155deg);
}

body[data-palette="home"] .home-event-types {
    position: relative;
    min-height: 10rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(rgba(23, 30, 28, 0.34), rgba(23, 30, 28, 0.34)),
        radial-gradient(circle at 15% 50%, rgba(255, 244, 230, 0.45), transparent 18%),
        radial-gradient(circle at 83% 50%, rgba(255, 244, 230, 0.38), transparent 16%),
        linear-gradient(110deg, rgba(91, 111, 103, 0.56), rgba(63, 72, 70, 0.52), rgba(113, 89, 77, 0.5)),
        url("../assets/images/eventin-mockup-reference.png") center 58% / cover;
}

body[data-palette="home"] .home-event-types::after {
    position: absolute;
    inset: 0;
    content: "";
    backdrop-filter: blur(5px);
    background: rgba(26, 30, 29, 0.12);
}

body[data-palette="home"] .home-event-types-content {
    position: relative;
    z-index: 1;
    padding: 2.2rem 1rem;
    text-align: center;
}

body[data-palette="home"] .home-event-types p {
    margin: 0;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.35rem, 2.7vw, 2rem);
    letter-spacing: 0.07em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

body[data-palette="home"] .home-event-types span {
    color: #f2c1b9;
    padding: 0 clamp(0.55rem, 1.6vw, 1.25rem);
}

body[data-palette="home"] .tiny-heart {
    margin-top: 1.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    color: #f2b3aa;
}

body[data-palette="home"] .tiny-heart span {
    display: block;
    width: 4rem;
    height: 1px;
    padding: 0;
    background: rgba(255, 255, 255, 0.45);
}

body[data-palette="home"] .home-contact {
    position: relative;
    min-height: 42rem;
    display: grid;
    place-items: center;
    padding: clamp(3.5rem, 7vw, 5.5rem) 1.5rem;
    border: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 0% 95%, rgba(111, 149, 137, 0.1), transparent 18%),
        radial-gradient(circle at 100% 80%, rgba(210, 123, 118, 0.1), transparent 22%),
        rgba(255, 255, 255, 0.7);
}

body[data-palette="home"] .contact-card {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    text-align: center;
}

body[data-palette="home"] .home-contact h2 {
    margin: 0;
    color: var(--ink);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    text-transform: none;
}

body[data-palette="home"] .home-contact h2::after {
    content: none;
}

body[data-palette="home"] .title-line {
    width: 4.2rem;
    height: 2px;
    margin: 0.85rem auto 2rem;
    background: linear-gradient(90deg, transparent, var(--rose), transparent);
}

body[data-palette="home"] .contact-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 0;
}

body[data-palette="home"] .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

body[data-palette="home"] .contact-form input,
body[data-palette="home"] .contact-form textarea {
    width: 100%;
    margin: 0;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(23, 38, 56, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.66);
    color: var(--ink);
    outline: none;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

body[data-palette="home"] .contact-form input:focus,
body[data-palette="home"] .contact-form textarea:focus {
    border-color: rgba(111, 149, 137, 0.55);
    box-shadow: 0 0 0 4px rgba(111, 149, 137, 0.1);
    background: #fff;
}

body[data-palette="home"] .contact-form button {
    justify-self: center;
    min-width: 13rem;
    height: 3.4rem;
    margin-top: 0.65rem;
}

body[data-palette="home"] .contact-form .form-status {
    min-height: 1.4rem;
    margin: 0.2rem 0 0;
    color: var(--sage);
    font-size: 0.95rem;
}

body[data-palette="home"] .contact-decoration-left {
    left: -4.5rem;
    bottom: -5rem;
    transform: rotate(-24deg);
}

body[data-palette="home"] .contact-decoration-right {
    right: -5rem;
    bottom: -2rem;
    transform: rotate(145deg);
}

@media (max-width: 780px) {
    body[data-palette="home"] .home-page {
        box-shadow: none;
    }

    body[data-palette="home"] .home-hero {
        min-height: auto;
        padding: 6.5rem 1.1rem 3rem;
    }

    body[data-palette="home"] .event-access {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        grid-template-columns: minmax(0, 1fr) 3.7rem;
        justify-content: end;
    }

    body[data-palette="home"] .event-access input,
    body[data-palette="home"] .event-access button {
        height: 3rem;
        min-height: 3rem;
        font-size: 0.88rem;
    }

    body[data-palette="home"] .brand-logo {
        width: min(470px, 92vw);
        transform: translateX(-1.5%);
    }

    body[data-palette="home"] .home-tagline {
        letter-spacing: 0.15em;
    }

    body[data-palette="home"] .home-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.6rem 0;
    }

    body[data-palette="home"] .feature:nth-child(3)::before {
        content: none;
    }

    body[data-palette="home"] .feature strong {
        letter-spacing: 0.13em;
    }

    body[data-palette="home"] .home-event-types {
        min-height: 8.8rem;
    }

    body[data-palette="home"] .home-event-types p {
        line-height: 1.8;
    }

    body[data-palette="home"] .home-event-types span {
        padding: 0 0.45rem;
    }

    body[data-palette="home"] .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body[data-palette="home"] .home-hero {
        padding-top: 5.8rem;
    }

    body[data-palette="home"] .event-access {
        gap: 0.45rem;
    }

    body[data-palette="home"] .brand-logo {
        width: 96vw;
        transform: translateX(-2%);
    }

    body[data-palette="home"] .home-features {
        gap: 1.35rem 0;
    }

    body[data-palette="home"] .feature {
        padding-inline: 0.55rem;
    }

    body[data-palette="home"] .feature + .feature::before {
        opacity: 0.55;
    }

    body[data-palette="home"] .home-event-types p {
        font-size: 1.28rem;
    }

    body[data-palette="home"] .home-contact {
        padding-inline: 1rem;
    }

    body[data-palette="home"] .contact-form input,
    body[data-palette="home"] .contact-form textarea {
        padding: 0.92rem 0.95rem;
    }
}
body[data-palette="home"] .home-admin-link {
    position: fixed;
    right: 16px;
    bottom: 14px;
    z-index: 20;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(23, 38, 56, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.58);
    color: rgba(23, 38, 56, 0.42);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 22px rgba(38, 43, 48, 0.08);
    transition: color 0.2s, background 0.2s, transform 0.2s;
}

/* Persistent access and session controls */
.login-icon-link,
.login-icon-button {
    display: inline-grid;
    place-items: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    text-decoration: none;
    box-shadow: none;
}

.login-icon-link svg,
.login-icon-button svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

body[data-palette="home"] .home-topbar {
    position: fixed;
    top: 0;
    left: 50%;
    z-index: 40;
    width: min(100%, 1500px);
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 4px clamp(1rem, 3vw, 2.8rem);
    border-bottom: 1px solid rgba(23, 38, 56, 0.08);
    background: rgba(255, 250, 246, 0.88);
    backdrop-filter: blur(12px);
    transform: translateX(-50%);
}

body[data-palette="home"] .home-topbar .login-icon-link {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    color: var(--rose-dark);
}

body[data-palette="home"] .home-topbar .event-access {
    position: relative;
    inset: auto;
    margin: 0;
    align-items: center;
}

body[data-palette="home"] .home-topbar .event-access input,
body[data-palette="home"] .home-topbar .event-access button {
    height: 40px;
    min-height: 40px;
}

body[data-palette="home"] .home-topbar .event-access .form-status {
    position: absolute;
    top: calc(100% + 3px);
    right: 0;
    min-height: 0;
    margin: 0;
}

.event-admin-link.login-icon-link {
    position: static;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, 0.76);
    color: var(--accent);
}

.event-admin-link.login-icon-link svg {
    width: 36px;
    height: 36px;
}

.event-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    background: linear-gradient(180deg, rgba(47, 42, 37, 0.32), transparent);
}

.event-brand-link {
    display: inline-flex;
    align-items: center;
    height: 48px;
    line-height: 0;
}

.event-brand-link img {
    display: block;
    width: 110px;
    height: auto;
    filter: drop-shadow(0 2px 5px rgba(255, 255, 255, 0.36));
}

.invitation-detail-image {
    width: 100%;
    min-height: 250px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background-color: var(--paper);
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    box-shadow: var(--shadow);
}

.admin-content .admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: 0 -14px 24px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--background) 92%, transparent);
    backdrop-filter: blur(12px);
}

.login-panel-logo {
    display: block;
    width: min(210px, 72%);
    height: auto;
    margin: 0 auto 18px;
}

.access-layout > .brand-home-link {
    display: flex;
    justify-content: center;
}

.reset-password-page {
    padding-top: 96px;
}

.reset-password-page > .access-layout {
    margin: 0 auto 32px;
}

@media (max-width: 480px) {
    .event-topbar {
        padding: 6px 10px;
    }

    .event-brand-link img {
        width: 92px;
    }
}

.session-menu {
    position: relative;
    flex: 0 0 auto;
}

.session-menu-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 35;
    min-width: 160px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.session-menu-popup button {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    text-align: left;
    box-shadow: none;
}

.text-link-button {
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    box-shadow: none;
}

.event-link-row .copy-link-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    min-width: 36px;
    padding: 0;
}

.copy-link-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-form input[type="datetime-local"] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    appearance: none;
    -webkit-appearance: none;
}

@supports (-webkit-touch-callout: none) {
    @media (max-width: 760px) {
        .admin-form input[type="datetime-local"] {
            width: -webkit-fill-available;
        }
    }
}

@media (max-width: 760px) {
    .admin-content .admin-header {
        flex-direction: row;
        align-items: center;
    }

    .admin-content .admin-brand {
        width: auto;
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .admin-content .admin-logo {
        width: 62px;
    }
}

@media (max-width: 480px) {
    body[data-palette="home"] .home-topbar {
        gap: 8px;
        padding: 4px 0.75rem;
    }

    body[data-palette="home"] .home-topbar .event-access {
        width: min(calc(100vw - 5.8rem), 15.8rem);
    }
}

body[data-palette="home"] .home-admin-link:hover {
    color: rgba(23, 38, 56, 0.72);
    background: rgba(255, 255, 255, 0.82);
    transform: translateY(-1px);
}

body[data-palette="home"] .home-admin-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 480px) {
    body[data-palette="home"] .event-access {
        left: auto;
        right: 0.75rem;
        grid-template-columns: minmax(0, 11.2rem) 3.15rem;
        width: min(calc(100vw - 1.5rem), 15.8rem);
        justify-content: end;
    }

    body[data-palette="home"] .event-access input {
        min-width: 0;
        padding-inline: 0.72rem;
        font-size: 0.8rem;
    }

    body[data-palette="home"] .event-access button {
        min-width: 0;
        padding-inline: 0;
        font-size: 0.78rem;
    }

    body[data-palette="home"] .event-access .form-status {
        font-size: 0.76rem;
    }

    body[data-palette="home"] .home-admin-link {
        right: 10px;
        bottom: 10px;
        width: 34px;
        height: 34px;
    }

    body[data-palette="home"] .home-topbar .event-access {
        left: auto;
        right: auto;
        width: min(calc(100vw - 5.8rem), 15.8rem);
    }
}

/* Home showcase v3 */
.showcase-home { padding-top: 49px; background: #fffdfb; color: #536476; }
.showcase-home h1, .showcase-home h2, .showcase-home h3 { color: #526b84; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; }
.showcase-home p { line-height: 1.55; }
.showcase-kicker { margin: 0 0 8px; color: #c78c8a; font: 600 0.72rem "Montserrat", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; }
.showcase-hero { position: relative; min-height: calc(100vh - 49px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(320px, .7fr); gap: clamp(28px, 5vw, 80px); align-items: center; padding: clamp(56px, 7vw, 100px) max(24px, calc((100vw - 1180px) / 2)); overflow: hidden; background: radial-gradient(circle at 95% 20%, rgba(175,196,216,.26), transparent 28%), radial-gradient(circle at 8% 85%, rgba(217,163,180,.2), transparent 25%), linear-gradient(145deg, #fffdfb, #f9f4ef); }
.showcase-hero::after { position: absolute; left: -10%; right: -10%; bottom: -54px; height: 100px; content: ""; border-radius: 50%; background: #f3e9df; }
.showcase-copy { position: relative; z-index: 2; min-width: 0; max-width: 610px; }
.showcase-copy h1 { font-size: clamp(4rem, 8vw, 7rem); line-height: .88; letter-spacing: 0; }
.showcase-lead { max-width: 540px; margin: 22px 0; color: #66717c; font-size: clamp(1rem, 1.4vw, 1.15rem); }
.showcase-flourish { width: 132px; display: flex; gap: 10px; align-items: center; margin: 18px 0; color: #d99aa8; }
.showcase-flourish span { height: 1px; flex: 1; background: currentColor; }
.showcase-mini-features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 590px; margin: 30px 0; }
.showcase-mini-features span { display: grid; gap: 4px; justify-items: center; color: #7a8085; font-size: .7rem; line-height: 1.35; text-align: center; }
.showcase-mini-features svg { width: 30px; height: 30px; margin-bottom: 3px; fill: none; stroke: #89a9c9; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.showcase-mini-features b { color: #536c84; font-size: .88rem; }
.showcase-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.showcase-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; border: 1px solid #88a8c4; border-radius: 6px; background: #789ab9; color: #fff; font: 600 .78rem "Montserrat", sans-serif; text-decoration: none; transition: transform .2s, background .2s, box-shadow .2s; }
.showcase-button:hover { background: #668aa9; box-shadow: 0 10px 24px rgba(82,107,132,.16); transform: translateY(-1px); }
.showcase-button-soft { border-color: #cbd9e5; background: rgba(255,255,255,.82); color: #607790; }
.showcase-phone-wrap { position: relative; z-index: 1; display: grid; place-items: center; }
.showcase-phone { display: block; width: min(390px, 88%); max-height: 72vh; object-fit: contain; filter: drop-shadow(0 28px 28px rgba(52,62,70,.2)); }
.showcase-phone-tilted { transform: rotate(3deg); }
.showcase-benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 70px max(24px, calc((100vw - 1180px) / 2)); text-align: center; }
.showcase-benefits-header { grid-column: 1 / -1; width: 100%; min-width: 0; max-width: 820px; margin: 0 auto 16px; }
.showcase-benefits-header h2 { max-width: 100%; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; overflow-wrap: anywhere; }
.showcase-benefits article { min-width: 0; }
.showcase-benefits h2 { margin: 12px 0 8px; font-size: 1.35rem; }
.showcase-benefits p { margin: 0; color: #747d84; font-size: .82rem; }
.showcase-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; color: #789ab9; }
.showcase-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.45; stroke-linecap: round; stroke-linejoin: round; }
.showcase-icon-filled { border-radius: 50%; background: rgba(255,255,255,.78); box-shadow: 0 8px 18px rgba(82,107,132,.08); }
.showcase-styles { padding: 72px max(24px, calc((100vw - 1100px) / 2)); background: #fbf7f3; text-align: center; }
.showcase-styles h2, .showcase-types h2 { margin-bottom: 34px; font-size: clamp(2rem, 4vw, 3rem); }
.style-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 3vw, 34px); }
.style-gallery figure { margin: 0; }
.style-gallery img { display: block; width: 100%; aspect-ratio: .79; object-fit: contain; object-position: center; filter: drop-shadow(0 16px 16px rgba(74,68,63,.14)); transition: transform .25s, filter .25s; }
.style-gallery figure:hover img { filter: drop-shadow(0 22px 20px rgba(74,68,63,.2)); transform: translateY(-5px); }
.style-gallery figcaption { display: flex; gap: 7px; align-items: center; justify-content: center; margin-top: 13px; color: #68747e; font-size: .82rem; font-weight: 700; }
.style-dot { width: 9px; height: 9px; border-radius: 50%; }
.style-dot-dulce { background: #d9a3b4; } .style-dot-brisa { background: #89a9c9; } .style-dot-natura { background: #91b097; } .style-dot-clasica { background: #afc4d8; }
.showcase-demo { width: min(1120px, calc(100% - 40px)); display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(26px, 5vw, 70px); align-items: center; margin: 72px auto; padding: clamp(28px, 5vw, 54px); border: 1px solid rgba(82,107,132,.1); border-radius: 8px; background: #f8f4ef; }
.showcase-demo h2 { margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.1rem); }
.showcase-demo p:not(.showcase-kicker) { margin-bottom: 22px; color: #747d84; }
.showcase-demo img { width: 100%; height: 330px; object-fit: contain; object-position: center; border-radius: 8px; }
.showcase-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 30px max(24px, calc((100vw - 1060px) / 2)); background: linear-gradient(100deg, #eef4f8, #e5edf5); }
.showcase-cta h2, .showcase-final h2 { font-size: 1.45rem; }
.showcase-cta p, .showcase-final p { margin: 4px 0 0; color: #747d84; font-size: .82rem; }
.showcase-types { padding: 72px max(24px, calc((100vw - 900px) / 2)); text-align: center; }
.showcase-type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.showcase-type-grid article { padding: 26px 12px; border-bottom: 2px solid #e2ecf5; }
.showcase-type-grid span { display: grid; place-items: center; width: 68px; height: 58px; margin: 0 auto 14px; color: #789ab9; }
.showcase-type-grid svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.showcase-type-grid h3 { font-size: 1.35rem; }
.showcase-final { display: grid; grid-template-columns: repeat(2, 1fr); background: #f6f8fa; }
.showcase-final article { min-height: 230px; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-content: center; padding: 42px max(24px, calc((50vw - 520px) / 2)); }
.showcase-final article + article { border-left: 1px solid #d9e4ee; background: #eef4f8; }
.showcase-final .showcase-button { grid-column: 2; justify-self: start; margin-top: 4px; }
.showcase-footer { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: 20px max(24px, calc((100vw - 1180px) / 2)); border-top: 1px solid #e2ecf5; background: #fffdfb; }
.showcase-footer img { display: block; width: 115px; }
.showcase-footer p { color: #7c848a; font-size: .8rem; }
.contact-page { display: block; padding: 100px 16px 0; background: linear-gradient(145deg, #fffdfb, #eef4f8); }
.contact-topbar { background: color-mix(in srgb, var(--background) 92%, transparent); }
.contact-page-layout { width: min(680px, 100%); margin: 0 auto 42px; }
.contact-page-layout > header { margin-bottom: 26px; text-align: center; }
.contact-page-layout h1 { font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(3rem, 8vw, 5rem); font-weight: 600; }
.contact-page-layout > header p:last-child { color: var(--text); }
.contact-page-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-page-form label:nth-of-type(3), .contact-page-form label:nth-of-type(4), .contact-page-form button, .contact-page-form .form-status { grid-column: 1 / -1; }
.contact-page-form button { justify-self: center; }

@media (max-width: 820px) {
    .showcase-hero { min-height: auto; grid-template-columns: 1fr; padding-top: 64px; text-align: center; }
    .showcase-copy { margin: 0 auto; }
    .showcase-flourish, .showcase-mini-features { margin-inline: auto; }
    .showcase-mini-features { text-align: left; }
    .showcase-actions { justify-content: center; }
    .showcase-phone { width: min(360px, 74vw); max-height: none; }
    .showcase-benefits, .style-gallery { grid-template-columns: repeat(2, 1fr); }
    .showcase-demo { grid-template-columns: 1fr; }
    .showcase-demo img { height: auto; max-height: 420px; }
    .showcase-cta { grid-template-columns: auto 1fr; }
    .showcase-cta .showcase-button { grid-column: 2; justify-self: start; }
    .showcase-final { grid-template-columns: 1fr; }
    .showcase-final article + article { border-top: 1px solid #d9e4ee; border-left: 0; }
}

@media (max-width: 560px) {
    .showcase-hero { gap: 38px; padding: 46px 18px 82px; }
    .showcase-copy { width: 100%; overflow: hidden; }
    .showcase-copy h1 { font-size: 3.65rem; }
    .showcase-mini-features { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 330px; gap: 22px 16px; }
    .showcase-actions { display: grid; }
    .showcase-phone { width: min(320px, 82vw); }
    .showcase-benefits, .style-gallery, .showcase-type-grid { grid-template-columns: 1fr 1fr; }
    .showcase-benefits { gap: 36px 18px; padding: 54px 18px; }
    .showcase-benefits-header h2 { font-size: 1.85rem; }
    .showcase-styles, .showcase-types { padding: 54px 18px; }
    .style-gallery { gap: 20px 12px; }
    .style-gallery img { border-radius: 8px; }
    .showcase-demo { width: calc(100% - 24px); margin: 46px auto; padding: 24px; }
    .showcase-cta, .showcase-final article { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .showcase-cta .showcase-button, .showcase-final .showcase-button { grid-column: auto; justify-self: center; }
    .showcase-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .contact-page-form { grid-template-columns: 1fr; }
    .contact-page-form label, .contact-page-form label:nth-of-type(3), .contact-page-form label:nth-of-type(4) { grid-column: 1; }
}

@media (max-width: 640px) {
    body[data-palette="home"] .home-topbar .event-access {
        width: min(calc(100vw - 5.6rem), 18rem);
        grid-template-columns: minmax(0, 1fr) 3.15rem;
        gap: 0.45rem;
    }

    body[data-palette="home"] .home-topbar .event-access input,
    body[data-palette="home"] .home-topbar .event-access button {
        min-width: 0;
    }
}

/* Event galleries */
.memories-section {
    position: relative;
    padding: 32px 0;
    text-align: left;
}

.memories-section::after {
    position: absolute;
    right: 32px;
    bottom: 0;
    left: 32px;
    height: 1px;
    content: "";
    background: var(--line);
}

.memory-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(520px, 100%);
    margin-top: 18px;
}

.memory-links a {
    width: 100%;
    box-sizing: border-box;
}

.memory-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 11px 18px;
    border: 2px solid var(--action);
    border-radius: 999px;
    background: transparent;
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.memory-secondary-link:hover {
    background: var(--background-soft);
}

.memories-preview {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.memories-preview[hidden],
.memories-empty[hidden],
.memories-count[hidden] {
    display: none;
}

.memories-preview-item {
    position: relative;
    aspect-ratio: 1;
    min-width: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--background-soft);
}

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

.memories-preview-extra {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--button) 78%, transparent);
    color: #fff;
    font-size: clamp(1.25rem, 4vw, 2rem);
    font-weight: 800;
}

.memories-preview-extra.mobile-extra {
    display: none;
}

.memories-count {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 14px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.memories-count svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--button);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.memories-empty {
    margin-top: 18px;
    padding: 28px 18px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: var(--background-soft);
    color: var(--muted);
    text-align: center;
}

.memories-section + .form-section {
    padding-top: 32px;
}

@media (max-width: 640px) {
    .memories-preview {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .memories-preview-item:nth-child(n + 4) {
        display: none;
    }

    .memories-preview-extra.mobile-extra {
        display: grid;
    }

    .memories-preview-extra.desktop-extra {
        display: none;
    }
}

.gallery-page {
    min-height: 100vh;
    display: block;
    padding: 0;
}

.gallery-header {
    position: static;
    display: grid;
    grid-template-columns: auto minmax(0, auto) auto 1fr;
    gap: 10px;
    align-items: center;
    padding: 6px max(14px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid var(--line);
    background: var(--background);
}

.gallery-header img {
    display: block;
    width: 68px;
}

.gallery-header h1 {
    margin: 0;
    color: var(--accent-dark);
    font-family: "Rouge Script", Georgia, serif;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    font-weight: 400;
    line-height: 1;
    overflow-wrap: anywhere;
}

.gallery-header-title {
    min-width: 0;
}

.gallery-header .eyebrow {
    margin: 0;
    font-size: 0.62rem;
}

.gallery-back-link {
    color: var(--accent-dark);
    font-size: 0.78rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gallery-layout {
    width: min(1180px, calc(100% - 28px));
    min-height: 62vh;
    margin: 12px auto 56px;
}

.gallery-upload-panel,
.gallery-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 2px 0;
    border: 0;
    background: transparent;
}

.gallery-toolbar-single {
    justify-content: flex-start;
}

.gallery-tool-button {
    display: inline-grid;
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    place-items: center;
    cursor: pointer;
}

.gallery-tool-button svg {
    width: 19px;
    height: 19px;
}

.gallery-access-panel {
    width: calc(100vw - 28px);
    max-width: 520px;
    margin: 30px auto;
    box-sizing: border-box;
}

.gallery-access-panel .form-card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.gallery-access-panel input,
.gallery-access-panel button {
    max-width: 100%;
    box-sizing: border-box;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.gallery-item {
    position: relative;
    min-width: 0;
    margin: 0;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.gallery-image-button {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.gallery-image-button:hover {
    background: transparent !important;
}

.gallery-image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}

.gallery-image-button:hover img {
    transform: scale(1.025);
}

.gallery-delete-button {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
}

.gallery-empty {
    padding: 60px 18px;
    color: var(--muted);
    text-align: center;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    gap: 12px;
    place-items: center;
    padding: 18px;
    background: rgba(20, 24, 27, 0.94);
}

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

.gallery-lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 36px);
    object-fit: contain;
}

.gallery-lightbox button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 2rem;
}

.gallery-lightbox [data-lightbox-action="close"] {
    position: absolute;
    top: 16px;
    right: 16px;
}

.gallery-lightbox.is-slideshow {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0;
    background: #000;
}

.gallery-lightbox.is-slideshow img {
    max-width: 100vw;
    max-height: 100vh;
}

.gallery-lightbox.is-slideshow [data-lightbox-action="previous"],
.gallery-lightbox.is-slideshow [data-lightbox-action="next"] {
    display: none;
}

.gallery-lightbox.is-slideshow [data-lightbox-action="close"] {
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 28px;
    min-width: 28px;
    height: 28px;
    min-height: 28px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.1rem;
    opacity: 0.18;
}

.gallery-lightbox.is-slideshow [data-lightbox-action="close"]:hover,
.gallery-lightbox.is-slideshow [data-lightbox-action="close"]:focus-visible {
    opacity: 0.75;
}

.collaborative-gallery-settings {
    display: grid;
    gap: 16px;
}

.collaborative-gallery-settings > button {
    width: 100%;
    min-height: 46px;
}

.collaborative-gallery-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.collaborative-gallery-actions > * {
    width: 100%;
    min-height: 46px;
    margin: 0;
    justify-content: center;
}

@media (max-width: 560px) {
    .collaborative-gallery-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .gallery-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 7px;
        padding: 5px 8px;
    }

    .gallery-header img {
        width: 54px;
    }

    .gallery-header h1 {
        font-size: 1.65rem;
        line-height: 1;
    }

    .gallery-header .eyebrow {
        display: none;
    }

    .gallery-back-link {
        font-size: 0.68rem;
        white-space: nowrap;
    }

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

    .gallery-toolbar {
        flex-wrap: nowrap;
    }

    .gallery-lightbox {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 4px;
        padding: 8px;
    }

    .gallery-lightbox button {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
    }
}

/* Elegant, reusable scroll reveals */
.reveal-ready .reveal {
    opacity: 0;
    transition:
        opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        translate 0.8s cubic-bezier(0.22, 1, 0.36, 1),
        scale 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-ready .reveal:not(.reveal-up):not(.reveal-left):not(.reveal-right):not(.reveal-zoom) {
    transition-duration: 0.6s;
}

.reveal-ready .reveal-up {
    translate: 0 35px;
}

.reveal-ready .reveal-left {
    translate: -30px 0;
}

.reveal-ready .reveal-right {
    translate: 30px 0;
}

.reveal-ready .reveal-zoom {
    scale: 0.95;
}

.reveal-ready .reveal.visible {
    opacity: 1;
    translate: 0 0;
    scale: 1;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-ready .reveal,
    .reveal-ready .reveal.visible {
        opacity: 1 !important;
        translate: none !important;
        scale: none !important;
        transition: none !important;
    }
}
