/* ========================================
   Wedding Website - Main Stylesheet
   Gregory & Shannen's Wedding - March 25, 2026
   ======================================== */

/* Alpine.js cloak — hide elements until Alpine initializes */
[x-cloak] { display: none !important; }

/* Self-hosted webfonts */
@font-face {
    font-family: "BickhamScript3ProRegular";
    src: url("../fonts/BickhamScript3ProRegular/font.59c723355c85.woff2") format('woff2'),
        url("../fonts/BickhamScript3ProRegular/font.8e4442f87f88.woff") format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* @group Tokens — CSS Variables: design colors & spacing */
:root {
    /* Base Colors (60%) */
    --white: #FFFFFF;
    --off-white: #FAFAFA;

    /* Accent Colors (30%) */
    --champagne: #DDC2A4;
    --champagne-light: #E8D4BC;
    --champagne-dark: #C9A883;

    /* Supporting Colors (none reserved) */

    /* Neutral Grays */
    --gray-900: #212529;
    --gray-700: #495057;
    --gray-400: #CED4DA;
    --gray-100: #F8F9FA;

    /* Spacing System (8px grid) */
    --space-xs: 0.5rem;
    /* 8px */
    --space-sm: 1rem;
    /* 16px */
    --space-md: 1.5rem;
    /* 24px */
    --space-lg: 2rem;
    /* 32px */
    --space-xl: 3rem;
    /* 48px */
    --space-2xl: 4rem;
    /* 64px */

    /* Typography */
    --font-script: "BickhamScript3ProRegular", cursive;
    --font-serif-body: 'Source Serif 4', 'Playfair Display', Georgia, serif;

    /* Bootstrap link color overrides (brand champagne) */
    --bs-link-color: var(--champagne-dark);
    --bs-link-hover-color: var(--champagne);
    /* Secondary text color used by .text-body-secondary */
    --bs-secondary-color: rgba(var(--bs-body-color-rgb), 0.75);
}

/* ========================================
   @group Links
   Global link styling (non-button anchors)
   ======================================== */

a:not(.btn) {
    color: var(--champagne-dark);
    text-decoration-color: var(--champagne-dark);
}

a:not(.btn):hover,
a:not(.btn):focus {
    color: var(--champagne);
    text-decoration-color: var(--champagne);
}

/* ========================================
   @group Base & Typography
   Base element styles, fonts, and type scale
   ======================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--gray-900);
    background: linear-gradient(135deg, var(--off-white) 0%, var(--champagne-light) 100%);
    min-height: 100vh;
}

.wedding-card {
    font-family: var(--font-serif-body);
}

.wedding-card p,
.wedding-card li {
    letter-spacing: 0.01em;
}

.wedding-card .btn,
.wedding-card .btn * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Headings - Elegant Serif */
h1,
h2,
h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    color: var(--gray-900);
}

/* Unified semantic type scale */
h1 {
    font-size: 2rem;
    line-height: 1.2;
}

@media (min-width: 992px) {
    h1 {
        font-size: 2.4rem;
    }
}

h2 {
    font-size: 1.35rem;
    line-height: 1.35;
}

@media (min-width: 992px) {
    h2 {
        font-size: 1.50rem;
    }
}

h3 {
    font-size: 1.125rem;
    line-height: 1.45;
}

@media (min-width: 992px) {
    h3 {
        font-size: 1.25rem;
    }
}

.lead {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
}

@media (min-width: 992px) {
    .lead {
        font-size: 1.25rem;
    }
}

small {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
}

@media (min-width: 992px) {

    small {
        font-size: 0.9375rem;
    }
}

/* ========================================
   @group Script Typography
   Bickham: sizes and helpers for script headlines
   ======================================== */

.script {
    color: var(--champagne-dark);
    font-family: var(--font-script);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.01em;
    font-variant-ligatures: common-ligatures contextual;
    font-feature-settings: "liga" 1, "calt" 1;
}

/* ========================================
   @group Content Flow
   Readable content column and vertical rhythm for long-form pages
   ======================================== */

.prose {
    max-width: 72ch;
    margin-left: auto;
    margin-right: auto;
}

.prose p,
.prose li {
    line-height: 1.7;
}

/* Section headings spacing within readable column */
.prose h2 {
    margin-top: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.prose h2:first-child {
    margin-top: 0;
}

/* Breathing room between list items */
.prose li+li {
    margin-top: 0.25rem;
}

/* Consistent spacing for lists */
.prose ul,
.prose ol {
    margin-bottom: var(--space-md);
}

/* FAQ: Recently updated callout */
.faq-updates-callout {
    background: linear-gradient(180deg, #FFFDF9 0%, #FBF5EE 100%);
    border: 1px solid var(--champagne-light);
    border-left: 4px solid var(--champagne);
    border-radius: 12px;
    padding: var(--space-md) var(--space-md) 0;
}

.faq-updates-callout > .mb-4 h5 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--champagne-dark);
}

.home-updates-callout {
    padding-bottom: var(--space-md);
}

.home-update-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    column-gap: 0.7rem;
}

.home-update-bullet {
    color: inherit;
    font-size: 1rem;
    line-height: 1.7;
}

.home-update-row p {
    min-width: 0;
}

/* ========================================
   @component Visual Stepper (details/summary)
   Compact, numbered steps with progressive disclosure
   ======================================== */

.stepper {
    list-style: none;
    margin: var(--space-sm) 0 var(--space-md);
    padding: 0;
    display: grid;
    gap: var(--space-sm);
}

.stepper__item {
    position: relative;
    padding-left: 2.5rem;
    /* room for larger marker */
}

/* Connector line */
.stepper__item::before {
    content: "";
    position: absolute;
    left: 1.375rem;
    /* centers under 2.5rem padding */
    top: 1.85rem;
    /* start just below the marker */
    bottom: -0.5rem;
    /* extend a touch past content */
    width: 1px;
    background: var(--champagne-light);
    opacity: 0.8;
}

/* Hide connector for the last item */
.stepper__item:last-child::before {
    display: none;
}

.stepper__marker {
    position: absolute;
    left: 0.5rem;
    top: 0.125rem;
    /* aligned with first line of title */
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--champagne-dark);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(221, 194, 164, 0.4);
}

.stepper__details {
    display: block;
}

.stepper__title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 0.25rem 0.5rem 0.25rem 0;
    border-radius: 6px;
    color: var(--champagne-dark);
}

.stepper__details--static .stepper__title {
    cursor: default;
    user-select: text;
}

.stepper__content {
    margin-top: var(--space-xs);
    color: var(--gray-700);
}

.script-title {
    font-size: 4.5rem;
}

@media (min-width: 992px) {
    .script-title {
        font-size: 5.0rem;
    }
}

.script-subtitle {
    font-size: 3.75rem;
}

@media (min-width: 992px) {
    .script-subtitle {
        font-size: 4.25rem;
    }
}

.script-section {
    font-size: 2.25rem;
}

@media (min-width: 992px) {
    .script-section {
        font-size: 3rem;
    }
}

.script-section-lg {
    font-size: 3.6rem;
}

@media (min-width: 992px) {
    .script-section-lg {
        font-size: 4.6rem;
    }
}

.script-subtitle-sm {
    font-size: 3.125rem;
}

@media (min-width: 992px) {
    .script-subtitle-sm {
        font-size: 3.5rem;
    }
}

.script-tight {
    line-height: 0.95;
}

/*
   Fine-tune spacing after a forced line break in script titles.
   Usage: wrap the text on the line after the <br> in a span.
   Example: "Asked <br> <span class=\"script-pullup-md\">…</span>"
   This lightly reduces the gap between the two lines without
   affecting single-line headings or other script titles.
*/
.script-pullup-md {
    display: inline-block;
    position: relative;
    /* Default: no adjustment on wide viewports */
    top: 0;
}

/* Apply the pull-up only when the first break (br.script-break-md) is active,
   which is at md and smaller viewports in our system. */
@media (max-width: 768px) {
    .script-title .script-pullup-md {
        /* Pull the following line up slightly to tighten the break */
        top: -0.18em;
    }
}

/* Names helper (spacing only) */
.couple-names {
    line-height: 0.9;
}

/*
   Stylistic set helpers
   Use on elements that need alternate glyph shapes (e.g., a clearer "Q").
   Example: <h1 class="script script-title">Frequently Asked <span class="clear-q">Q</span>uestions</h1>
*/
.clear-q {
    /* Bickham’s alternate Q is exposed via swash (swsh) */
    -webkit-font-feature-settings: "liga" 1, "calt" 1, "swsh" 1;
    /* Older Safari/Chrome */
    -moz-font-feature-settings: "liga" 1, "calt" 1, "swsh" 1;
    /* Firefox */
    font-feature-settings: "liga" 1, "calt" 1, "swsh" 1;
    /* Reduce just the Q size ~30% to match A visually */
    font-size: 0.64em;
    /* Increase space after Q so it’s not tighter than & A */
    margin-right: 0.19em;
    /* Maintenance: If script title sizes change, revisit this scaling
       to keep the Q visually balanced with adjacent letters. */
}

/* Other alternates you can try (preserve liga/calt):
   .clear-q { font-feature-settings: "liga" 1, "calt" 1, "salt" 1; }  (stylistic alternate)
   .clear-q { font-feature-settings: "liga" 1, "calt" 1, "ss01" 1; }  (if your cut maps Q under ss01)
*/

br.script-break-md {
    display: none;
}

@media (max-width: 768px) {
    br.script-break-md {
        display: inline;
    }
}

br.script-break-xl {
    display: none;
}

@media (max-width: 1200px) {
    br.script-break-xl {
        display: inline;
    }
}

/* Offset helper to visually center palm over '&' on Home */
.couple-names-offset {
    margin-left: 38px;
}

@media (max-width: 768px) {
    .couple-names-offset {
        margin-left: 0;
    }
}


/* Palm Tree Icon */
.palm-tree-icon {
    color: var(--champagne-dark);
    vertical-align: middle;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

/* Mobile sizing for palm icons in headers (10% smaller) */
@media (max-width: 768px) {

    /* Page header palm: base 120px -> 108px on mobile */
    .palm-tree-icon.palm-page-header {
        width: 70px;
        height: 70px;
    }

    /* Wedding hero header palm: base 96px -> 86.4px on mobile */
    .palm-tree-icon.palm-wedding-header {
        width: 70px;
        height: 70px;
    }
}

/* Invite-only pill */
.badge-invite {
    background-color: var(--champagne);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Button with corner badge wrapper */
.btn-with-badge {
    position: relative;
    display: block;
    transition: transform 0.2s;
}

.btn-with-badge:hover {
    transform: translateY(-2px);
}

/* Remove button's own transform when inside badge wrapper */
.btn-with-badge .btn-primary:hover {
    transform: none;
}

/* Corner badge - overlaps top-right of button */
.badge-new-corner {
    position: absolute;
    top: -8px;
    right: -8px;
    padding: 0.2rem 0.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--champagne-dark);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

/* Secondary nav links — inline row for deprioritized pages */
.nav-secondary-links {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}
.nav-secondary-links a {
    color: var(--champagne-dark);
    text-decoration: none;
    transition: color 0.2s;
}
.nav-secondary-links a:hover {
    color: var(--champagne);
    text-decoration: underline;
}
.nav-secondary-links .separator {
    color: var(--champagne-light);
    margin: 0 0.5rem;
}

/* ========================================
   @group Buttons
   Bootstrap overrides + custom button components
   ======================================== */

.btn-primary {
    /* Bootstrap 5 button theming via CSS variables */
    --bs-btn-bg: var(--champagne);
    --bs-btn-border-color: var(--champagne);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--champagne-dark);
    --bs-btn-hover-border-color: var(--champagne-dark);
    --bs-btn-active-bg: var(--champagne-dark);
    --bs-btn-active-border-color: var(--champagne-dark);
    --bs-btn-disabled-bg: var(--champagne-light);
    --bs-btn-disabled-border-color: var(--champagne-light);
    --bs-btn-disabled-color: rgba(255, 255, 255, 0.85);
    --bs-btn-focus-shadow-rgb: 221, 194, 164;
    /* champagne */

    background-color: var(--champagne);
    border-color: var(--champagne);
    color: white;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    background-color: var(--champagne-dark);
    border-color: var(--champagne-dark);
    transform: translateY(-2px);
    color: white;
}

.btn-primary:active,
.btn-primary.active,
.btn-primary:focus {
    background-color: var(--champagne-dark) !important;
    border-color: var(--champagne-dark) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(221, 194, 164, 0.5) !important;
}

/* Disabled champagne-style button (distinct from outline/Back) */
.btn-disabled {
    background-color: var(--champagne-light) !important;
    border-color: var(--champagne-light) !important;
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 0.75;
    cursor: not-allowed !important;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.btn-disabled:hover,
.btn-disabled:active,
.btn-disabled:focus {
    background-color: var(--champagne-light) !important;
    border-color: var(--champagne-light) !important;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Special RSVP Button - Not RSVPed Yet */
.btn-rsvp-highlight {
    background: linear-gradient(135deg, var(--champagne) 0%, var(--champagne-dark) 100%);
    border: none;
    color: white;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(221, 194, 164, 0.3);
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn-rsvp-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.btn-rsvp-highlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(221, 194, 164, 0.5);
    background: linear-gradient(135deg, var(--champagne-dark) 0%, #D4AF37 100%);
    color: white;
}

.btn-rsvp-highlight:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(221, 194, 164, 0.4);
}

/* RSVP Button - Already Completed */
.btn-rsvp-completed {
    background-color: var(--champagne);
    border-color: var(--champagne);
    color: white;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

/* Move checkmark to the left for completed Edit RSVP button */
.btn-rsvp-completed::before {
    content: '✓';
    margin-right: 8px;
}

.btn-rsvp-completed:hover {
    background-color: var(--champagne-dark);
    border-color: var(--champagne-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(221, 194, 164, 0.3);
}

/* Logout Button - Custom Style */
.btn-logout {
    background-color: var(--white);
    border-color: var(--champagne);
    color: var(--champagne-dark);
    font-weight: 500;
    transition: all 0.2s;
}

/* Champagne outline button */
/* Outline button using brand champagne color */
.btn-outline-champagne {
    /* Bootstrap 5 button theming via CSS variables (ensures consistent disabled/active states) */
    --bs-btn-color: var(--champagne-dark);
    --bs-btn-border-color: var(--champagne);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--champagne);
    --bs-btn-hover-border-color: var(--champagne);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--champagne);
    --bs-btn-active-border-color: var(--champagne);
    --bs-btn-focus-shadow-rgb: 221, 194, 164;
    /* champagne */
    /* Keep outline styling when disabled (HTMX temporarily disables submit buttons) */
    --bs-btn-disabled-color: var(--champagne-dark);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--champagne);
    /* Optional: align with Bootstrap default disabled opacity without washing out color */
    --bs-btn-disabled-opacity: 0.65;

    color: var(--champagne-dark);
    border-color: var(--champagne);
    background-color: transparent;
    transition: all 0.2s ease;
}

.btn-outline-champagne:hover {
    color: #fff;
    background-color: var(--champagne);
    border-color: var(--champagne);
    transform: translateY(-2px);
}


.btn-outline-champagne:active,
.btn-outline-champagne.active,
.btn-outline-champagne:focus {
    color: #fff !important;
    background-color: var(--champagne) !important;
    border-color: var(--champagne) !important;
    box-shadow: 0 0 0 0.2rem rgba(221, 194, 164, 0.35) !important;
    transform: translateY(-1px);
}

/* Ensure disabled state stays on-brand even when HTMX disables the button */
.btn-outline-champagne:disabled,
.btn-outline-champagne.disabled,
fieldset:disabled .btn-outline-champagne {
    color: var(--champagne-dark) !important;
    background-color: transparent !important;
    border-color: var(--champagne) !important;
    opacity: var(--bs-btn-disabled-opacity, 0.65);
}

/* Changed pill for review diffs */
.rsvp-changed-pill {
    display: inline-block;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    color: var(--champagne-dark);
    background-color: rgba(221, 194, 164, 0.18);
}

/* HTMX Loading States */
.htmx-request {
    opacity: 0.6;
    transition: opacity 300ms ease-in-out;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* Loading spinner for buttons during HTMX requests */
button.htmx-request {
    position: relative;
    pointer-events: none;
}

button.htmx-request::after {
    content: "";
    position: absolute;
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

/* Disable pseudo spinner for buttons that manage their own indicator */
button.no-auto-spinner.htmx-request::after {
    content: none;
}

/* @component RSVP Next Button
   Centered spinner replaces label on submit */
.rsvp-next-btn {
    position: relative;
    /* allow centered overlay spinner */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Keep button width stable: hide label but preserve space */
.htmx-request .rsvp-next-btn .rsvp-next-label {
    visibility: hidden;
}

/* Center spinner overlay while request is active */
.htmx-request .rsvp-next-btn .htmx-indicator {
    position: absolute;
    inset: 0;
    /* top/right/bottom/left: 0 */
    margin: auto;
    /* center within button without using transform */
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* @component RSVP Next Tooltip
   CSS-only tooltip replacing Bootstrap.Tooltip on disabled Next button */
.rsvp-next-controller {
    position: relative;
}

.rsvp-next-controller[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: var(--bs-dark, #212529);
    color: #fff;
    padding: 0.35rem 0.65rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1070;
}

.rsvp-next-controller[data-tooltip]:hover::after {
    opacity: 1;
}

/* Smooth transition for HTMX swaps */
#rsvp-card-content.htmx-swapping {
    opacity: 0;
    transition: opacity 200ms ease-out;
}

#rsvp-card-content {
    transition: opacity 200ms ease-in;
}

.btn-logout:hover {
    background-color: var(--champagne);
    border-color: var(--champagne);
    color: white;
    transform: translateY(-2px);
}

.btn-logout:active,
.btn-logout.active,
.btn-logout:focus {
    background-color: var(--champagne) !important;
    border-color: var(--champagne) !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(221, 194, 164, 0.25) !important;
}

/* ========================================
   @group Forms
   Form inputs and accessibility helpers
   ======================================== */

.form-control:focus {
    border-color: var(--champagne);
    box-shadow: 0 0 0 0.2rem rgba(221, 194, 164, 0.25);
}

/* Reusable visually hidden utility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Invitation Choice Cards (radio styled as checkbox cards) */
.invitation-group {
    display: flex;
    flex-wrap: wrap;
    /* allow wrap on small widths to prevent clipping */
    gap: 0.5rem;
}

@media (min-width: 576px) {
    .invitation-group {
        flex-wrap: nowrap;
    }
}

.invitation-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    /* large touch target */
    border: 1px solid var(--champagne);
    background-color: var(--white);
    color: var(--gray-700);
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    /* prevent label wrap */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Use Inter for RSVP interactive labels */
.invitation-choice,
.invitation-choice * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Hover effect only on devices that actually support hover (avoid sticky hover on touch) */
@media (hover: hover) and (pointer: fine) {
    .invitation-choice:hover {
        background-color: var(--champagne-light);
        color: var(--champagne-dark);
    }
}

/* Focus ring via input focus */
.invitation-choice-input:focus-visible+.invitation-choice {
    box-shadow: 0 0 0 0.2rem rgba(221, 194, 164, 0.35);
}

/* Selected state */
.invitation-choice-input:checked+.invitation-choice {
    border-color: var(--champagne-dark);
    background-color: #F4E9DC;
    /* very light champagne tint */
    color: var(--gray-900);
}

.invitation-choice__box {
    width: 18px;
    height: 18px;
    border: 2px solid var(--champagne);
    border-radius: 50%;
    /* radio circle */
    background-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease;
    flex-shrink: 0;
}

.invitation-choice__check {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--champagne-dark);
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.invitation-choice-input:checked+.invitation-choice .invitation-choice__box {
    border-color: var(--champagne-dark);
}

.invitation-choice-input:checked+.invitation-choice .invitation-choice__check {
    opacity: 1;
}

/* ========================================
   @group Cards
   ======================================== */

/* @component Wedding Card */

.wedding-card {
    border: 1px solid var(--gray-400);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: var(--white);
    transition: all 0.3s ease;
}

.wedding-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* ========================================
   @group Alerts
   Bootstrap alert tweaks for wedding site
   ======================================== */

.alert {
    border-radius: 8px;
    border-left: 4px solid var(--champagne);
}

/* Removed variant overrides not in use: .alert-success, .alert-danger */

/* @component Wedding Message - Champagne styled error/info messages */
.wedding-message {
    background-color: var(--white);
    border: 1px solid var(--champagne);
    border-left: 4px solid var(--champagne);
    color: var(--gray-700);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* ========================================
   @group Hero Image
   ======================================== */

.hero-image-container {
    position: relative;
    width: 100%;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Invitation divider under couple names */
.invitation-divider {
    width: 72px;
    height: 1px;
    background-color: var(--champagne);
    margin: var(--space-lg) auto var(--space-sm);
    opacity: 0.9;
}

/* ========================================
   @group Layout Utilities
   ======================================== */

.full-height-container {
    min-height: 100vh;
    padding: 1rem 0;
}

/* Narrower max width for RSVP card on desktop */
.rsvp-card-col,
.site-card-col {
    max-width: 770px;
    /* consistent site-wide card width (~15% wider) */
}

/* Narrow button stack on desktop for Home */
.btn-stack-narrow {
    width: 100%;
}

@media (min-width: 992px) {
    .btn-stack-narrow {
        /* Match reading width for message copy */
        max-width: 42rem;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Floating Home link (outside the card) */
.rsvp-home-row {
    margin-bottom: 1rem;
}

.btn-home-floating {
    background-color: var(--white);
    border: 1px solid var(--champagne);
    color: var(--champagne-dark);
    padding: 0.3rem 0.7rem;
    border-radius: 10px;
    /* match rounded-rectangle buttons */
    font-weight: 500;
    box-shadow: none;
    /* reduce prominence */
}

.btn-home-floating:hover,
.btn-home-floating:focus {
    background-color: var(--champagne);
    border-color: var(--champagne);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* ========================================
      @group Story Timeline
      ======================================== */
.story-sticky-home,
.things-sticky-home,
.photos-sticky-home {
    position: sticky;
    top: 1rem;
    z-index: 20;
    transition: transform 180ms ease, opacity 180ms ease;
    /* Align with story content column */
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

/* Photos: button lives INSIDE the grid column, so column handles alignment.
   Unset the shared width/centering rules — only keep sticky behavior. */
.photos-sticky-home {
    max-width: unset;
    margin: 0 0 0.5rem;
    padding: 0;
}

.story-sticky-home.is-hidden,
.things-sticky-home.is-hidden,
.photos-sticky-home.is-hidden {
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
}

.story-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    max-width: 1040px;
    /* keep media + text within a readable width */
    margin: 0 auto;
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

/* Bottom nav container aligned with content column */
.story-bottom-nav {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
}

/* Photos nav should align exactly with card edges in the same grid column */
.photos-bottom-nav {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* ========================================
   @group Story Chapters & Micro-Galleries
   New chapter-based layout without alternating grid
   ======================================== */

.story-chapter {
    display: block;
    position: relative;
    background: #fff;
    /* revert to crisp white for contrast */
    border: 1px solid var(--champagne-light);
    border-radius: 12px;
    padding: calc(var(--space-md) + 10px) var(--space-md) var(--space-md);
    /* subtle lift + hairline inner border for letterpress feel */
    box-shadow:
        0 1px 8px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(0, 0, 0, 0.04) inset;
}

/* Subtle top accent bar for a printed-card feel */
.story-chapter::before {
    content: "";
    position: absolute;
    top: var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 1px;
    background: var(--champagne-light);
    border-radius: 2px;
    opacity: 0.6;
}

.story-chapter+.story-chapter {
    /* breathing room between chapters; .story-timeline gap also applies */
    margin-top: var(--space-xl);
}

.story-chapter h2 {
    margin-top: 0;
    margin-bottom: var(--space-xs);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.story-blurb {
    margin-top: var(--space-sm);
    margin-bottom: var(--space-xl);
}

/* Blurb body copy uses elegant Source Serif 4 on Our Story page */
.story-blurb p {
    font-family: var(--font-serif-body);
    letter-spacing: 0.01em;
    line-height: 1.7;
}

/* Base image behavior inside chapter galleries */
.story-gallery {
    display: block;
    /* Extra breathing room below galleries before blurb text */
    margin-bottom: var(--space-lg);
}

.story-gallery a {
    display: block;
}

.story-gallery img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

/* Interactive affordance: indicate images are clickable */
.story-gallery a {
    border-radius: 12px;
}

.story-gallery a:hover img {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
}

.story-gallery a:active img {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}

.story-gallery a:focus-visible img {
    outline: none;
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px rgba(221, 194, 164, 0.45), 0 6px 20px rgba(0, 0, 0, 0.24);
}

@media (prefers-reduced-motion: reduce) {
    .story-gallery img {
        transition: none;
    }

    .story-gallery a:hover img,
    .story-gallery a:active img,
    .story-gallery a:focus-visible img {
        transform: none;
    }
}

/* Two images: simple two-column grid */
.story-gallery[data-gallery-size="2"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

/* Optional vertical stack variant for two images */
.story-gallery.stack-vertical {
    display: block !important;
    /* override the size-based grid */
}

.story-gallery.stack-vertical a+a {
    margin-top: var(--space-sm);
}

/* Three images: one large + two stacked */
.story-gallery[data-gallery-size="3"] {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-sm);
}

.story-gallery[data-gallery-size="3"]>a:first-child {
    grid-row: 1 / span 2;
}

/* Sokka layout: balance portrait width so two right landscapes (stacked)
   naturally sum to the same height without cropping or letterboxing. */
.story-gallery[data-gallery-size="3"].sokka-balanced {
    /* Balance portrait width so left height ≈ stacked right heights + gap. */
    grid-template-columns: 1.03fr 1fr;
    /* default for narrower containers */
    align-items: start;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .story-gallery[data-gallery-size="3"].sokka-balanced {
        grid-template-columns: 1.03fr 1fr;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .story-gallery[data-gallery-size="3"].sokka-balanced {
        grid-template-columns: 1.02fr 1fr;
    }
}

@media (min-width: 1200px) {
    .story-gallery[data-gallery-size="3"].sokka-balanced {
        grid-template-columns: 1.01fr 1fr;
    }
}

/* Equalized rows variant for 3-up mosaic (portrait left spanning two rows).
   Ensures the two right images combined height + gap equals the left image height. */
.story-gallery[data-gallery-size="3"].rows-fixed {
    grid-auto-rows: var(--story-row-height, 260px);
}

.story-gallery[data-gallery-size="3"].rows-fixed img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Show entire image for right-hand tiles (no crop) */
.story-gallery[data-gallery-size="3"].rows-fixed>a:not(:first-child) img {
    object-fit: contain;
    background: #fff;
}

@media (min-width: 992px) {
    .story-gallery[data-gallery-size="3"].rows-fixed {
        --story-row-height: 280px;
    }
}

@media (min-width: 1200px) {
    .story-gallery[data-gallery-size="3"].rows-fixed {
        --story-row-height: 300px;
    }
}

/* On small screens, let images flow naturally (no fixed heights). */
@media (max-width: 767.98px) {
    .story-gallery[data-gallery-size="3"].rows-fixed {
        display: block;
    }

    .story-gallery[data-gallery-size="3"].rows-fixed a+a {
        margin-top: var(--space-sm);
    }

    .story-gallery[data-gallery-size="3"].rows-fixed img {
        height: auto;
    }
}

/* Four images: tidy 2×2 */
.story-gallery[data-gallery-size="4"] {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

/* On small screens, stack standard grids vertically for readability */
@media (max-width: 767.98px) {

    .story-gallery[data-gallery-size="2"],
    .story-gallery[data-gallery-size="3"],
    .story-gallery[data-gallery-size="4"] {
        display: block;
    }

    .story-gallery[data-gallery-size="2"] a+a,
    .story-gallery[data-gallery-size="3"] a+a,
    .story-gallery[data-gallery-size="4"] a+a {
        margin-top: var(--space-sm);
    }
}

/* Custom layout for Engagement gallery: wide hero + three tiles */
.story-gallery.engagement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-sm);
}

.story-gallery.engagement-grid>a:first-child {
    grid-column: 1 / -1;
    /* full width top row */
}

/* Engagement mosaic: hero left spanning two rows; small banner at bottom */
.story-gallery.engagement-mosaic {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-sm);
}

.story-gallery.engagement-mosaic>a:first-child {
    grid-column: 1 / 2;
    grid-row: 1 / span 2;
    /* hero spans two rows */
}

.story-gallery.engagement-mosaic>a:last-child {
    grid-column: 1 / -1;
    /* full-width banner on third row */
}

@media (max-width: 767.98px) {
    .story-gallery.engagement-mosaic {
        display: block;
    }

    .story-gallery.engagement-mosaic a+a {
        margin-top: var(--space-sm);
    }
}

@media (max-width: 767.98px) {
    .story-gallery.engagement-grid {
        display: block;
    }

    .story-gallery.engagement-grid a+a {
        margin-top: var(--space-sm);
    }
}

/* Engagement split 2×2: equal top row; ratio-balanced bottom row */
.story-gallery.engagement-split {
    display: block;
}

.story-gallery.engagement-split .eng-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.story-gallery.engagement-split .eng-bottom {
    display: grid;
    /* Beach (left) AR ≈ 0.420; Ring (right) AR ≈ 0.753 → columns 0.753 : 0.420 */
    grid-template-columns: 0.753fr 0.420fr;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

@media (max-width: 767.98px) {

    .story-gallery.engagement-split .eng-top,
    .story-gallery.engagement-split .eng-bottom {
        display: block;
    }

    .story-gallery.engagement-split .eng-top a+a,
    .story-gallery.engagement-split .eng-bottom a+a {
        margin-top: var(--space-sm);
    }
}

/* Where We Are Now: two-row, ratio-balanced per row */
.story-gallery.where-now-split {
    display: block;
}

.story-gallery.where-now-split .wn-top {
    display: grid;
    /* Both are 1440×1080 (AR 0.75), so equal halves */
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.story-gallery.where-now-split .wn-bottom {
    display: grid;
    /* Left 1500×1000 (AR 0.667), Right 810×1080 (AR 1.333) => 2:1 widths */
    grid-template-columns: 2fr 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

@media (max-width: 767.98px) {

    .story-gallery.where-now-split .wn-top,
    .story-gallery.where-now-split .wn-bottom {
        display: block;
    }

    .story-gallery.where-now-split .wn-top a+a,
    .story-gallery.where-now-split .wn-bottom a+a {
        margin-top: var(--space-sm);
    }
}

/* ========================================
   @group Lightbox
   Minimal, accessible image viewer (shared)
   ======================================== */

/* Body scroll lock while lightbox is open */
.lightbox-open {
    overflow: hidden;
}

/* Full-viewport overlay with dark backdrop */
.lightbox-overlay {
    position: fixed;
    top: var(--lightbox-vv-top, 0px);
    left: var(--lightbox-vv-left, 0px);
    width: var(--lightbox-vv-width, 100vw);
    height: var(--lightbox-vv-height, 100vh);
    z-index: 1055;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fade transition */
.lightbox-enter { transition: opacity 200ms ease; }
.lightbox-enter-start { opacity: 0; }
.lightbox-enter-end { opacity: 1; }
.lightbox-leave { transition: opacity 150ms ease; }
.lightbox-leave-start { opacity: 1; }
.lightbox-leave-end { opacity: 0; }

/* Modal body — gesture target, flex-centered content */
.lightbox-body {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    max-height: none;
    box-sizing: border-box;
    /* Prevent browser scroll/overscroll during custom pinch/pan */
    touch-action: none;
    overscroll-behavior: contain;
    /* Account for browser chrome + notches on mobile */
    padding-left: max(0.75rem, env(safe-area-inset-left));
    padding-right: max(0.75rem, env(safe-area-inset-right));
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* Let image/video size naturally within the visible viewport.
   JS applies pixel max-width/max-height based on the active visual viewport. */
.lightbox-image,
.lightbox-video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.lightbox-image {
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-video {
    background: #000;
    touch-action: auto;
}

/* Zoom canvas wraps the image and receives transforms */
.lightbox-zoom-canvas {
    will-change: transform;
    transform-origin: center center;
    display: inline-block;
}

.lightbox-zoom-canvas.is-video {
    transform: none !important;
}

/* Dynamic visual viewport sizing is applied via JS custom properties on open. */

/* Button positioning (absolute within .lightbox-body) */
.lightbox-btn-pos-download {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0.75rem;
}
.lightbox-btn-pos-close {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0.75rem;
}
.lightbox-btn-pos-prev {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0.5rem;
}
.lightbox-btn-pos-next {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 0.5rem;
}

.lightbox-load-more-wrap {
    position: absolute;
    left: 50%;
    bottom: max(1rem, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    z-index: 6;
    pointer-events: none;
    width: min(100%, calc(100% - 7rem));
    display: flex;
    justify-content: center;
}

.lightbox-load-more-btn {
    pointer-events: auto;
    max-width: 100%;
    white-space: nowrap;
}

.lightbox-prev,
.lightbox-next {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 24px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 5; /* ensure above zoom canvas */
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-prev:focus,
.lightbox-next:focus {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.55);
}

/* Lightbox close button */
.lightbox-close {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 6; /* keep above arrows */
}

.lightbox-close:hover,
.lightbox-close:focus {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.55);
}


/* ========================================
   @group Utilities
   Project utility classes
   ======================================== */

/* Removed unused utilities: .text-champagne-dark, .border-champagne-light */
/* Removed unused: .invitation-subtitle */

/* Invitation lines: consistent typography + spacing */
.invitation-line {
    font-family: var(--font-serif-body);
    margin-bottom: 0.75rem;
    line-height: 1.55;
    letter-spacing: 0.01em;
}

@media (min-width: 992px) {
    .invitation-line {
        margin-bottom: 1rem;
        line-height: 1.65;
    }
}


.invitation-callout {
    font-family: var(--font-serif-body);
    font-weight: 600;
}

/* Home page: keep the invitation copy in Playfair for a formal headline feel */
.home-invitation .invitation-line {
    font-family: 'Playfair Display', Georgia, serif;
}

.home-invitation .invitation-link {
    color: var(--champagne-dark);
    font-weight: 600;
    text-decoration-color: rgba(201, 168, 131, 0.7);
    text-underline-offset: 0.15em;
}

.home-invitation .invitation-link:hover,
.home-invitation .invitation-link:focus-visible {
    color: var(--champagne);
    text-decoration-color: rgba(201, 168, 131, 0.9);
}

/* Extra breathing room after couple names */
.couple-names+.invitation-line {
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .couple-names+.invitation-line {
        margin-top: 1rem;
    }
}

/* (Removed) .rsvp-script-title and tag-based script sizing in favor of .script-*
   helpers above. */

/* Guest names (RSVP): use elegant serif */
.guest-name-script {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.125rem;
    /* align with h3 scale */
    line-height: 1.45;
    color: var(--gray-900);
}

@media (min-width: 768px) {
    .guest-name-script {
        font-size: 1.25rem;
    }
}

/* RSVP-only mobile bump for script-subtitle (step headings) */
.rsvp-card-col .script-subtitle {
    font-size: 4rem;
    /* mobile: a touch larger than global 3.75rem */
}

@media (min-width: 992px) {
    .rsvp-card-col .script-subtitle {
        font-size: 4.25rem;
        /* align with global desktop */
    }
}

/* Vertically center text (and arrows) inside buttons */
.btn-align-middle {
    display: inline-flex;
    align-items: center;
}

/* Shared bottom navigation */
.nav-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

@media (max-width: 767.98px) {
    .nav-controls {
        flex-direction: column-reverse;
        align-items: center;
    }

    .nav-controls .btn {
        width: 100%;
        max-width: 22rem;
        justify-content: center;
        text-align: center;
    }
}

/* Larger spacing around RSVP headings and footers */
.rsvp-title-gap {
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .rsvp-title-gap {
        margin-top: 1.5rem;
    }
}

.rsvp-footer-gap {
    margin-top: 3.5rem;
}

@media (min-width: 768px) {
    .rsvp-footer-gap {
        margin-top: 4.5rem;
    }
}

/* Guest rows: coherent spacing across breakpoints */
.rsvp-guest-row {
    gap: 0.75rem 1.25rem !important;
}

@media (min-width: 768px) {
    .rsvp-guest-row {
        gap: 1rem 2rem !important;
    }
}

.rsvp-guest-row .guest-name-script {
    flex: 1 1 auto;
    min-width: 200px;
    /* ensures breathing room against radios on tablet */
}

.rsvp-guest-row .invitation-group {
    flex: 0 0 auto;
}

/* Add vertical breathing room between stacked guest rows on mobile */
.rsvp-guest-row+.rsvp-guest-row {
    margin-top: 2.75rem;
}

@media (min-width: 768px) {
    .rsvp-guest-row+.rsvp-guest-row {
        margin-top: 1.25rem;
    }
}

/* ==============================
   Review Page Hierarchy Tweaks
   ============================== */
.rsvp-review-event {
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .rsvp-review-event {
        margin-top: 2.25rem;
    }
}

.rsvp-review-event+.rsvp-review-event {
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .rsvp-review-event+.rsvp-review-event {
        margin-top: 2.75rem;
    }
}

.rsvp-review-title {
    font-family: var(--font-serif-body);
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.125rem;
    /* align with h3 scale */
}

@media (min-width: 768px) {
    .rsvp-review-title {
        font-size: 1.25rem;
    }
}

/* RSVP titles (event sections) */
.rsvp-event-title {
    font-family: var(--font-serif-body);
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.125rem;
    /* align with h3 scale */
}

@media (min-width: 768px) {
    .rsvp-event-title {
        font-size: 1.25rem;
    }
}

.rsvp-event-meta {
    font-family: var(--font-serif-body);
    font-style: normal;
    /* remove italics for cleaner look */
    letter-spacing: 0.01em;
}

.guest-name-script-sm {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
    /* meta scale mobile */
    line-height: 1.5;
    color: var(--gray-900);
}

@media (min-width: 768px) {
    .guest-name-script-sm {
        font-size: 1.0625rem;
    }
}

/* Review page: switch guest names to Source Serif 4, scoped */
.rsvp-review-event .guest-name-script-sm {
    font-family: var(--font-serif-body);
    font-size: 1rem;
    letter-spacing: 0.01em;
}

@media (min-width: 768px) {
    .rsvp-review-event .guest-name-script-sm {
        font-size: 1.0625rem;
    }
}

/* RSVP content area: increase horizontal padding under hero image */
#rsvp-card-content {
    padding-left: 1.5rem;
    /* override Bootstrap px-3 on xs */
    padding-right: 1.5rem;
    padding-top: 1rem;
    /* add breathing room under hero on RSVP */
}

/* ==============================
   Event Meta (shared component)
   ============================== */
.event-meta {
    font-family: var(--font-serif-body);
    color: var(--gray-900);
    letter-spacing: 0.01em;
}

.event-meta--center {
    max-width: 42ch;
    margin-left: auto;
    margin-right: auto;
}

.event-meta__date {
    font-weight: 600;
}

.event-meta__sub {
    color: var(--gray-700);
}

.event-description {
    display: block;
}

.event-description[open]>.event-description__summary::after,
.event-description>.event-description__summary::after {
    /* reserve space for marker to avoid layout shift */
    content: '';
}

.event-description__summary {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    user-select: none;
    color: var(--champagne-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
}

.event-description__summary:hover,
.event-description__summary:focus {
    color: var(--champagne);
}

.event-description__content {
    margin-top: 0.25rem;
}

/* Limit description height visually when not open via details/summary is not trivial;
   for this pass we keep it fully collapsed until expanded. */

/* Wedding/Additional: guest names in Source Serif 4 with reduced size */
.rsvp-wedding-step .guest-name-script,
.rsvp-additional-step .guest-name-script,
.rsvp-dietary-step .guest-name-script {
    font-family: var(--font-serif-body);
    font-size: 1.0625rem;
    /* slightly larger on mobile to balance Inter labels */
    letter-spacing: 0.01em;
}

@media (min-width: 768px) {

    .rsvp-wedding-step .guest-name-script,
    .rsvp-additional-step .guest-name-script,
    .rsvp-dietary-step .guest-name-script {
        font-size: 1.125rem;
    }
}

/* Wedding step: calm the instruction line */
.rsvp-instruction {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.95rem;
}

/* Subtle separators between stacked guest rows for readability */
/* Wedding: rows are wrapped in .mb-3 containers, so target next wrapper's row */
.rsvp-wedding-step .mb-3+.mb-3 .rsvp-guest-row,
/* Future-proof: if rows are direct siblings */
.rsvp-wedding-step .rsvp-guest-row+.rsvp-guest-row {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
}

/* Additional Events: add consistent spacing and separators for readability */
.additional-event .rsvp-guest-row+.rsvp-guest-row {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
    /* match Wedding: distance from divider to next content */
}

.additional-event {
    /* breathing room between events */
}

/* Neutralize global stacked-row margin on Additional; rely on divider padding */
.rsvp-additional-step .rsvp-guest-row+.rsvp-guest-row {
    /* match Wedding: distance from previous row bottom to divider */
    margin-top: 1rem;
}

/* Dietary: no dividers; use more space handled via template classes */

/* Slightly reduce label text to balance with Source Serif 4 names while preserving 44px hit target */
.invitation-choice__label {
    font-size: 0.95rem;
}

/* Larger bottom spacing helpers */
.mb-6 {
    margin-bottom: 4rem !important;
}

/* Additional step: render guest names in Source Serif 4 like Wedding */
.rsvp-additional-step .guest-name-script {
    font-family: var(--font-serif-body);
    letter-spacing: 0.01em;
}

/* Wedding meta: dedicated layout and Source Serif 4 type */
.wedding-meta {
    font-family: var(--font-serif-body);
    letter-spacing: 0.01em;
}

.wedding-meta__date {
    font-weight: 600;
    font-size: 1.125rem;
}

.wedding-meta__time,
.wedding-meta__location {
    /* inherit color; avoid muted styles */
    font-size: 1rem;
}

.wedding-meta__desc-preview {
    display: inline;
}

/* (Expand/Collapse link removed on Wedding page) */

@media (min-width: 576px) {
    #rsvp-card-content {
        padding-left: 2rem;
        padding-right: 2rem;
        padding-top: 1.25rem;
    }
}

@media (min-width: 768px) {
    #rsvp-card-content {
        padding-left: 4rem;
        padding-right: 4rem;
        padding-top: 1.5rem;
    }

    /* beyond px-md-5 (3rem) */
}

@media (min-width: 992px) {
    #rsvp-card-content {
        padding-left: 4.5rem;
        padding-right: 4.5rem;
        padding-top: 1.75rem;
    }
}

@media (min-width: 1200px) {
    #rsvp-card-content {
        padding-left: 5rem;
        padding-right: 5rem;
        padding-top: 2rem;
    }
}

/* RSVP Overview: remove extra top padding to match other pages' palm spacing */
#rsvp-card-content.no-top-pad {
    padding-top: 0 !important;
}

/* ========================================
   @group Pages — Travel & Stay
   Page-specific tweaks for Travel & Stay
   ======================================== */

.travel-and-stay-page .flights-subheading {
    margin-left: var(--space-sm);
}

/* ========================================
   @group Pages — Schedule
   ======================================== */

.schedule-page {
    --schedule-monstera-url: url("../../schedule/images/monstera-leaf.a8fca560ad54.svg");
    --schedule-type-date: 1.25rem;
    --schedule-type-title: 1.125rem;
    --schedule-type-body: 1rem;
    --schedule-type-utility: 0.875rem;
    --schedule-type-badge: 0.6875rem;
}

.schedule-callout {
    padding: 1rem 1.125rem;
    margin-bottom: 2rem !important;
}

.schedule-callout-body {
    max-width: 62ch;
    margin-bottom: 0.65rem;
    font-size: var(--schedule-type-body);
    line-height: 1.65;
    color: rgba(61, 56, 50, 0.82);
}

.schedule-personalized-note {
    max-width: 62ch;
    margin-top: -0.25rem;
    font-size: var(--schedule-type-utility);
    line-height: 1.5;
    color: rgba(61, 56, 50, 0.64);
}

.schedule-note-title-inline {
    font-weight: inherit;
    color: inherit;
}

.schedule-key {
    max-width: 62ch;
    margin-top: 0.125rem;
    font-size: var(--schedule-type-utility);
    line-height: 1.5;
    color: rgba(61, 56, 50, 0.64);
}

.schedule-monstera-icon {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    background-color: var(--gray-700);
    -webkit-mask-image: var(--schedule-monstera-url);
    mask-image: var(--schedule-monstera-url);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    flex: 0 0 auto;
}

.schedule-monstera-icon--sm {
    width: 0.95rem;
    height: 0.95rem;
}

.schedule-date-heading {
    margin-top: 2.1rem;
    margin-bottom: 1.05rem;
    font-size: var(--schedule-type-date);
    font-weight: 600;
    line-height: 1.3;
    color: rgba(61, 56, 50, 0.9);
}

.schedule-date-heading--first {
    margin-top: 0;
}

.schedule-day-group {
    margin-bottom: 2.25rem;
}

.schedule-event {
    position: relative;
}

.schedule-event + .schedule-event {
    margin-top: 1.7rem;
}

.schedule-event + .schedule-event::before {
    content: "";
    position: absolute;
    top: -0.85rem;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(61, 56, 50, 0.06);
}

.schedule-event--hosted .schedule-event-gutter-marker {
    position: absolute;
    top: calc(0.15rem + 2px);
    left: -1.25rem;
}

.schedule-event-title {
    margin: 0;
    font-size: var(--schedule-type-title);
    font-weight: 600;
    line-height: 1.32;
    letter-spacing: -0.01em;
}

.schedule-event-meta {
    max-width: 62ch;
    margin-top: 0.25rem;
    font-size: var(--schedule-type-body);
    line-height: 1.55;
    color: rgba(61, 56, 50, 0.74);
}

.schedule-event-description {
    max-width: 62ch;
    margin-top: 0.35rem;
    font-size: var(--schedule-type-body);
    line-height: 1.65;
    color: rgba(61, 56, 50, 0.82);
}

/* Keep schedule footer action styles in sync with the mirrored things-card footer actions
   in activities/static/activities/css/things-page.css. */
.schedule-event-footer {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    margin-top: 0.7rem;
    font-size: var(--schedule-type-utility);
    font-weight: 400;
    line-height: 1.45;
    color: rgba(61, 56, 50, 0.62);
}

.schedule-event-footer-status {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.schedule-event-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    background: rgba(112, 102, 92, 0.14);
    color: rgba(73, 66, 59, 0.92);
    font-size: var(--schedule-type-badge);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
}

.schedule-event-footer-actions {
    display: inline-flex;
    align-items: flex-start;
    flex: 0 1 auto;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
    min-width: 0;
}

.schedule-event-footer-disclosure {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
}

.schedule-event-footer-action,
.schedule-event-footer a,
.schedule-event-footer button {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.08rem 0.12rem;
    margin: -0.08rem -0.12rem;
    color: var(--champagne-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 0.16em;
    text-decoration-thickness: 1.5px;
    text-decoration-color: rgba(201, 168, 131, 0.52);
    white-space: nowrap;
}

.schedule-event-footer button {
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.schedule-event-footer a:hover,
.schedule-event-footer a:focus-visible,
.schedule-event-footer button:hover,
.schedule-event-footer button:focus-visible {
    color: var(--champagne-dark);
    text-decoration-color: rgba(201, 168, 131, 0.78);
}

.schedule-outbound-arrow {
    display: inline-block;
    margin-left: 0.08rem;
    font-size: 0.78em;
    line-height: 1;
    transform: translateY(-0.02em);
}

.schedule-arrow {
    display: inline-block;
    margin-left: 0.14rem;
    font-size: 1.02em;
    line-height: 1;
    transition: transform 0.2s ease;
}

.schedule-event-guest-list {
    margin-top: 0.55rem;
}

.schedule-event-guest-list-inner {
    padding-left: 0.5rem;
}

.schedule-event-guest {
    font-size: var(--schedule-type-utility);
    line-height: 1.5;
    color: rgba(61, 56, 50, 0.72);
}

.schedule-event-guest + .schedule-event-guest {
    margin-top: 0.15rem;
}

[aria-expanded="true"] .schedule-arrow {
    transform: rotate(90deg);
}

@media (min-width: 768px) {
    .schedule-callout {
        padding: 1.125rem 1.25rem;
    }

    .schedule-page {
        --schedule-type-date: 1.375rem;
    }

    .schedule-date-heading {
        margin-top: 2.6rem;
    }

    .schedule-day-group {
        margin-bottom: 2.6rem;
    }

    .schedule-event + .schedule-event {
        margin-top: 1.9rem;
    }

    .schedule-event + .schedule-event::before {
        top: -0.95rem;
    }

    .schedule-event--hosted .schedule-event-gutter-marker {
        left: -1.5rem;
    }
}

/* ========================================
   @group Photos Gallery
   Time-grouped guest photo gallery
   ======================================== */

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

@media (min-width: 576px) {
    .photos-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
}

@media (min-width: 992px) {
    .photos-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
}

/* ── Day + period group headers ── */
.gallery-time-header,
.gallery-period-header {
    grid-column: 1 / -1;
}

.gallery-time-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 0 1rem;
    /* Sticky with hide transition */
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(to bottom, var(--white) 0%, var(--white) 85%, transparent 100%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    will-change: transform;
}

.gallery-time-header.is-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.gallery-time-header:first-child {
    padding-top: 1.5rem;
}

.gallery-time-header-line {
    flex: 1;
    height: 1px;
    background: var(--champagne);
    opacity: 0.4;
    min-width: 1.25rem;
}

.gallery-period-header {
    padding: 0.15rem 0 0.5rem;
}

.gallery-toggle-btn {
    border: none;
    background: transparent;
    text-align: left;
    display: inline-flex;
    align-items: baseline;
    gap: 0.45rem;
    color: var(--gray-900);
    padding: 0;
}

.gallery-day-toggle {
    flex: 0 1 auto;
}

.gallery-time-header .script {
    white-space: nowrap;
    font-size: 2.8rem;
}

@media (min-width: 576px) {
    .gallery-time-header .script {
        font-size: 3.2rem;
    }
}

@media (min-width: 992px) {
    .gallery-time-header .script {
        font-size: 3.75rem;
    }
}

.gallery-header-count {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    color: var(--gray-700);
    letter-spacing: 0.02em;
}

.gallery-period-toggle {
    padding-left: 1.25rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.gallery-day-stack {
    display: none;
    border: none;
    background: transparent;
    padding: 0.35rem 0 0;
    margin-left: 1.25rem;
    cursor: pointer;
    align-items: center;
}

.gallery-day-header.is-collapsed .gallery-day-stack {
    display: inline-flex;
}

.gallery-day-stack-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    background-color: var(--gray-100);
    background-size: cover;
    background-position: center;
    margin-left: -12px;
}

.gallery-day-stack-thumb:first-child {
    margin-left: 0;
}

.gallery-day-stack:hover .gallery-day-stack-thumb {
    transform: translateY(-1px);
}

.gallery-period-header.is-collapsed {
    opacity: 0.86;
}

/* Keep per-day wrapper from breaking gallery grid layout */
.gallery-day-photos {
    display: contents;
}

/* ── Photo cards ── */
.photos-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #f0f0f0;
    transition: box-shadow 0.2s ease;
}

.photos-gallery-item a {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
}

.photos-gallery-item img,
.photos-review-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.photos-gallery-item:hover img {
    transform: scale(1.03);
}

.photos-gallery-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Caption overlay on image ── */
.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 6px 4px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
    font-family: var(--font-serif-body);
    font-size: 0.6875rem;
    color: #fff;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}

.gallery-item-media-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 0.08rem 0.38rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.photos-gallery-play-badge,
.photos-review-play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.58);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
    pointer-events: none;
}

.photos-review-play-badge {
    width: 2.4rem;
    height: 2.4rem;
}

/* ── Delete button (hover-reveal on image) ── */
.photos-gallery-item .photo-delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.photos-gallery-item:hover .photo-delete-btn,
.photos-gallery-item:focus-within .photo-delete-btn {
    opacity: 1;
}

.photos-gallery-item .photo-delete-btn:hover {
    background: rgba(180, 30, 30, 0.85);
}

@media (max-width: 575.98px) {
    .photos-gallery-item .photo-delete-btn {
        opacity: 0.85;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}

.photos-empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--gray-700);
}

.photos-empty-state .photos-empty-palm {
    color: var(--champagne);
    opacity: 0.35;
    margin-bottom: 1rem;
}

.photos-empty-state p {
    font-family: var(--font-serif-body);
    font-size: 1.0625rem;
    font-style: italic;
    color: var(--champagne-dark);
}

/* ── Photos subtitle ── */
.photos-subtitle {
    font-family: var(--font-serif-body);
    font-size: 1.0625rem;
    color: var(--gray-700);
    letter-spacing: 0.02em;
    max-width: 28em;
    margin-left: auto;
    margin-right: auto;
}

/* Gallery view switcher */
.photos-gallery-switcher {
    display: flex;
    justify-content: center;
    margin: 0 0 0.85rem;
}

.photos-gallery-switcher-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem;
    border-radius: 999px;
    background: rgba(201, 168, 131, 0.12);
    border: 1px solid rgba(201, 168, 131, 0.32);
}

.photos-gallery-switcher-btn {
    border: none;
    background: transparent;
    color: var(--gray-700);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.photos-gallery-switcher-btn.is-active {
    background: var(--white);
    color: var(--champagne-dark);
    box-shadow: 0 8px 18px rgba(110, 78, 36, 0.10), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.photos-gallery-switcher-btn:hover:not(:disabled),
.photos-gallery-switcher-btn:focus-visible {
    color: var(--champagne-dark);
}

.photos-gallery-switcher-btn:focus-visible {
    outline: 2px solid rgba(201, 168, 131, 0.72);
    outline-offset: 2px;
}

.photos-gallery-switcher-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Gallery bottom spacing */
.photos-gallery {
    padding-bottom: 1rem;
}

.photos-gallery-view-note {
    text-align: center;
    color: var(--gray-700);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.88rem;
    margin: 0 0 1rem;
}

/* Load more button spanning full grid */
.photos-load-more-wrap {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 1.5rem;
}

.gallery-load-more-btn {
    border-radius: 999px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 8px 20px rgba(110, 78, 36, 0.12), 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.gallery-load-more-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(110, 78, 36, 0.16), 0 4px 10px rgba(0, 0, 0, 0.08);
}

.gallery-load-more-btn--surface {
    --bs-btn-color: var(--champagne-dark);
    --bs-btn-bg: var(--white);
    --bs-btn-border-color: rgba(201, 168, 131, 0.82);
    --bs-btn-hover-color: var(--champagne-dark);
    --bs-btn-hover-bg: #F8F0E5;
    --bs-btn-hover-border-color: var(--champagne);
    --bs-btn-active-color: var(--champagne-dark);
    --bs-btn-active-bg: #F2E5D5;
    --bs-btn-active-border-color: var(--champagne-dark);
    --bs-btn-focus-shadow-rgb: 221, 194, 164;
    --bs-btn-disabled-color: var(--champagne-dark);
    --bs-btn-disabled-bg: var(--white);
    --bs-btn-disabled-border-color: rgba(201, 168, 131, 0.5);

    background-color: var(--white);
    border-color: rgba(201, 168, 131, 0.82);
    color: var(--champagne-dark);
}

.gallery-load-more-btn--surface:hover {
    background-color: #F8F0E5;
    border-color: var(--champagne);
    color: var(--champagne-dark);
}

.gallery-load-more-btn--surface:active,
.gallery-load-more-btn--surface:focus {
    background-color: #F2E5D5 !important;
    border-color: var(--champagne-dark) !important;
    color: var(--champagne-dark) !important;
    box-shadow: 0 0 0 0.2rem rgba(221, 194, 164, 0.28), 0 8px 20px rgba(110, 78, 36, 0.12) !important;
}

.gallery-load-more-btn svg {
    width: 20px;
    height: 20px;
    margin-right: 0.25rem;
}

.gallery-load-more-btn .gallery-load-more-loading {
    display: none;
}

.gallery-load-more-btn.htmx-request .gallery-load-more-label {
    display: none;
}

.gallery-load-more-btn.htmx-request .gallery-load-more-loading {
    display: inline;
}

/* ── Sticky share button (anchors inside card) ── */
.photos-floating-btn {
    position: sticky;
    bottom: 1rem;
    z-index: 100;
    display: flex;
    width: fit-content;
    margin: 1.25rem 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--champagne);
    border-radius: 999px;
    background: var(--champagne);
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(160, 120, 60, 0.24), 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.photos-floating-btn:hover {
    background: var(--champagne-dark);
    border-color: var(--champagne-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(110, 78, 36, 0.24), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photos-floating-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photos-floating-btn svg {
    flex-shrink: 0;
}

.photos-page .photos-bottom-nav--surface-back .btn-outline-champagne[data-testid="back"] {
    background-color: var(--white);
}

@media (max-width: 575.98px) {
    .photos-floating-btn {
        margin-top: 1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ── Desktop drag/drop overlay ── */
.photos-drag-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(17, 24, 39, 0.42);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    pointer-events: none;
}

.photos-drag-overlay-card {
    min-width: min(24rem, 92vw);
    text-align: center;
    border-radius: 18px;
    border: 1px solid rgba(201, 168, 131, 0.52);
    background: rgba(255, 253, 249, 0.98);
    color: var(--gray-900);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.30);
    padding: 1.35rem 1.4rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.photos-drag-overlay-icon {
    width: 2.7rem;
    height: 2.7rem;
    margin: 0 auto 0.65rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--champagne-dark);
    background: rgba(232, 212, 188, 0.45);
    border: 1px solid rgba(201, 168, 131, 0.5);
}

.photos-drag-overlay-title {
    font-size: 1rem;
    line-height: 1.3;
    color: var(--gray-900);
}

.photos-drag-overlay-subtitle {
    font-size: 0.86rem;
    line-height: 1.3;
    color: var(--gray-700);
}

@media (max-width: 767.98px) {
    .photos-drag-overlay {
        display: none !important;
    }
}

/* ── Inline review section ── */
.photos-review-section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    border: 1px solid var(--champagne-light);
    border-radius: 12px;
    background: var(--off-white);
}

.photos-review-heading {
    font-family: var(--font-serif-body);
    font-size: 1.0625rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
    text-align: center;
}

.photos-review-grid-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

/* Right edge gradient hint (only shown when strip still has content to the right) */
.photos-review-grid-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 12px; /* account for scrollbar padding */
    width: 56px;
    background: linear-gradient(to right, rgba(250, 250, 250, 0) 0%, rgba(250, 250, 250, 0.9) 58%, rgba(250, 250, 250, 1) 100%);
    pointer-events: none;
    opacity: 0;
    border-radius: 0 8px 8px 0;
    transition: opacity 0.15s ease;
}

.photos-review-grid-wrapper.has-overflow-right::after {
    opacity: 1;
}

.photos-review-strip-chevron {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(212, 176, 124, 0.35);
    background: rgba(255, 255, 255, 0.94);
    color: var(--champagne-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photos-review-strip-chevron:hover {
    transform: translateY(-50%) scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.photos-review-strip-chevron:focus-visible {
    outline: 2px solid var(--champagne-dark);
    outline-offset: 2px;
}

.photos-review-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 4px 12px 4px; /* bottom padding for scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--champagne-light) transparent;
    -webkit-overflow-scrolling: touch;
}

/* Webkit scrollbar styling */
.photos-review-grid::-webkit-scrollbar {
    height: 6px;
}

.photos-review-grid::-webkit-scrollbar-track {
    background: transparent;
}

.photos-review-grid::-webkit-scrollbar-thumb {
    background-color: var(--champagne-light);
    border-radius: 3px;
}

.photos-review-card {
    flex: 0 0 auto;
    width: 140px;
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--champagne-light);
    border: 1px solid var(--gray-400);
    /* Promote to GPU layer to prevent tearing during scroll */
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.photos-review-preview {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
    cursor: zoom-in;
}

.photos-review-preview:focus-visible {
    outline: 2px solid rgba(201, 168, 131, 0.95);
    outline-offset: -2px;
}

.photos-review-card img,
.photos-review-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.18s ease;
}

.photos-review-video-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0.7rem;
    background:
        linear-gradient(180deg, rgba(24, 22, 20, 0.18) 0%, rgba(24, 22, 20, 0.62) 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), transparent 50%),
        linear-gradient(135deg, rgba(201, 168, 131, 0.9), rgba(120, 96, 74, 0.96));
}

.photos-review-video-fallback-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: rgba(69, 53, 36, 0.96);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Per-photo remove button */
.photos-review-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    transition: background 0.15s ease;
}

.photos-review-remove:hover {
    background: rgba(180, 30, 30, 0.85);
}

/* Status overlay - full cover, hidden by default */
.photos-review-card .status-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.photos-review-card.is-error .status-overlay,
.photos-review-card.is-duplicate .status-overlay {
    opacity: 1;
    background: rgba(33, 37, 41, 0.30);
}

.photos-review-card.is-error .status-overlay {
    background: rgba(100, 90, 80, 0.28);
}

.photos-review-card.is-duplicate .status-overlay span:empty,
.photos-review-card.is-error .status-overlay span:empty {
    display: none;
}

.photos-review-card .status-overlay span {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(201, 168, 131, 0.8);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.photos-review-card.is-done img {
    filter: saturate(0.68) brightness(0.9);
}

.photos-review-card.is-duplicate img {
    filter: saturate(0.18) brightness(0.86);
}

.photos-review-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 700;
    z-index: 2;
    pointer-events: none;
}

.photos-review-badge--done {
    color: var(--champagne-dark);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(201, 168, 131, 0.78);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
}

.photos-review-badge--error {
    color: var(--champagne-dark);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(201, 168, 131, 0.78);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.2);
}

.photos-review-badge--duplicate {
    color: var(--champagne-dark);
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(201, 168, 131, 0.84);
    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
}

/* Badge visibility - controlled by parent card state */
.photos-review-badge {
    display: none;
}

.photos-review-card.is-done .photos-review-badge--done,
.photos-review-card.is-error .photos-review-badge--error {
    display: inline-flex;
}

/* Duplicate state: show text overlay only, hide icon badge */
.photos-review-card.is-duplicate .photos-review-badge--duplicate {
    display: none;
}

/* Progress bar on review card */
.photos-review-card .progress-bar-wrap {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.62);
    box-shadow: inset 0 0 0 1px rgba(201, 168, 131, 0.45);
}

.photos-review-card .progress-bar-fill {
    height: 100%;
    background: var(--champagne-dark);
    transition: width 0.1s linear;
    width: 0%;
}

.photos-review-card.is-done .progress-bar-wrap,
.photos-review-card.is-duplicate .progress-bar-wrap {
    display: none;
}

/* Review action buttons row */
.photos-review-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.photos-review-actions--completion,
.photos-review-actions--retry {
    margin-top: 0.25rem;
}

.photos-review-actions-note {
    width: 100%;
    text-align: center;
    color: var(--gray-700);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    display: grid;
    gap: 0.2rem;
}

.photos-processing-progress-wrap {
    width: 100%;
    max-width: 320px;
    margin: 0 auto 0.4rem;
}

.photos-processing-progress-text {
    text-align: center;
    color: var(--champagne-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
}

.photos-processing-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(201, 168, 131, 0.25);
    overflow: hidden;
}

.photos-processing-progress-fill {
    height: 100%;
    width: 0;
    background: var(--champagne-dark);
    transition: width 0.25s ease;
}

.photos-processing-progress-fill.is-shimmering {
    background: linear-gradient(90deg,
            rgba(178, 139, 85, 1) 0%,
            rgba(205, 169, 116, 0.95) 45%,
            rgba(178, 139, 85, 1) 100%);
    background-size: 220% 100%;
    animation: photosProgressShimmer 1.8s linear infinite;
}

@keyframes photosProgressShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -20% 0;
    }
}

.recent-uploads-block {
    margin-bottom: 1.75rem;
    padding: 1rem 1rem 1.2rem;
    border: 1px solid var(--champagne-light);
    border-radius: 12px;
    background: var(--off-white);
}

.recent-uploads-heading {
    font-family: var(--font-serif-body);
    font-size: 1.1rem;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 0.2rem;
}

.recent-uploads-subtext {
    text-align: center;
    color: var(--gray-700);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.88rem;
    margin-bottom: 0.9rem;
}

.recent-uploads-fallback {
    text-align: center;
}

.photos-review-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

/* Shared base for all review buttons */
.photos-review-btn {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

/* Primary (Upload) */
.photos-review-btn--primary {
    border: none;
    padding: 0.625rem 1.75rem;
    background: var(--champagne);
    color: #fff;
    box-shadow: 0 2px 8px rgba(160, 120, 60, 0.25);
}

.photos-review-btn--primary:hover:not(:disabled) {
    background: var(--champagne-dark);
    box-shadow: 0 4px 12px rgba(160, 120, 60, 0.35);
}

.photos-review-btn--primary:disabled {
    background: var(--gray-400);
    color: var(--gray-700);
    cursor: not-allowed;
    box-shadow: none;
}

/* Outline (Add More, Clear All) */
.photos-review-btn--outline {
    border: 1px solid var(--champagne);
    padding: 0.4375rem 1rem;
    background: transparent;
    color: var(--champagne-dark);
}

.photos-review-btn--outline:hover {
    background: var(--champagne);
    color: #fff;
}


/* ── Lightbox download button ── */
.lightbox-download {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 20px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 6;
    cursor: pointer;
    transition: background 0.15s;
}

.lightbox-download.is-downloading {
    width: auto;
    min-width: 44px;
    padding: 0 12px;
}

.lightbox-download:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.lightbox-downloading-text {
    font-size: 12px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    padding: 0 4px;
}

.lightbox-download:hover,
.lightbox-download:focus {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}

.lightbox-download:disabled:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

