/* ===========================
   Global Reset and Variables
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #1A1A2E;
    --light: #F7F7FF;
}

/* ===========================
   Viewport Control
   =========================== */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    color: var(--dark);
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Prevent horizontal scroll on all main containers */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 40px);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* ===========================
   Typography
   =========================== */
h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 7vw, 7rem);
    color: white;
    margin-bottom: 20px;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 700;
}

h3 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: var(--dark);
    margin-bottom: 24px;
    font-weight: 700;
}

/* ===========================
   Background Patterns
   =========================== */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255,255,255,.1) 35px, rgba(255,255,255,.1) 70px);
    pointer-events: none;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, 90vw);
    height: min(600px, 90vw);
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: white;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInDown 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.8rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.4s both;
    padding: 0 10px;
}

/* ===========================
   Main Content Sections
   =========================== */
.main-section {
    background: var(--light);
    border-radius: 50px 50px 0 0;
    margin-top: -50px;
    position: relative;
    z-index: 2;
    padding: clamp(40px, 8vw, 80px) 0;
    overflow-x: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 8vw, 80px);
    padding: 0 20px;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.section-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===========================
   Postcard Components
   =========================== */
.postcard-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(30px, 6vw, 80px);
    align-items: center;
    margin-bottom: clamp(60px, 10vw, 120px);
    padding: 0 clamp(20px, 4vw, 40px);
}

.postcard-wrapper {
    perspective: 1500px;
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.postcard-container {
    width: 100%;
    aspect-ratio: 1.5/1;
    position: relative;
}

.postcard {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    transform-origin: center center;
}

.postcard.flipped {
    transform: rotateY(180deg);
}

.postcard-face {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.postcard-front {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.postcard-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.postcard-front .placeholder {
    color: white;
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    text-align: center;
    padding: clamp(20px, 4vw, 40px);
    font-weight: 300;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.postcard-back {
    background: #FAFAFA;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 20px,
            rgba(0, 0, 0, 0.02) 20px,
            rgba(0, 0, 0, 0.02) 21px
        );
    transform: rotateY(180deg);
    padding: clamp(20px, 4vw, 30px) clamp(20px, 4vw, 40px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(15px, 3vw, 30px);
    box-sizing: border-box;
    height: 100%;
}

.postcard-left {
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    overflow: hidden;
}

.postcard-right {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.postcard-message {
    font-family: 'Georgia', serif;
    font-size: 0.75rem;
    line-height: 1.3;
    color: #444;
    font-style: italic;
    margin-bottom: 10px;
    overflow: hidden;
    word-wrap: break-word;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
}

.postcard-signature {
    font-family: 'Georgia', serif;
    font-size: 0.7rem;
    color: #666;
    font-style: italic;
    margin-top: auto;
    flex-shrink: 0;
}

.stamp-area {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.stamp {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 8px;
    text-align: center;
    line-height: 1.2;
}

.address {
    font-family: 'Georgia', serif;
    font-size: 0.9rem;
    color: #333;
}

.address-line {
    margin-bottom: 5px;
    font-style: italic;
}

/* ===========================
   Call to Action Section
   =========================== */
.cta-section {
    padding: clamp(60px, 10vw, 100px) clamp(20px, 4vw, 40px);
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: clamp(40px, 8vw, 80px) 0;
    overflow: hidden;
    width: 100%;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: white;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 50px;
    font-weight: 400;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: clamp(10px, 2vw, 20px);
    padding: clamp(20px, 4vw, 30px) clamp(30px, 5vw, 50px);
    background: white;
    color: #764ba2;
    text-decoration: none;
    border-radius: 100px;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 20px 80px rgba(118, 75, 162, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    transform: scale(1);
    max-width: 90%;
}

.cta-button-text {
    position: relative;
    z-index: 1;
    line-height: 1.4;
    transition: color 0.4s ease;
}

.cta-button-icon {
    position: relative;
    z-index: 1;
    font-size: clamp(1.5rem, 3vw, 2rem);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===========================
   Stats Section
   =========================== */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: clamp(20px, 4vw, 40px);
    padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
    margin-bottom: clamp(40px, 8vw, 80px);
}

.stat-card {
    background: white;
    padding: clamp(30px, 5vw, 50px) clamp(20px, 4vw, 30px);
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    display: block;
}

.stat-label {
    color: #666;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===========================
   Couple Section
   =========================== */
.couple-section {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(30px, 6vw, 60px);
    align-items: center;
    margin-bottom: clamp(60px, 10vw, 120px);
    padding: clamp(40px, 8vw, 80px) clamp(30px, 6vw, 60px);
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.couple-photo-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    aspect-ratio: 4/5;
}

.couple-photo {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    position: relative;
}

.couple-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===========================
   Buttons and Interactive Elements
   =========================== */
.btn {
    padding: 12px clamp(20px, 4vw, 30px);
    background: white;
    color: var(--dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

/* ===========================
   Form Elements
   =========================== */
.form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 4vw, 40px);
    background: white;
    padding: clamp(20px, 4vw, 40px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

/* ===========================
   Grid Layouts
   =========================== */
.postcards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: clamp(20px, 4vw, 30px);
    margin-bottom: 40px;
}

.postcard-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    position: relative;
}

/* ===========================
   Animations
   =========================== */
@keyframes pulse-glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes pulse-cta {
    0% {
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.2),
            0 20px 80px rgba(118, 75, 162, 0.3),
            0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.2),
            0 20px 80px rgba(118, 75, 162, 0.3),
            0 0 0 30px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.2),
            0 20px 80px rgba(118, 75, 162, 0.3),
            0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1024px) {
    .postcard-showcase,
    .couple-section {
        grid-template-columns: 1fr;
        gap: clamp(30px, 6vw, 60px);
    }

    .couple-content {
        order: 2;
    }

    .couple-photo-wrapper {
        order: 1;
    }

    .postcard-wrapper {
        max-width: min(500px, 90vw);
    }
}

@media (max-width: 768px) {
    body {
        padding: clamp(20px, 4vw, 40px) clamp(10px, 2vw, 20px);
    }

    .container {
        padding: 0 clamp(15px, 3vw, 20px);
    }

    .cta-section {
        padding: clamp(40px, 8vw, 60px) clamp(15px, 3vw, 20px);
        margin: clamp(30px, 6vw, 40px) 0;
        border-radius: 0;
    }

    .cta-button {
        padding: clamp(20px, 4vw, 25px) clamp(25px, 5vw, 40px);
        font-size: clamp(1rem, 2.5vw, 1.1rem);
    }

    .stats-section {
        grid-template-columns: 1fr;
        gap: clamp(20px, 4vw, 30px);
        padding: clamp(40px, 8vw, 60px) clamp(15px, 3vw, 20px);
    }

    .postcard-showcase,
    .couple-section {
        padding: clamp(30px, 6vw, 40px) clamp(20px, 4vw, 30px);
    }

    .hero {
        padding: clamp(40px, 8vw, 60px) clamp(15px, 3vw, 20px);
    }

    .postcard-wrapper {
        max-width: min(400px, 85vw);
    }

    .postcard-back {
        grid-template-columns: 1fr;
        padding: clamp(15px, 3vw, 20px);
        gap: clamp(10px, 2vw, 15px);
    }

    .postcard-back::before {
        display: none;
    }

    .postcard-left {
        padding-right: 0;
        padding-bottom: 15px;
        border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    }

    .postcard-right {
        padding-left: 0;
        padding-top: 15px;
    }

    .stamp-area {
        justify-content: center;
    }

    .stamp {
        width: clamp(50px, 12vw, 70px);
        height: clamp(50px, 12vw, 70px);
        font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    }

    .address {
        text-align: center;
    }

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

    .preview-section {
        position: relative;
        top: auto;
    }
}

@media (max-width: 480px) {
    .postcard-wrapper {
        max-width: min(320px, 85vw);
    }

    .postcard-message {
        font-size: 0.6rem;
        line-height: 1.2;
        -webkit-line-clamp: 8;
    }

    .address-line {
        font-size: clamp(0.75rem, 1.8vw, 0.8rem);
    }

    h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .hero-subtitle {
        font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    }
}

/* ===========================
   Additional Mobile Safety
   =========================== */
@media (max-width: 768px) {
    /* Ensure no element can cause overflow */
    * {
        max-width: 100%;
    }

    /* Reset any negative margins on mobile */
    .cta-section,
    .main-section,
    .postcard-showcase,
    .couple-section,
    .stats-section {
        margin-left: 0;
        margin-right: 0;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* ===========================
   Feature List Styles
   =========================== */
.feature-list {
    list-style: none;
    margin-top: 30px;
}

.feature-list li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

/* ===========================
   Interaction Hints
   =========================== */
.interaction-hint {
    text-align: center;
    margin-top: 30px;
    color: #999;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: pulse-hint 2s infinite;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===========================
   Scroll Indicator
   =========================== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 30px;
    height: 30px;
    stroke: white;
    opacity: 0.7;
}

/* ===========================
   Upload Specific Styles
   =========================== */
.file-upload-area {
    border: 3px dashed #ccc;
    border-radius: 12px;
    padding: clamp(30px, 6vw, 40px);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    background: #fafafa;
}

.file-upload-area:hover {
    border-color: var(--secondary);
    background: #f0f0f0;
}

.file-upload-area.has-image {
    border-color: var(--secondary);
    border-style: solid;
}

.file-upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: clamp(2.5rem, 5vw, 3rem);
    margin-bottom: 10px;
}

.upload-text {
    color: #666;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.upload-preview {
    max-width: 100%;
    max-height: 200px;
    margin-top: 10px;
    border-radius: 8px;
}

/* ===========================
   Empty State
   =========================== */
.empty-state {
    text-align: center;
    padding: clamp(40px, 8vw, 60px) clamp(20px, 4vw, 40px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.empty-state h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--dark);
    margin-bottom: 20px;
}

.empty-state p {
    color: #666;
    margin-bottom: 30px;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

/* ===========================
   Postcard Item Actions
   =========================== */
.postcard-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.action-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.edit-btn {
    background: #f0f0f0;
    color: var(--dark);
}

.edit-btn:hover {
    background: var(--secondary);
    color: white;
}

.delete-btn {
    background: #ffebee;
    color: #c62828;
}

.delete-btn:hover {
    background: #ef5350;
    color: white;
}

/* ===========================
   Additional Layout Helpers
   =========================== */
.postcard-info p,
.couple-content p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.postcard-signature {
    text-align: right;
    font-family: 'Georgia', serif;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: #666;
}

.postcard-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: clamp(10px, 2vw, 20px);
}

.postcard-right {
    display: flex;
    flex-direction: column;
    padding-left: clamp(10px, 2vw, 20px);
}

.address-line {
    margin-bottom: 8px;
    color: var(--dark);
    font-family: 'Courier New', monospace;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    font-weight: 400;
}

.address-line:first-child {
    font-weight: 700;
    margin-bottom: 15px;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
}

/* ===========================
   Preview Section
   =========================== */
.preview-section {
    position: sticky;
    top: 40px;
}

.postcard-preview-wrapper {
    perspective: 1500px;
    width: 100%;
    max-width: min(500px, 90vw);
    margin: 0 auto;
}

.postcard-preview {
    width: 100%;
    aspect-ratio: 1.5/1;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.postcard-preview.flipped {
    transform: rotateY(180deg);
}