:root {
    --primary: #c33a68;
    --secondary: #f7dbe6;
    --page-bg: #fff9f6;
    --text: #3c2931;
    --paper: #fffdf9;

    --builder-bg: #f8f4f6;
    --builder-card: rgba(255, 255, 255, 0.92);
    --builder-border: #eadde2;
    --builder-muted: #7b6870;
    --builder-dark: #38262e;
}

/* =========================================================
   RESET
   ========================================================= */

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

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.gift-body,
#giftContent,
.story-section {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.story-section > .container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.row,
[class*="col-"] {
    min-width: 0;
}

img,
svg,
canvas,
iframe,
video {
    max-width: 100%;
}


html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

img,
svg {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.fw-black {
    font-weight: 900;
}

.brand-dot {
    color: var(--primary);
}

/* =========================================================
   BUILDER / INDEX PAGE
   ========================================================= */

.builder-body {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--builder-dark);
    background:
        radial-gradient(
            circle at 88% 4%,
            rgba(240, 177, 199, 0.38),
            transparent 27rem
        ),
        radial-gradient(
            circle at 6% 36%,
            rgba(248, 218, 178, 0.24),
            transparent 25rem
        ),
        linear-gradient(
            180deg,
            #ffffff 0,
            #fbf7f8 38rem,
            var(--builder-bg) 100%
        );
}

.builder-body .navbar {
    z-index: 1000;
    background: rgba(255, 255, 255, 0.86) !important;
    border-color: rgba(70, 40, 51, 0.09) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.builder-body .navbar-brand {
    color: #35232b;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.builder-body .navbar-text {
    color: #806c74 !important;
}

.builder-hero {
    position: relative;
    overflow: hidden;
    padding: 5.5rem 0 6.5rem;
}

.builder-hero::before {
    content: "";
    position: absolute;
    top: -13rem;
    right: -8rem;
    width: 37rem;
    height: 37rem;
    border-radius: 50%;
    background: rgba(219, 95, 139, 0.18);
    filter: blur(70px);
    pointer-events: none;
}

.builder-hero::after {
    content: "";
    position: absolute;
    bottom: -15rem;
    left: -12rem;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    background: rgba(247, 208, 163, 0.24);
    filter: blur(80px);
    pointer-events: none;
}

.builder-hero .container {
    position: relative;
    z-index: 2;
}

.builder-hero h1 {
    max-width: 760px;
    margin: 0 0 1.55rem;
    color: #342229;
    font-size: clamp(3.2rem, 7vw, 6.8rem);
    font-weight: 900;
    line-height: 0.92;
    letter-spacing: -0.067em;
}

.builder-hero .lead {
    max-width: 690px;
    color: #78676e !important;
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    line-height: 1.72;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 0.92rem;
    border: 1px solid rgba(195, 58, 104, 0.15);
    border-radius: 999px;
    color: #a42c56;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 32px rgba(75, 33, 48, 0.07);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.builder-body .btn-danger {
    --bs-btn-bg: #c33a68;
    --bs-btn-border-color: #c33a68;
    --bs-btn-hover-bg: #aa2d59;
    --bs-btn-hover-border-color: #aa2d59;
    --bs-btn-active-bg: #94234c;
    --bs-btn-active-border-color: #94234c;

    border-radius: 999px;
    padding-inline: 1.5rem;
    font-weight: 850;
    box-shadow: 0 17px 40px rgba(195, 58, 104, 0.22);
}

.builder-body .btn-dark,
.builder-body .btn-outline-dark {
    border-radius: 999px;
    padding-inline: 1.5rem;
    font-weight: 850;
}

.phone-showcase {
    min-height: 620px;
    position: relative;
    display: grid;
    place-items: center;
}

.phone-glow {
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: rgba(222, 108, 146, 0.31);
    filter: blur(88px);
}

.phone-frame {
    width: 310px;
    height: 610px;
    position: relative;
    overflow: hidden;
    border: 10px solid #191617;
    border-radius: 52px;
    color: #fff;
    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(255, 255, 255, 0.35),
            transparent 31%
        ),
        linear-gradient(
            145deg,
            #df90aa,
            #ad4169 53%,
            #68213e
        );
    box-shadow:
        0 46px 110px rgba(62, 26, 40, 0.35),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: rotate(4deg);
}

.phone-island {
    position: absolute;
    top: 13px;
    left: 50%;
    width: 110px;
    height: 29px;
    border-radius: 20px;
    background: #171516;
    transform: translateX(-50%);
}

.showcase-lock {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 30px 35px;
    text-align: center;
}

.showcase-lock h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.45rem;
    font-weight: 400;
    line-height: 1.05;
}

.mini-kicker {
    margin-bottom: 1rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.mini-code {
    margin: 3rem 0 2rem;
    font-size: 1rem;
    letter-spacing: 0.42rem;
}

.mini-flower {
    font-size: 4rem;
    animation: builderFlowerFloat 3s ease-in-out infinite;
}

.builder-form {
    display: grid;
    gap: 1.45rem;
    padding-bottom: 5rem;
}

.form-section {
    position: relative;
    overflow: hidden;
    padding: clamp(1.55rem, 4vw, 3rem);
    border: 1px solid var(--builder-border);
    border-radius: 30px;
    background: var(--builder-card);
    box-shadow:
        0 24px 65px rgba(67, 31, 44, 0.075),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.form-section::after {
    content: "";
    position: absolute;
    top: -5rem;
    right: -5rem;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: rgba(242, 198, 213, 0.18);
    pointer-events: none;
}

.form-section > * {
    position: relative;
    z-index: 2;
}

.form-section h2 {
    margin-bottom: 0.35rem;
    color: #3b2830;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.form-section > div > p,
.form-section > p {
    margin-bottom: 1.65rem;
    color: var(--builder-muted);
}

.step-number {
    position: absolute;
    top: 1.05rem;
    right: 1.4rem;
    z-index: 1;
    color: rgba(195, 58, 104, 0.09);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1;
}

.builder-body .form-label {
    margin-bottom: 0.46rem;
    color: #59454e;
    font-size: 0.81rem;
    font-weight: 850;
}

.builder-body .form-control,
.builder-body .form-select {
    min-height: 50px;
    border: 1px solid #dfd1d6;
    border-radius: 14px;
    color: #39282f;
    background-color: #fffdfd;
    box-shadow: none;
}

.builder-body textarea.form-control {
    min-height: 150px;
    padding-top: 0.9rem;
    resize: vertical;
}

.builder-body .form-control::placeholder {
    color: #ad9ca3;
}

.builder-body .form-control:focus,
.builder-body .form-select:focus {
    border-color: rgba(195, 58, 104, 0.75);
    box-shadow: 0 0 0 0.23rem rgba(195, 58, 104, 0.11);
}

.builder-body .form-control-color {
    height: 52px;
    padding: 0.4rem;
}

.builder-summary {
    top: 96px;
}

.summary-card {
    padding: 2rem;
    border: 1px solid var(--builder-border);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.89);
    box-shadow: 0 24px 65px rgba(67, 31, 44, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.eyebrow {
    color: #b32f5d;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.journey-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(69, 43, 53, 0.08);
}

.journey-item:last-child {
    border-bottom: 0;
}

.journey-item > span {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #a52b55;
    background: #f7e2e9;
    font-size: 0.85rem;
    font-weight: 900;
}

.journey-item > div {
    display: flex;
    flex-direction: column;
}

.journey-item strong {
    color: #3b2930;
}

.journey-item small {
    color: #88747c;
}

.success-panel {
    padding: clamp(1.5rem, 4vw, 2.7rem);
    border: 1px solid #dce8df;
    border-radius: 28px;
    background:
        radial-gradient(
            circle at 95% 10%,
            rgba(127, 195, 148, 0.15),
            transparent 15rem
        ),
        #fff;
    box-shadow: 0 22px 60px rgba(43, 73, 50, 0.09);
}

.success-panel .input-group .form-control {
    min-height: 48px;
    border-radius: 13px 0 0 13px;
}

.success-panel .input-group .btn {
    border-radius: 0 13px 13px 0;
}

.memory-builder-block {
    margin-top: 1.3rem;
    padding: 1.3rem;
    border: 1px solid rgba(195, 58, 104, 0.12);
    border-radius: 20px;
    background: rgba(250, 242, 245, 0.62);
}

/* =========================================================
   GIFT VIEW: SCROLL CONTAINER
   ========================================================= */

.gift-body {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
    background: var(--page-bg);
}

#giftContent {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#giftContent.gift-visible {
    opacity: 1;
}

.story-section {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 90px 0;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

.story-section > .container {
    width: 100%;
}

.progress-line {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.35);
}

.progress-line > div {
    width: 0;
    height: 100%;
    background: var(--primary);
}

/* =========================================================
   TOUCH / ZOOM CONTROL
   ========================================================= */

.gift-body *,
.gift-body *::before,
.gift-body *::after {
    -webkit-touch-callout: none;
}

.key,
.keypad,
.hint-button,
.scroll-button,
.text-button,
.preview-button,
.puzzle-tile,
.reason-card,
.wax-seal,
.final-button,
.final-love-button,
.playlist-play-button,
.open-music-button {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.memory-slider {
    touch-action: pan-x;
}

.scratch-card,
#scratchCanvas {
    touch-action: none;
}

.preview-button {
    touch-action: none;
}

input,
textarea,
select {
    touch-action: manipulation;
}

/* =========================================================
   PASSCODE SCREEN
   ========================================================= */

.passcode-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    padding:
        max(24px, env(safe-area-inset-top))
        20px
        max(24px, env(safe-area-inset-bottom));
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(255, 244, 214, 0.96),
            transparent 34%
        ),
        radial-gradient(
            circle at 82% 75%,
            rgba(220, 174, 165, 0.72),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #ebc99c 0%,
            #dec1a8 42%,
            #bda598 100%
        );
    transition:
        opacity 0.75s ease,
        filter 0.75s ease,
        transform 0.75s ease;
}

.passcode-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.24;
    pointer-events: none;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.2'/%3E%3C/svg%3E");
    mix-blend-mode: soft-light;
}

.passcode-screen.passcode-leaving {
    opacity: 0;
    filter: blur(18px);
    transform: scale(1.04);
}

.passcode-ambient {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.3;
    animation: ambientDrift 8s ease-in-out infinite;
}

.ambient-a {
    width: 340px;
    height: 340px;
    left: -120px;
    bottom: -90px;
    background: #ffd889;
}

.ambient-b {
    width: 300px;
    height: 300px;
    right: -100px;
    top: -70px;
    background: #9a7f73;
    animation-delay: -3s;
}

.passcode-panel {
    width: min(100%, 420px);
    position: relative;
    z-index: 2;
    text-align: center;
}

.pixel-heart {
    width: 106px;
    height: 96px;
    margin: 0 auto 24px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    filter: drop-shadow(0 12px 20px rgba(143, 21, 67, 0.22));
    animation: heartFloat 3.2s ease-in-out infinite;
}

.pixel-heart {
    width: 112px;
    height: 112px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(7, 1fr);
    gap: 0;
}

.pixel-heart span {
    background: transparent;
}

.pixel-heart span:nth-child(2),
.pixel-heart span:nth-child(3),
.pixel-heart span:nth-child(5),
.pixel-heart span:nth-child(6),

.pixel-heart span:nth-child(8),
.pixel-heart span:nth-child(9),
.pixel-heart span:nth-child(10),
.pixel-heart span:nth-child(11),
.pixel-heart span:nth-child(12),
.pixel-heart span:nth-child(13),
.pixel-heart span:nth-child(14),

.pixel-heart span:nth-child(15),
.pixel-heart span:nth-child(16),
.pixel-heart span:nth-child(17),
.pixel-heart span:nth-child(18),
.pixel-heart span:nth-child(19),
.pixel-heart span:nth-child(20),
.pixel-heart span:nth-child(21),

.pixel-heart span:nth-child(23),
.pixel-heart span:nth-child(24),
.pixel-heart span:nth-child(25),
.pixel-heart span:nth-child(26),
.pixel-heart span:nth-child(27),

.pixel-heart span:nth-child(31),
.pixel-heart span:nth-child(32),
.pixel-heart span:nth-child(33),

.pixel-heart span:nth-child(39) {
    background: #c9134d;
}

.passcode-kicker,
.section-label {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.passcode-panel h1 {
    max-width: 620px;
    margin: 0 auto;
    color: #4a352f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.1rem, 7vw, 3.6rem);
    font-weight: 400;
    line-height: 1.08;
}

.passcode-recipient {
    margin: 13px 0 0;
    color: rgba(66, 45, 39, 0.72);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
    font-style: italic;
}

.passcode-dots {
    min-height: 20px;
    display: flex;
    justify-content: center;
    gap: 13px;
    margin: 31px 0 26px;
}

.passcode-dots span {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: rgba(91, 64, 53, 0.16);
    box-shadow: inset 0 0 0 1px rgba(91, 64, 53, 0.05);
    transition:
        background 0.18s ease,
        transform 0.18s ease;
}

.passcode-dots span.filled {
    background: #c9134d;
    transform: scale(1.12);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 72px);
    justify-content: center;
    gap: 14px 17px;
}

.key {
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    color: #4b3934;
    background: rgba(255, 255, 255, 0.48);
    box-shadow:
        0 10px 28px rgba(68, 45, 35, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        background 0.16s ease;
}

.key:active {
    transform: scale(0.91);
    background: rgba(255, 255, 255, 0.74);
}

.key-empty {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 0.75rem;
}

.key-delete {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 1.15rem;
}

.hint-button {
    margin-top: 22px;
    border: 0;
    color: rgba(70, 46, 39, 0.7);
    background: transparent;
    font-size: 0.82rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.hint-text,
.code-error {
    min-height: 20px;
    margin: 10px 0 0;
    font-size: 0.82rem;
}

.code-error {
    color: #a71e46;
}

/* =========================================================
   FLOWER TRANSITION
   ========================================================= */

.flower-transition {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    background: #f5cad9;
    transition:
        opacity 0.45s ease,
        visibility 0.45s ease;
}

.flower-transition.active {
    visibility: visible;
    opacity: 1;
}

.flower-transition.leaving {
    opacity: 0;
}

.flower-cloud {
    position: absolute;
    width: 120vmax;
    height: 120vmax;
    border-radius: 50%;
    transform: scale(0.1);
    opacity: 0;
    background:
        radial-gradient(circle at 12% 15%, #f9d2df 0 3%, transparent 3.5%),
        radial-gradient(circle at 22% 24%, #dc7393 0 4%, transparent 4.5%),
        radial-gradient(circle at 34% 13%, #f6edf2 0 5%, transparent 5.5%),
        radial-gradient(circle at 47% 27%, #d95780 0 4%, transparent 4.6%),
        radial-gradient(circle at 63% 17%, #f8c5d7 0 5%, transparent 5.6%),
        radial-gradient(circle at 76% 26%, #e482a0 0 4.5%, transparent 5%),
        radial-gradient(circle at 88% 14%, #f6e3eb 0 4.5%, transparent 5%),
        radial-gradient(circle at 13% 50%, #d55a80 0 5%, transparent 5.5%),
        radial-gradient(circle at 28% 43%, #f8d8e4 0 5.5%, transparent 6%),
        radial-gradient(circle at 44% 54%, #e987a5 0 5%, transparent 5.5%),
        radial-gradient(circle at 61% 43%, #f5c5d6 0 6%, transparent 6.5%),
        radial-gradient(circle at 79% 52%, #d45b80 0 5%, transparent 5.5%),
        radial-gradient(circle at 91% 42%, #f7e6ed 0 5%, transparent 5.5%),
        radial-gradient(circle at 18% 78%, #f4b9ce 0 5%, transparent 5.5%),
        radial-gradient(circle at 36% 72%, #d84d77 0 4.5%, transparent 5%),
        radial-gradient(circle at 53% 83%, #f8dce6 0 6%, transparent 6.5%),
        radial-gradient(circle at 70% 72%, #e47e9d 0 5%, transparent 5.5%),
        radial-gradient(circle at 87% 81%, #f3bfd1 0 5.5%, transparent 6%),
        linear-gradient(135deg, #f4aeca, #f7d9e4);
}

.flower-transition.active .flower-cloud-a {
    animation: flowerBloom 1.1s ease forwards;
}

.flower-transition.active .flower-cloud-b {
    animation: flowerBloom 1.2s 0.12s ease forwards;
}

.flower-transition.active .flower-cloud-c {
    animation: flowerBloom 1.3s 0.24s ease forwards;
}

.flower-cloud-b {
    transform-origin: 20% 80%;
}

.flower-cloud-c {
    transform-origin: 80% 20%;
}

.transition-message {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    color: #8a294a;
    opacity: 0;
    transform: translateY(12px);
}

.flower-transition.active .transition-message {
    animation: transitionMessageHold 5.5s 0.8s ease forwards;
}

.transition-message span {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.transition-message strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 8vw, 4.5rem);
    font-weight: 400;
}

.celebration-layer {
    position: fixed;
    inset: 0;
    z-index: 60000;
    overflow: hidden;
    pointer-events: none;
}

.celebration-item {
    position: absolute;
    top: -12vh;
    animation: fallingItem linear forwards;
    filter: drop-shadow(0 5px 5px rgba(80, 35, 50, 0.12));
}

/* =========================================================
   WELCOME
   ========================================================= */

.welcome-section {
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(255, 255, 255, 0.95),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            var(--secondary),
            transparent 38%
        ),
        linear-gradient(
            150deg,
            var(--page-bg),
            #f8e5ec
        );
}

.welcome-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4rem, 13vw, 9rem);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.welcome-copy {
    max-width: 650px;
    margin: 28px auto 0;
    color: rgba(60, 41, 49, 0.72);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    line-height: 1.7;
}

.scroll-button {
    margin-top: 38px;
    border: 1px solid rgba(194, 57, 102, 0.22);
    border-radius: 999px;
    padding: 14px 22px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.68);
    font-weight: 800;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.scroll-button span {
    display: inline-block;
    margin-left: 8px;
    animation: arrowBob 1.4s ease-in-out infinite;
}

.soft-flower,
.final-flower {
    position: absolute;
    width: 280px;
    aspect-ratio: 1;
    border-radius: 48% 52% 46% 54%;
    opacity: 0.16;
    background:
        radial-gradient(circle at 50% 50%, #c22e62 0 7%, transparent 8%),
        radial-gradient(ellipse at 50% 20%, #ef8ead 0 17%, transparent 18%),
        radial-gradient(ellipse at 80% 50%, #f4b2c7 0 17%, transparent 18%),
        radial-gradient(ellipse at 50% 80%, #e9799d 0 17%, transparent 18%),
        radial-gradient(ellipse at 20% 50%, #f6c7d6 0 17%, transparent 18%);
    animation: softRotate 20s linear infinite;
}

.flower-top-left {
    top: -80px;
    left: -70px;
}

.flower-bottom-right {
    right: -80px;
    bottom: -90px;
    animation-direction: reverse;
}

/* =========================================================
   PUZZLE
   ========================================================= */

.puzzle-section {
    background: #fffaf7;
}

.floral-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.27;
    background-image:
        radial-gradient(circle at 10% 12%, #ed8bab 0 22px, transparent 23px),
        radial-gradient(circle at 15% 18%, #f9d6e1 0 34px, transparent 35px),
        radial-gradient(circle at 89% 15%, #e8a0b8 0 28px, transparent 29px),
        radial-gradient(circle at 83% 23%, #f7d5e0 0 42px, transparent 43px),
        radial-gradient(circle at 8% 82%, #eda4bc 0 35px, transparent 36px),
        radial-gradient(circle at 16% 90%, #f7d8e3 0 48px, transparent 49px),
        radial-gradient(circle at 92% 84%, #e98cab 0 31px, transparent 32px),
        radial-gradient(circle at 84% 93%, #f9dce6 0 45px, transparent 46px);
}

.puzzle-heading {
    max-width: 700px;
    margin: 0 auto 34px;
}

.puzzle-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 400;
    line-height: 1;
}

.puzzle-heading p:last-child {
    max-width: 590px;
    margin: 17px auto 0;
    color: rgba(60, 41, 49, 0.65);
}

.puzzle-card {
    width: min(100%, 590px);
    margin: 0 auto;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow:
        0 28px 85px rgba(101, 53, 70, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.puzzle-grid {
    --puzzle-preview-image: none;

    width: 100%;
    aspect-ratio: 1;
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.puzzle-grid::after {
    content: "";
    position: absolute;
    inset: 4px;
    z-index: 20;
    border-radius: 16px;

    background-image: var(--puzzle-preview-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    background-color: #fff;

    opacity: 0;
    visibility: hidden;
    transform: scale(0.97);

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;

    pointer-events: none;
}

.puzzle-grid.preview::after {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.puzzle-grid.solved {
    animation: puzzleSnap 0.75s cubic-bezier(0.2, 0.9, 0.2, 1);
    box-shadow: 0 26px 75px rgba(173, 61, 101, 0.3);
}

.puzzle-grid.solved .puzzle-tile {
    border-radius: 0;
}

.puzzle-tile {
    aspect-ratio: 1;
    border: 0;
    border-radius: 12px;
    background-repeat: no-repeat;
    background-size: 400% 400%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
    transition:
        transform 0.16s ease,
        filter 0.16s ease,
        opacity 0.16s ease;
}

.puzzle-tile.selected {
    transform: scale(0.9);
    filter: brightness(0.72);
    opacity: 0.82;
}

.puzzle-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 14px;
}

.text-button {
    border: 0;
    color: var(--primary);
    background: transparent;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.puzzle-complete {
    margin: 24px 0 5px;
    text-align: center;
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.puzzle-complete.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.puzzle-complete-heart {
    color: var(--primary);
    font-size: 3.7rem;
    line-height: 1;
    animation: puzzleHeartBeat 1.25s ease-in-out infinite;
}

.puzzle-complete strong {
    display: block;
    margin-top: 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 400;
}

.puzzle-complete p {
    margin: 7px 0 0;
    color: rgba(60, 41, 49, 0.64);
    font-family: Georgia, "Times New Roman", serif;
}

.puzzle-complete small {
    display: block;
    margin-top: 10px;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* =========================================================
   LETTER / ENVELOPE
   ========================================================= */

.letter-section {
    perspective: 1400px;
    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, 0.42),
            transparent 30%
        ),
        #eadbc8;
}

.letter-envelope {
    width: min(100%, 860px);
    min-height: 570px;
    position: relative;
    margin: 0 auto;
    perspective: 1400px;
}

.envelope-back {
    position: absolute;
    inset: 90px 0 0;
    border-radius: 12px;
    background: linear-gradient(145deg, #d4b99a, #bea080);
    box-shadow: 0 38px 100px rgba(75, 52, 34, 0.25);
}

.letter-paper {
    width: calc(100% - 70px);
    min-height: 490px;
    position: relative;
    z-index: 2;
    margin: 70px auto 0;
    padding: clamp(35px, 7vw, 82px);
    overflow: hidden;
    border-radius: 6px;
    background:
        linear-gradient(
            rgba(255, 253, 247, 0.97),
            rgba(255, 253, 247, 0.97)
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 31px,
            #eadfce 32px
        );
    box-shadow: 0 25px 60px rgba(77, 54, 37, 0.16);
    transform:
        translateY(180px)
        rotateX(-76deg)
        scale(0.91);
    transform-origin: bottom center;
    opacity: 0.72;
    transition:
        transform 2s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.8s ease;
}

.envelope-flap {
    position: absolute;
    top: 90px;
    right: 0;
    left: 0;
    z-index: 5;
    height: 250px;
    background: linear-gradient(145deg, #dec5a8, #c4a485);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    transition:
        transform 2s cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 0.5s ease;
}

.wax-seal {
    width: 82px;
    height: 82px;
    position: absolute;
    top: 250px;
    left: 50%;
    z-index: 10;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #f8cbd8;
    background:
        radial-gradient(
            circle at 35% 28%,
            #e76d94,
            #a92251 60%,
            #7b173b
        );
    box-shadow:
        0 13px 30px rgba(91, 26, 49, 0.3),
        inset 0 0 0 5px rgba(255, 255, 255, 0.08);
    font-size: 2rem;
    transform: translateX(-50%);
    cursor: pointer;
    transition:
        transform 1s ease,
        opacity 0.4s ease;
}

.wax-seal:hover {
    transform: translateX(-50%) scale(1.07);
}

.open-letter-hint {
    position: absolute;
    top: 344px;
    left: 50%;
    z-index: 11;
    color: rgba(72, 49, 39, 0.68);
    font-size: 0.75rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    transform: translateX(-50%);
    transition: opacity 0.4s ease;
}

.letter-envelope.opened .envelope-flap {
    opacity: 0;
    transform: rotateX(180deg);
    pointer-events: none;
}

.letter-envelope.opened .wax-seal {
    opacity: 0;
    transform:
        translateX(-50%)
        scale(0.5)
        rotate(20deg);
    pointer-events: none;
}

.letter-envelope.opened .open-letter-hint {
    opacity: 0;
}

.letter-envelope.opened .letter-paper {
    opacity: 1;
    transform:
        translateY(0)
        rotateX(0)
        scale(1);
}

.letter-paper h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 7vw, 5.8rem);
    font-weight: 400;
    line-height: 1;
}

.letter-copy {
    min-height: 190px;
    margin-top: 34px;
    white-space: pre-wrap;
    font-family:
        "Segoe Print",
        "Bradley Hand",
        "Comic Sans MS",
        cursive;
    font-size: clamp(1.08rem, 2.5vw, 1.42rem);
    line-height: 1.85;
}

.letter-copy::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 3px;
    vertical-align: -0.15em;
    background: var(--primary);
    animation: writingCursor 0.72s steps(1) infinite;
}

.letter-copy.finished::after {
    display: none;
}

.letter-signature {
    margin-top: 38px;
    font-family:
        "Segoe Print",
        "Bradley Hand",
        cursive;
    font-size: 1.15rem;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
}

.letter-envelope.signature-visible .letter-signature {
    animation: drawSignature 1.5s ease forwards;
}

.letter-signature span,
.letter-signature strong {
    display: block;
}

.letter-signature strong {
    color: var(--primary);
    font-size: 1.65rem;
    font-weight: 500;
}

.letter-flower-stamp {
    position: absolute;
    right: 30px;
    bottom: 24px;
    color: var(--primary);
    font-size: 3rem;
    opacity: 0;
    transform: scale(2) rotate(25deg);
}

.letter-envelope.stamp-visible .letter-flower-stamp {
    animation: stampFlower 0.55s ease forwards;
}

/* =========================================================
   MEMORY LANE
   ========================================================= */

.memories-section {
    background:
        radial-gradient(
            circle at 15% 15%,
            rgba(255, 255, 255, 0.9),
            transparent 28%
        ),
        linear-gradient(145deg, #f3dfe7, #fffaf7);
}

.memory-decoration {
    position: absolute;
    width: 330px;
    height: 330px;
    border-radius: 50%;
    opacity: 0.14;
    background:
        radial-gradient(circle, var(--primary) 0 13%, transparent 14%),
        radial-gradient(circle at 30% 30%, #ef8cab 0 18%, transparent 19%),
        radial-gradient(circle at 70% 30%, #f5b6ca 0 18%, transparent 19%),
        radial-gradient(circle at 50% 72%, #db6d92 0 18%, transparent 19%);
}

.memory-decoration-left {
    top: -100px;
    left: -120px;
}

.memory-decoration-right {
    right: -130px;
    bottom: -110px;
}

.memory-heading {
    max-width: 720px;
    margin: 0 auto 38px;
}

.memory-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.9rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 0.98;
}

.memory-heading > p:last-child {
    margin-top: 18px;
    color: rgba(60, 41, 49, 0.64);
}

.memory-slider {
    width: 100%;
    max-width: 100%;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 15px 18px 40px;
    margin-inline: 0;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.memory-slider::-webkit-scrollbar {
    display: none;
}

.memory-card {
    width: min(82vw, 430px);
    flex: 0 0 min(82vw, 430px);
    overflow: hidden;
    border-radius: 29px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 28px 75px rgba(86, 42, 58, 0.16);
    scroll-snap-align: center;
    transform: rotate(-0.5deg);
}

.memory-card:nth-child(even) {
    transform: rotate(0.7deg);
}

.memory-photo {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eadde2;
}

.memory-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.memory-card:hover .memory-photo img {
    transform: scale(1.04);
}

.memory-card-content {
    min-height: 230px;
    position: relative;
    padding: 28px 28px 52px;
}

.memory-date {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.memory-card h3 {
    margin: 9px 0 13px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 400;
}

.memory-card p {
    margin: 0;
    color: rgba(60, 41, 49, 0.68);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.06rem;
    line-height: 1.65;
}

.memory-number {
    position: absolute;
    right: 24px;
    bottom: 18px;
    color: rgba(195, 58, 104, 0.15);
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1;
}

.memory-swipe-hint {
    margin: 5px 0 0;
    color: rgba(60, 41, 49, 0.55);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
}

/* =========================================================
   REASONS
   ========================================================= */

.reasons-section {
    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(255, 255, 255, 0.8),
            transparent 30%
        ),
        linear-gradient(180deg, #fcecf1, #f4cfdc);
}

.reasons-heading {
    max-width: 720px;
    margin: 0 auto 42px;
}

.reasons-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 400;
    line-height: 0.95;
}

.reasons-heading > p:last-child {
    margin-top: 17px;
    color: rgba(60, 41, 49, 0.63);
}

.reasons-deck {
    width: min(100%, 470px);
    height: 380px;
    position: relative;
    margin: 0 auto;
    perspective: 1300px;
}

.reason-card {
    position: absolute;
    inset: 0;
    border: 0;
    border-radius: 31px;
    padding: 0;
    color: var(--text);
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transform:
        translateX(70px)
        translateY(12px)
        scale(0.92)
        rotate(5deg);
    transition:
        opacity 0.5s ease,
        transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
}

.reason-card.active {
    z-index: 5;
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.reason-card.previous {
    opacity: 0;
    transform:
        translateX(-100px)
        rotate(-8deg)
        scale(0.86);
}

.reason-card.next {
    opacity: 0.18;
    transform:
        translateX(20px)
        translateY(16px)
        scale(0.94)
        rotate(3deg);
}

.reason-card-front,
.reason-card-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px;
    border-radius: 31px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 32px 85px rgba(92, 39, 59, 0.21);
    transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reason-card-front {
    color: #fff;
    background:
        radial-gradient(
            circle at 25% 15%,
            rgba(255, 255, 255, 0.22),
            transparent 29%
        ),
        linear-gradient(145deg, #d45a84, #a92d59);
}

.reason-card-back {
    background:
        linear-gradient(
            rgba(255, 255, 255, 0.96),
            rgba(255, 255, 255, 0.96)
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 28px,
            #f0dce4 29px
        );
    transform: rotateY(180deg);
}

.reason-card.revealed .reason-card-front {
    transform: rotateY(-180deg);
}

.reason-card.revealed .reason-card-back {
    transform: rotateY(0);
}

.reason-card-front small {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.reason-card-front strong {
    margin-top: 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.1rem;
    font-weight: 400;
}

.reason-card-front > span {
    margin-top: 24px;
    font-size: 3rem;
}

.reason-card-back > span {
    color: var(--primary);
    font-size: 2.8rem;
}

.reason-card-back strong {
    max-width: 350px;
    margin-top: 17px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 400;
    line-height: 1.45;
}

.reason-card-back small {
    margin-top: 25px;
    color: rgba(60, 41, 49, 0.52);
}

.reason-progress {
    margin-top: 25px;
    color: rgba(60, 41, 49, 0.57);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

/* =========================================================
   SCRATCH CARD
   ========================================================= */

.scratch-section {
    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(255, 255, 255, 0.9),
            transparent 30%
        ),
        linear-gradient(145deg, #fff9f4, #f0ddd0);
}

.scratch-heading {
    max-width: 700px;
    margin: 0 auto 38px;
}

.scratch-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 0.97;
}

.scratch-heading > p:last-child {
    margin-top: 17px;
    color: rgba(60, 41, 49, 0.62);
}

.scratch-card {
    width: min(100%, 590px);
    min-height: 310px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    border: 10px solid rgba(255, 255, 255, 0.8);
    border-radius: 31px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(85, 47, 39, 0.18);
}

.scratch-secret {
    min-height: 290px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #5e3041;
    background:
        radial-gradient(
            circle at 50% 25%,
            rgba(255, 255, 255, 0.95),
            transparent 30%
        ),
        linear-gradient(145deg, #fbe4ec, #f2c8d6);
}

.scratch-secret span {
    color: var(--primary);
    font-size: 3rem;
}

.scratch-secret p {
    max-width: 430px;
    margin: 17px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 4vw, 2rem);
    line-height: 1.5;
}

#scratchCanvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: crosshair;
    transition: opacity 0.7s ease;
}

#scratchCanvas.scratch-finished {
    opacity: 0;
    pointer-events: none;
}

.scratch-complete-text {
    margin-top: 22px;
    color: var(--primary);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    font-style: italic;
}

/* =========================================================
   PLAYLIST
   ========================================================= */

.playlist-section {
    color: #fff;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(195, 58, 104, 0.36),
            transparent 35%
        ),
        #171317;
}

.premium-playlist {
    width: min(100%, 1080px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: clamp(35px, 7vw, 85px);
    align-items: center;
}

.playlist-visual {
    position: relative;
    isolation: isolate;
}

.playlist-cover {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    border-radius: 28px;
    object-fit: cover;
    box-shadow: 0 42px 110px rgba(0, 0, 0, 0.5);
}

.playlist-visual::after {
    content: "";
    position: absolute;
    right: -9%;
    bottom: -8%;
    z-index: -1;
    width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        repeating-radial-gradient(
            circle,
            #111 0 4px,
            #29252a 5px 7px
        );
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: recordSpin 16s linear infinite;
}

.playlist-play-button {
    width: 76px;
    height: 76px;
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #151217;
    background: #fff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.34);
    text-decoration: none;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.playlist-play-button:hover {
    transform: scale(1.08);
}

.playlist-play-button span {
    margin-left: 5px;
    font-size: 1.6rem;
}

.playlist-information h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 7vw, 5.6rem);
    font-weight: 400;
    line-height: 0.95;
}

.playlist-description {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.64);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.1rem;
}

.playlist-track-list {
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.playlist-track-list li {
    display: grid;
    grid-template-columns: 38px 1fr 30px;
    align-items: center;
    gap: 10px;
    padding: 15px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.track-number {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.74rem;
    font-weight: 800;
}

.track-title {
    color: rgba(255, 255, 255, 0.92);
}

.track-heart {
    color: rgba(255, 255, 255, 0.52);
    text-align: right;
    font-size: 1.25rem;
}

.open-music-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    border-radius: 999px;
    padding: 14px 21px;
    color: #171317;
    background: #fff;
    font-weight: 900;
    text-decoration: none;
}

/* Legacy playlist support */

.playlist-card {
    width: min(100%, 1050px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(30px, 7vw, 80px);
    align-items: center;
    padding: clamp(28px, 5vw, 64px);
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.055);
}

.playlist-art {
    display: grid;
    place-items: center;
}

.record {
    width: min(62vw, 310px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        repeating-radial-gradient(
            circle,
            #0e0d0f 0 4px,
            #242125 5px 7px
        );
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
    animation: recordSpin 14s linear infinite;
}

.record-centre {
    width: 34%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: 2rem;
}

.playlist-copy h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 7vw, 5.2rem);
    font-weight: 400;
    line-height: 1;
}

.playlist-copy iframe {
    width: 100%;
    height: 160px;
    margin-top: 20px;
    border: 0;
    border-radius: 18px;
}

/* =========================================================
   TIMER
   ========================================================= */

.timer-section {
    background:
        radial-gradient(
            circle at 50% 18%,
            rgba(255, 255, 255, 0.94),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            var(--page-bg),
            var(--secondary)
        );
}

.timer-heading {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 400;
    line-height: 1;
}

.timer-grid {
    width: min(100%, 960px);
    margin: 52px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
}

.timer-card {
    padding: 30px 12px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 27px;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: 0 20px 60px rgba(83, 43, 58, 0.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.timer-card strong {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    font-weight: 400;
    line-height: 0.95;
}

.timer-card span {
    display: block;
    margin-top: 10px;
    color: rgba(60, 41, 49, 0.56);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.timer-footer {
    margin-top: 34px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
    font-style: italic;
}

/* =========================================================
   FINAL
   ========================================================= */

.final-section {
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(255, 255, 255, 0.12),
            transparent 32%
        ),
        linear-gradient(145deg, #bd3263, #751638);
}

.final-moving-stars {
    position: absolute;
    inset: -20%;
    z-index: -2;
    opacity: 0.46;
    background-image:
        radial-gradient(circle, #fff 0 1px, transparent 1.5px),
        radial-gradient(circle, #ffd7e4 0 1.5px, transparent 2px),
        radial-gradient(circle, #fff 0 1px, transparent 1.5px);
    background-position:
        0 0,
        45px 80px,
        90px 30px;
    background-size:
        120px 120px,
        170px 170px,
        210px 210px;
    animation: starsMove 30s linear infinite;
}

.final-glow {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.25;
}

.final-glow-one {
    width: 340px;
    height: 340px;
    top: -100px;
    left: -100px;
    background: #ffd1df;
}

.final-glow-two {
    width: 380px;
    height: 380px;
    right: -130px;
    bottom: -120px;
    background: #ff83aa;
}

.final-heart {
    font-size: clamp(6rem, 18vw, 10rem);
    line-height: 1;
    text-shadow: 0 20px 60px rgba(77, 0, 29, 0.3);
    animation: finalHeartbeat 1.8s ease-in-out infinite;
}

.final-sequence-line,
.final-name,
.final-custom-message,
.final-love-button,
.final-response {
    opacity: 0;
    transform: translateY(24px);
}

.final-section.playing .final-line-one {
    animation: finalLineReveal 1s 0.5s ease forwards;
}

.final-section.playing .final-line-two {
    animation: finalLineReveal 1s 1.8s ease forwards;
}

.final-section.playing .final-name {
    animation: finalNameReveal 1.2s 3s ease forwards;
}

.final-section.playing .final-custom-message {
    animation: finalLineReveal 1s 4.2s ease forwards;
}

.final-section.playing .final-love-button {
    animation: finalLineReveal 1s 5.25s ease forwards;
}

.final-sequence-line {
    margin: 15px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 4vw, 2.25rem);
}

.final-name {
    margin: 15px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(4.3rem, 14vw, 9rem);
    font-weight: 400;
    line-height: 0.95;
}

.final-custom-message {
    max-width: 740px;
    margin: 28px auto 0;
    color: rgba(255, 255, 255, 0.78);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.1rem, 3vw, 1.55rem);
    line-height: 1.7;
}

.final-love-button,
.final-button {
    display: inline-block;
    margin-top: 35px;
    border: 0;
    border-radius: 999px;
    padding: 16px 25px;
    color: #a52451;
    background: #fff;
    box-shadow: 0 18px 50px rgba(60, 0, 23, 0.28);
    font-weight: 900;
    text-decoration: none;
}

.final-response {
    margin-top: 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    font-style: italic;
}

.final-response.visible {
    animation: finalLineReveal 0.8s ease forwards;
}

/* =========================================================
   SCROLL REVEALS
   ========================================================= */

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.85s ease,
        transform 0.85s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

.shake {
    animation: shake 0.4s ease;
}

/* =========================================================
   THEMES
   ========================================================= */

.theme-midnight {
    --page-bg: #171419;
    --text: #f8edf2;
}

.theme-midnight .welcome-section,
.theme-midnight .timer-section,
.theme-midnight .puzzle-section {
    color: #f8edf2;
    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(195, 58, 104, 0.22),
            transparent 30%
        ),
        #1b171d;
}

.theme-midnight .welcome-copy,
.theme-midnight .puzzle-heading p:last-child,
.theme-midnight .timer-card span,
.theme-midnight .timer-footer {
    color: rgba(255, 255, 255, 0.68);
}

.theme-midnight .puzzle-card,
.theme-midnight .timer-card {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.theme-cream {
    --page-bg: #fffaf0;
    --secondary: #efe3cd;
    --text: #493b33;
}

.theme-cream .welcome-section,
.theme-cream .timer-section {
    background:
        radial-gradient(
            circle at 20% 15%,
            rgba(255, 255, 255, 0.95),
            transparent 32%
        ),
        linear-gradient(145deg, #fffaf0, #efe3cd);
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes builderFlowerFloat {
    50% {
        transform: translateY(-12px) rotate(4deg);
    }
}

@keyframes ambientDrift {
    50% {
        transform: translate(25px, 20px) scale(1.08);
    }
}

@keyframes heartFloat {
    50% {
        transform: translateY(-8px);
    }
}

@keyframes flowerBloom {
    0% {
        opacity: 0;
        transform: scale(0.1) rotate(-8deg);
    }

    70% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: scale(1.15) rotate(0);
    }
}

@keyframes transitionMessageHold {
    0% {
        opacity: 0;
        transform: translateY(14px);
    }

    15% {
        opacity: 1;
        transform: translateY(0);
    }

    88% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes fallingItem {
    to {
        transform:
            translate3d(var(--drift), 115vh, 0)
            rotate(720deg);
    }
}

@keyframes arrowBob {
    50% {
        transform: translateY(6px);
    }
}

@keyframes softRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes puzzleSnap {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(0.97);
    }

    72% {
        transform: scale(1.035);
    }

    100% {
        transform: scale(1.015);
    }
}

@keyframes puzzleHeartBeat {
    20% {
        transform: scale(1.2);
    }

    40% {
        transform: scale(1);
    }

    60% {
        transform: scale(1.15);
    }

    80% {
        transform: scale(1);
    }
}

@keyframes writingCursor {
    50% {
        opacity: 0;
    }
}

@keyframes drawSignature {
    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

@keyframes stampFlower {
    70% {
        opacity: 1;
        transform: scale(0.86) rotate(-5deg);
    }

    100% {
        opacity: 0.78;
        transform: scale(1) rotate(-3deg);
    }
}

@keyframes recordSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes starsMove {
    to {
        transform: translate3d(-120px, 100px, 0);
    }
}

@keyframes finalHeartbeat {
    20% {
        transform: scale(1.13);
    }

    35% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.17);
    }

    70% {
        transform: scale(1);
    }
}

@keyframes finalLineReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes finalNameReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    70% {
        opacity: 1;
        transform: translateY(0) scale(1.04);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shake {
    25% {
        transform: translateX(-9px);
    }

    50% {
        transform: translateX(9px);
    }

    75% {
        transform: translateX(-5px);
    }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {
    .builder-hero {
        padding-top: 3rem;
    }

    .builder-summary {
        position: static !important;
    }

    .phone-showcase {
        min-height: 570px;
    }
}

@media (max-width: 850px) {
    .premium-playlist,
    .playlist-card {
        grid-template-columns: 1fr;
    }

    .playlist-visual {
        width: min(100%, 430px);
        margin: 0 auto;
    }

    .playlist-information,
    .playlist-card {
        text-align: center;
    }

    .playlist-track-list {
        text-align: left;
    }

    .timer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575px) {
    .builder-hero {
        padding: 2.5rem 0 4rem;
    }

    .builder-hero h1 {
        font-size: clamp(3.15rem, 15vw, 4.7rem);
    }

    .builder-hero .lead {
        font-size: 1rem;
    }

    .builder-hero .btn {
        width: 100%;
    }

    .phone-showcase {
        min-height: 515px;
    }

    .phone-frame {
        width: 260px;
        height: 510px;
        border-width: 8px;
        border-radius: 44px;
    }

    .form-section {
        padding: 1.4rem;
        border-radius: 23px;
    }

    .step-number {
        top: 0.75rem;
        right: 1rem;
        font-size: 3.2rem;
    }

    .summary-card {
        padding: 1.4rem;
        border-radius: 23px;
    }
}

@media (max-width: 520px) {
    .passcode-screen {
        padding-top: max(18px, env(safe-area-inset-top));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .passcode-panel {
        margin-top: -8px;
    }

    .pixel-heart {
        width: 82px;
        height: 74px;
        margin-bottom: 17px;
    }

    .passcode-panel h1 {
        font-size: 2.25rem;
    }

    .passcode-dots {
        margin: 24px 0 21px;
    }

    .keypad {
        grid-template-columns: repeat(3, 64px);
        gap: 12px 15px;
    }

    .key {
        width: 64px;
        height: 64px;
    }

    .story-section {
        min-height: 100dvh;
        padding: 64px 0;
    }

    .welcome-title {
        font-size: clamp(3.8rem, 18vw, 5.7rem);
    }

    .welcome-copy {
        padding-inline: 8px;
        font-size: 1.08rem;
    }

    .puzzle-heading {
        margin-bottom: 24px;
    }

    .puzzle-heading h2 {
        font-size: 2.65rem;
    }

    .puzzle-card {
        padding: 10px;
        border-radius: 21px;
    }

    .puzzle-grid {
        gap: 4px;
        padding: 4px;
    }

    .puzzle-tile {
        border-radius: 8px;
    }

    .letter-envelope {
        min-height: 610px;
    }

    .letter-paper {
        width: calc(100% - 20px);
        min-height: 525px;
        margin-top: 60px;
        padding: 34px 23px;
    }

    .envelope-back,
    .envelope-flap {
        top: 80px;
    }

    .wax-seal {
        top: 250px;
    }

    .open-letter-hint {
        top: 345px;
        width: 100%;
        text-align: center;
    }

    .letter-copy {
        font-size: 1.08rem;
        line-height: 1.8;
    }

    .memory-card {
        width: 84vw;
        flex-basis: 84vw;
    }

    .memory-card-content {
        min-height: 210px;
        padding: 23px 23px 48px;
    }

    .memory-card h3 {
        font-size: 1.7rem;
    }

    .reasons-deck {
        width: min(100%, 360px);
        height: 345px;
    }

    .reason-card-front,
    .reason-card-back {
        padding: 27px;
        border-radius: 25px;
    }

    .reason-card-front strong {
        font-size: 1.8rem;
    }

    .scratch-card {
        min-height: 270px;
        border-width: 7px;
        border-radius: 25px;
    }

    .scratch-secret {
        min-height: 256px;
        padding: 26px;
    }

    .playlist-visual {
        width: min(84vw, 390px);
    }

    .playlist-information h2,
    .playlist-copy h2 {
        font-size: 2.8rem;
    }

    .playlist-play-button {
        width: 64px;
        height: 64px;
        right: 18px;
        bottom: 18px;
    }

    .timer-grid {
        gap: 8px;
    }

    .timer-card {
        padding: 23px 8px;
        border-radius: 20px;
    }

    .timer-card strong {
        font-size: 2.65rem;
    }

    .final-name {
        font-size: clamp(4rem, 17vw, 5.8rem);
    }

    .final-custom-message {
        padding-inline: 5px;
        font-size: 1.15rem;
    }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   DEFINITIVE MOBILE WIDTH FIX
   Keep this block at the VERY END of the stylesheet.
   ========================================================= */

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
}

body,
body.gift-body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden !important;
    position: relative;
}

#giftContent {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

.story-section,
.passcode-screen,
.flower-transition,
.celebration-layer,
.progress-line {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
}

/* Prevent Bootstrap rows from extending outside their container. */
.story-section > .container,
.story-section > .container-fluid,
.passcode-screen > .container,
#giftContent .container,
#giftContent .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

#giftContent .row,
.story-section .row,
.passcode-screen .row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    --bs-gutter-x: 0 !important;
}

#giftContent .row > *,
.story-section .row > *,
.passcode-screen .row > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Make all principal content blocks shrink inside the viewport. */
.passcode-panel,
.puzzle-heading,
.puzzle-card,
.letter-envelope,
.letter-paper,
.memory-heading,
.memory-slider,
.memory-card,
.reasons-heading,
.reasons-deck,
.reason-card,
.scratch-heading,
.scratch-card,
.premium-playlist,
.playlist-card,
.playlist-visual,
.playlist-information,
.playlist-track-list,
.timer-grid,
.final-custom-message {
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Long user-entered text or URLs must wrap instead of widening the page. */
h1,
h2,
h3,
p,
span,
strong,
small,
a,
button,
li,
.letter-copy,
.final-custom-message,
.playlist-description,
.track-title {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Horizontal memory slider may scroll internally but cannot widen the page. */
.memory-slider {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    contain: inline-size;
}

.memory-card {
    width: min(82%, 430px) !important;
    flex: 0 0 min(82%, 430px) !important;
}

/* Decorative and animated elements must not affect page width. */
.soft-flower,
.final-flower,
.memory-decoration,
.passcode-ambient,
.final-glow,
.final-moving-stars,
.floral-pattern,
.playlist-visual::after,
.builder-hero::before,
.builder-hero::after,
.form-section::after {
    max-width: none;
}

/* Media must never exceed its parent. */
img,
svg,
canvas,
video,
iframe {
    display: block;
    max-width: 100% !important;
}

/* iPhone-specific hardening. */
@supports (-webkit-touch-callout: none) {
    html,
    body,
    body.gift-body,
    #giftContent {
        overflow-x: hidden !important;
    }
}

@media (max-width: 575px) {
    .story-section > .container,
    .story-section > .container-fluid,
    #giftContent .container,
    #giftContent .container-fluid {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .letter-paper {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .premium-playlist,
    .playlist-card {
        width: 100% !important;
    }

    .playlist-visual {
        width: min(100%, 390px) !important;
    }

    .reasons-deck,
    .scratch-card,
    .puzzle-card,
    .timer-grid {
        width: 100% !important;
    }
}


/* Builder usability fixes */
.builder-summary .summary-card { max-height: calc(100vh - 120px); overflow-y: auto; }
.memory-builder-block .remove-memory { flex: 0 0 auto; }
@media (max-width: 991.98px) { .builder-summary .summary-card { max-height: none; overflow: visible; } }

/* =========================================================
   LOVEUNLOCKED 2.0 — MODULAR BUILDER
   ========================================================= */

.builder-body {
    --builder-max: 1320px;
    overflow-x: hidden;
}

.builder-body .container {
    width: min(var(--builder-max), calc(100% - 32px));
}

.builder-body .navbar small {
    color: var(--builder-muted);
}

.builder-hero {
    min-height: 620px;
    display: flex;
    align-items: center;
}

.builder-hero::before {
    animation: builderAura 9s ease-in-out infinite;
}

.builder-hero h1 {
    max-width: 940px;
}

.builder-shell {
    display: grid;
    grid-template-columns: minmax(285px, 340px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-top: 42px;
}

.builder-sidebar {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.side-card,
.builder-main,
.success-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--builder-border);
    border-radius: 28px;
    background: rgba(255,255,255,.91);
    box-shadow: 0 24px 65px rgba(67,31,44,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.side-card {
    padding: 23px;
}

.side-card::after,
.builder-main::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(242,198,213,.17);
    pointer-events: none;
}

.side-card > *,
.builder-main > * {
    position: relative;
    z-index: 2;
}

.side-card h2,
.builder-main h2 {
    color: #3b2830;
    font-weight: 900;
    letter-spacing: -.025em;
}

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

.template-card {
    min-height: 100px;
    position: relative;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    padding: 14px 8px;
    border: 1px solid var(--builder-border);
    border-radius: 17px;
    color: var(--builder-dark);
    background: rgba(255,255,255,.84);
    cursor: pointer;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    border-color: rgba(195,58,104,.38);
    box-shadow: 0 16px 35px rgba(72,29,45,.1);
}

.template-card.active {
    border-color: var(--primary);
    background: linear-gradient(145deg,#fff8fb,#fbe5ed);
    box-shadow: 0 16px 38px rgba(195,58,104,.15), inset 0 0 0 1px rgba(195,58,104,.08);
}

.template-card.active::after {
    content: "✓";
    position: absolute;
    top: 8px;
    right: 9px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: .72rem;
    font-weight: 900;
}

.template-card span { font-size: 1.7rem; }
.template-card strong { font-size:.78rem; line-height:1.2; }

.field,
.field label {
    display: grid;
    gap: 7px;
}

.field { margin-top: 14px; }
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.field label,
.section-editor label { color:#59454e; font-size:.78rem; font-weight:850; }

.field input,
.field select,
.section-editor input,
.section-editor textarea,
.section-editor select {
    width: 100%;
    min-width: 0;
    border: 1px solid #dfd1d6;
    border-radius: 14px;
    padding: 12px 13px;
    color: #39282f;
    background: #fffdfd;
    box-shadow: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.field input:focus,
.field select:focus,
.section-editor input:focus,
.section-editor textarea:focus,
.section-editor select:focus {
    border-color: rgba(195,58,104,.75);
    outline: 0;
    box-shadow: 0 0 0 .23rem rgba(195,58,104,.11);
}

.builder-main {
    min-height: 760px;
    padding: clamp(22px,4vw,38px);
}

.builder-toolbar {
    display:flex;
    justify-content:space-between;
    gap:24px;
    align-items:flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(69,43,53,.08);
}

.builder-toolbar p { max-width:650px; color:var(--builder-muted); }

.core-note {
    margin: 22px 0;
    padding: 14px 16px;
    border: 1px solid rgba(195,58,104,.1);
    border-radius: 16px;
    color:#75404f;
    background:rgba(255,242,247,.8);
}

.section-list {
    display:grid;
    gap:14px;
}

.section-card {
    position:relative;
    overflow:hidden;
    border:1px solid var(--builder-border);
    border-radius:20px;
    background:rgba(255,255,255,.88);
    box-shadow:0 10px 28px rgba(68,30,44,.045);
    transition:border-color .22s ease,box-shadow .22s ease,transform .22s ease;
}

.section-card:hover {
    border-color:rgba(195,58,104,.22);
    box-shadow:0 18px 42px rgba(68,30,44,.08);
}

.section-card.dragging { opacity:.55; transform:scale(.985); }
.section-card.drop-target { border-color:var(--primary); box-shadow:0 0 0 3px rgba(195,58,104,.1); }

.section-card header {
    display:grid;
    grid-template-columns:36px 48px minmax(0,1fr) auto auto;
    gap:11px;
    align-items:center;
    padding:15px 16px;
}

.section-card header button {
    border:0;
    border-radius:11px;
    padding:9px 11px;
    color:#5a414b;
    background:#f7eef1;
    cursor:pointer;
    transition:transform .17s ease,background .17s ease;
}

.section-card header button:hover { transform:translateY(-1px); background:#f1dfe6; }
.section-card header .drag { cursor:grab; color:#a08690; }
.section-card header .drag:active { cursor:grabbing; }
.section-card header .remove { color:#9b2348; }

.section-icon {
    width:48px;
    height:48px;
    display:grid;
    place-items:center;
    border-radius:15px;
    background:linear-gradient(145deg,#fbe8ef,#f7dbe6);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
    font-size:1.4rem;
}

.section-card header > div { min-width:0; display:grid; }
.section-card header strong { color:#3b2930; }
.section-card header small { overflow:hidden; color:var(--builder-muted); text-overflow:ellipsis; white-space:nowrap; }

.section-editor {
    display:none;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:15px;
    padding:5px 18px 20px;
    border-top:1px solid rgba(69,43,53,.07);
    background:linear-gradient(180deg,rgba(251,247,248,.45),rgba(255,255,255,.8));
}

.section-card.open .section-editor {
    display:grid;
    animation:editorOpen .3s ease both;
}

.section-editor label { display:grid; gap:7px; padding-top:14px; }
.section-editor label:has(textarea),
.section-editor label:has(input[type="file"]) { grid-column:1/-1; }
.section-editor textarea { min-height:125px; resize:vertical; }
.section-editor small { color:var(--builder-muted); font-weight:500; }

.publish-button {
    margin-top:25px;
    min-height:58px;
    box-shadow:0 18px 45px rgba(195,58,104,.23);
}

.publish-note {
    margin:11px 0 0;
    color:var(--builder-muted);
    text-align:center;
    font-size:.8rem;
}

.picker[hidden] { display:none; }
.picker {
    position:fixed;
    inset:0;
    z-index:50000;
    display:grid;
    place-items:center;
    padding:20px;
}
.picker-backdrop { position:absolute; inset:0; background:rgba(35,23,29,.78); backdrop-filter:blur(9px); -webkit-backdrop-filter:blur(9px); }
.picker-panel {
    width:min(940px,100%);
    max-height:min(90vh,860px);
    position:relative;
    overflow:auto;
    padding:28px;
    border:1px solid rgba(255,255,255,.55);
    border-radius:30px;
    background:rgba(255,255,255,.97);
    box-shadow:0 40px 120px rgba(26,10,17,.42);
    animation:pickerIn .38s cubic-bezier(.2,.9,.2,1) both;
}
.picker-head { position:sticky; top:-28px; z-index:5; display:flex; justify-content:space-between; gap:20px; padding:28px 0 15px; background:rgba(255,255,255,.96); backdrop-filter:blur(12px); }
.picker-head button { width:43px; height:43px; display:grid; place-items:center; border:0; border-radius:50%; color:#4b3840; background:#f6e9ee; font-size:1.6rem; }
.section-library section > div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.section-library h3 { margin:26px 0 10px; color:#5a414b; font-size:.8rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
.section-library button { min-height:126px; display:grid; align-content:center; gap:7px; padding:17px; border:1px solid var(--builder-border); border-radius:18px; color:var(--builder-dark); background:#fff; text-align:left; cursor:pointer; transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.section-library button:hover { transform:translateY(-4px); border-color:rgba(195,58,104,.35); box-shadow:0 17px 40px rgba(70,30,45,.09); }
.section-library button span { font-size:1.6rem; }
.section-library button small { color:var(--builder-muted); line-height:1.35; }

.success-panel { margin-bottom:20px; padding:clamp(22px,4vw,38px); }

@keyframes builderAura { 50% { transform:translate(-24px,18px) scale(1.08); } }
@keyframes editorOpen { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }
@keyframes pickerIn { from { opacity:0; transform:translateY(28px) scale(.96); } to { opacity:1; transform:none; } }

@media (max-width: 990px) {
    .builder-shell { grid-template-columns:1fr; }
    .builder-sidebar { position:static; grid-template-columns:repeat(3,minmax(0,1fr)); }
    .side-card { min-width:0; }
}

@media (max-width: 760px) {
    .builder-body .container { width:min(100% - 22px,var(--builder-max)); }
    .builder-hero { min-height:auto; padding:68px 0 75px; }
    .builder-sidebar { grid-template-columns:1fr; }
    .builder-toolbar { display:block; }
    .builder-toolbar .btn { width:100%; margin-top:12px; }
    .section-card header { grid-template-columns:30px 45px minmax(0,1fr) auto; }
    .section-card header .remove { grid-column:4; grid-row:2; }
    .section-editor { grid-template-columns:1fr; }
    .section-editor label { grid-column:1!important; }
    .section-library section > div { grid-template-columns:1fr 1fr; }
}

@media (max-width: 480px) {
    .template-grid { grid-template-columns:1fr 1fr; }
    .field-grid { grid-template-columns:1fr; }
    .section-card header { grid-template-columns:28px 42px minmax(0,1fr); }
    .section-card header .toggle { grid-column:2/4; }
    .section-card header .remove { grid-column:2/4; grid-row:auto; }
    .section-library section > div { grid-template-columns:1fr; }
    .picker { padding:0; align-items:end; }
    .picker-panel { max-height:94dvh; border-radius:26px 26px 0 0; }
}

/* =========================================================
   LOVEUNLOCKED 2.1 — INTUITIVE BUILDER
   ========================================================= */
.template-card{min-height:92px;display:flex!important;align-items:flex-start!important;gap:13px!important;text-align:left!important;padding:15px!important}.template-card>span{font-size:1.65rem;line-height:1}.template-card>div{min-width:0;display:grid;gap:4px}.template-card strong{font-size:.9rem}.template-card small{color:var(--builder-muted);font-size:.72rem;line-height:1.35}.section-card-copy{min-width:0}.section-status{margin-left:auto;padding:6px 9px;border-radius:999px;background:#f7edf1;color:#9e3157;font-size:.67rem;font-weight:850;white-space:nowrap}.section-card header .toggle,.section-card header .remove{flex:0 0 auto}.section-editor{padding:0 22px 23px}.editor-intro{margin-bottom:18px;padding:16px 17px;border:1px solid #eadde2;border-radius:16px;background:linear-gradient(135deg,#fff,#fff7fa)}.editor-intro strong{display:block;color:#3c2931}.editor-intro p{margin:5px 0 0;color:var(--builder-muted);font-size:.82rem;line-height:1.5}.editor-field{display:grid;gap:7px;margin-top:15px}.editor-field>span{color:#554149;font-size:.77rem;font-weight:850}.editor-field input,.editor-field textarea,.editor-field select{width:100%;min-width:0;border:1px solid #dfd1d6;border-radius:13px;padding:12px 13px;color:#3b2930;background:#fff;outline:none;transition:border-color .2s,box-shadow .2s}.editor-field textarea{resize:vertical;line-height:1.55}.editor-field input:focus,.editor-field textarea:focus,.editor-field select:focus{border-color:#c33a68;box-shadow:0 0 0 4px rgba(195,58,104,.1)}.editor-field small{color:#89757d;font-size:.7rem;line-height:1.4}.editor-two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.file-field input{padding:10px;background:#fffafd}.repeatable-head{margin:24px 0 12px;display:flex;align-items:center;justify-content:space-between;gap:15px}.repeatable-head>div{display:grid;gap:2px}.repeatable-head strong{color:#39272f}.repeatable-head small{color:var(--builder-muted);font-size:.72rem}.mini-add{border:1px solid rgba(195,58,104,.25);border-radius:999px;padding:9px 13px;color:#a72d57;background:#fff;font-size:.75rem;font-weight:850}.repeatable-list{display:grid;gap:13px}.repeatable-card{position:relative;padding:17px;border:1px solid #e7dce0;border-radius:18px;background:rgba(255,255,255,.9);box-shadow:0 10px 28px rgba(69,39,50,.05)}.repeatable-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:11px;border-bottom:1px solid #f0e7ea}.repeatable-title strong{font-size:.83rem}.repeatable-title button{border:0;color:#a22b53;background:transparent;font-size:.7rem;font-weight:800}.simple-repeat-list{display:grid;gap:9px}.simple-repeat-row{display:grid;grid-template-columns:32px 1fr 34px;gap:8px;align-items:center}.simple-number{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;color:#a42e57;background:#f7e3ea;font-size:.7rem;font-weight:900}.simple-repeat-row input{min-width:0;border:1px solid #dfd1d6;border-radius:12px;padding:11px 12px}.simple-repeat-row button{width:32px;height:32px;border:0;border-radius:50%;color:#9f294f;background:#faedf1}.option-builder{display:grid;gap:8px;margin-top:14px}.quiz-option-input{display:grid;grid-template-columns:22px 31px 1fr;gap:8px;align-items:center}.quiz-option-input>input[type=radio]{accent-color:#c33a68}.quiz-option-input>span{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;color:#a42d56;background:#f7e1e9;font-size:.7rem;font-weight:900}.quiz-option-input>input[type=text]{min-width:0;border:1px solid #dfd1d6;border-radius:11px;padding:10px 11px}.correct-help{display:block;margin:8px 0 0 61px;color:#86727a;font-size:.68rem}.or-divider{display:flex;align-items:center;gap:12px;margin:19px 0 4px;color:#9a858d;font-size:.68rem;text-transform:uppercase;letter-spacing:.09em}.or-divider:before,.or-divider:after{content:"";height:1px;flex:1;background:#eadde2}.library-card{display:flex!important;align-items:flex-start!important;gap:12px!important;text-align:left!important}.library-card>div{display:grid;gap:3px}.library-card small{color:#7c6871;font-size:.72rem;line-height:1.4}.picker-panel{max-height:min(86vh,820px);overflow-y:auto}.section-card.open{border-color:rgba(195,58,104,.32);box-shadow:0 22px 58px rgba(73,35,49,.1)}.section-card.open>header{background:linear-gradient(135deg,#fff,#fff7fa)}
@media(max-width:720px){.editor-two-col{grid-template-columns:1fr}.section-status{display:none}.section-card>header{grid-template-columns:auto auto 1fr auto}.section-card header .remove{grid-column:4}.repeatable-head{align-items:flex-start}.template-card{min-height:84px}.section-editor{padding-inline:14px}.repeatable-card{padding:14px}}


/* =========================================================
   LOVEUNLOCKED 2.1.2 — BUILDER DESKTOP LAYOUT FIX
   ========================================================= */

/* The section header has six children on removable sections:
   drag, icon, copy, status, open, remove. Keep each in a real column. */
.section-card > header {
    display: grid;
    grid-template-columns: 36px 48px minmax(0, 1fr) max-content max-content max-content;
    gap: 10px;
    align-items: center;
}

.section-card header .section-card-copy {
    min-width: 0;
}

.section-card header .section-status,
.section-card header .toggle,
.section-card header .remove {
    width: auto;
    min-width: max-content;
    max-width: none;
    white-space: nowrap;
    writing-mode: horizontal-tb;
    word-break: keep-all;
    overflow-wrap: normal;
    grid-column: auto;
    grid-row: auto;
}

.section-card header .remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 12px;
    line-height: 1;
}

/* A one-column template list is easier to scan and prevents long occasion
   names from being squeezed into narrow two-column cards. */
.template-grid {
    grid-template-columns: 1fr;
    gap: 9px;
}

.template-card {
    width: 100%;
    min-height: 76px;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start !important;
    gap: 11px !important;
    padding: 12px 13px !important;
    text-align: left !important;
}

.template-card > span {
    width: 34px;
    min-width: 34px;
    font-size: 1.45rem !important;
    line-height: 1;
}

.template-card > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.template-card strong {
    display: block;
    min-width: 0;
    font-size: .84rem !important;
    line-height: 1.2 !important;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

.template-card small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--builder-muted);
    font-size: .69rem !important;
    line-height: 1.32 !important;
    word-break: normal;
    overflow-wrap: normal;
}

.side-card:first-child h2 {
    margin-bottom: 10px;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    line-height: 1.05;
}

@media (min-width: 1180px) {
    .builder-shell {
        grid-template-columns: 340px minmax(0, 1fr);
        gap: 28px;
    }

    .builder-main {
        padding: 32px 38px;
    }
}

/* On medium desktop widths, hide the status pill before squeezing buttons. */
@media (max-width: 1120px) and (min-width: 721px) {
    .section-card > header {
        grid-template-columns: 34px 46px minmax(0, 1fr) max-content max-content;
    }

    .section-card header .section-status {
        display: none;
    }
}

/* Keep the already-good mobile card flow. */
@media (max-width: 720px) {
    .template-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .template-card {
        display: flex !important;
        min-height: 84px;
    }

    .section-card > header {
        grid-template-columns: 30px 44px minmax(0, 1fr) max-content;
    }

    .section-card header .section-status {
        display: none;
    }

    .section-card header .toggle {
        grid-column: 2 / 4;
        grid-row: 2;
    }

    .section-card header .remove {
        grid-column: 4;
        grid-row: 2;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .template-card strong,
    .template-card small {
        overflow-wrap: anywhere;
    }
}

/* =========================================================
   LOVEUNLOCKED 2.2 — SALES, CONFIRMATION & STRIPE CHECKOUT
   ========================================================= */
.publish-trust{display:grid;gap:5px;margin-top:14px;padding:17px 19px;border:1px solid rgba(195,58,104,.15);border-radius:18px;background:#fff8fb;color:#78636c;font-size:.78rem;line-height:1.45;text-align:center}.publish-trust strong{color:#3d2932;font-size:.94rem}.publish-trust a{color:#b42f5d;font-weight:800}.publish-error{margin-top:14px;padding:14px 16px;border:1px solid #efb4c5;border-radius:15px;background:#fff0f5;color:#9f244d;text-align:center;font-weight:750}.modal-open-lu{overflow:hidden!important}.checkout-shell{position:fixed;inset:0;z-index:120000;display:grid;place-items:center;padding:18px;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}.checkout-shell.open{opacity:1;visibility:visible}.checkout-backdrop{position:absolute;inset:0;background:rgba(35,19,27,.72);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}.confirm-card,.stripe-card{width:min(100%,680px);max-height:calc(100dvh - 36px);position:relative;z-index:2;overflow:auto;border:1px solid rgba(255,255,255,.65);border-radius:30px;background:#fff;box-shadow:0 40px 130px rgba(35,14,24,.42);transform:translateY(18px) scale(.98);transition:transform .25s cubic-bezier(.2,.8,.2,1)}.checkout-shell.open .confirm-card,.checkout-shell.open .stripe-card{transform:none}.confirm-card{padding:clamp(26px,5vw,48px)}.confirm-card h2{margin:7px 0 14px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2rem,5vw,3.5rem);font-weight:400;line-height:1}.confirm-card>p{color:#78636c;line-height:1.7}.modal-x{position:absolute;top:16px;right:16px;width:42px;height:42px;display:grid;place-items:center;border:0;border-radius:50%;background:#f7edf1;color:#553c47;font-size:1.65rem}.confirm-price{display:flex;align-items:baseline;gap:12px;margin:24px 0;padding:19px;border-radius:19px;background:linear-gradient(135deg,#fff3f7,#f8e9ef)}.confirm-price strong{color:#b32f5d;font-size:1.75rem}.confirm-price span{color:#79646d;font-size:.86rem}.confirm-check{display:grid;grid-template-columns:22px 1fr;gap:11px;align-items:start;padding:17px;border:1px solid #ead7de;border-radius:17px;background:#fff}.confirm-check input{width:19px;height:19px;margin-top:2px;accent-color:#c33a68}.confirm-check span{color:#513a44;font-size:.9rem;line-height:1.5}.confirm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}.confirm-actions .btn{border-radius:999px;padding:12px 19px;font-weight:850}.confirm-actions button:disabled{opacity:.45}.stripe-card{width:min(100%,760px);padding:0 12px 18px}.stripe-head{position:sticky;top:0;z-index:5;padding:22px 22px 17px;border-bottom:1px solid #f0e2e7;background:rgba(255,255,255,.96);backdrop-filter:blur(15px)}.stripe-head h2{margin:5px 0 0;font-family:Georgia,"Times New Roman",serif;font-size:2rem;font-weight:400}.stripe-head p{margin:5px 0 0;color:#806b74}.checkout-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:260px;color:#806b74}.checkout-loading span{width:25px;height:25px;border:3px solid #f0d9e1;border-top-color:#c33a68;border-radius:50%;animation:checkoutSpin .8s linear infinite}.checkout-security{margin:8px 18px 0;color:#938087;font-size:.72rem;text-align:center}@keyframes checkoutSpin{to{transform:rotate(360deg)}}
.success-page{min-height:100dvh;padding:30px 18px;background:radial-gradient(circle at 15% 10%,rgba(247,193,211,.48),transparent 30rem),linear-gradient(145deg,#fff,#f8eef2)}.paid-success{width:min(1060px,100%);margin:0 auto;padding:clamp(28px,6vw,68px);border:1px solid #eadce1;border-radius:34px;background:rgba(255,255,255,.92);box-shadow:0 35px 100px rgba(62,28,42,.13)}.paid-success h1{max-width:800px;margin:9px 0 17px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(3rem,8vw,6rem);font-weight:400;line-height:.95}.paid-success>p{max-width:720px;color:#78656d;font-size:1.05rem;line-height:1.7}.success-burst{color:#c33a68;font-size:2.5rem;letter-spacing:.35em;animation:heartFloat 2.4s ease-in-out infinite}.success-layout{display:grid;grid-template-columns:1.35fr .65fr;gap:40px;align-items:center;margin-top:38px}.success-layout label{margin-bottom:8px;color:#5e4650;font-size:.82rem;font-weight:850}.success-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.success-actions .btn{border-radius:999px;font-weight:850}.success-note{margin-top:18px;color:#8b777f;font-size:.78rem}.qr-card{margin:0;padding:20px;border:1px solid #eadce1;border-radius:25px;background:#fff;box-shadow:0 20px 55px rgba(50,23,34,.1);text-align:center}.qr-card img{width:100%;display:block;border-radius:14px}.qr-card figcaption{margin-top:12px;color:#725c65;font-size:.8rem;font-weight:800}
@media(max-width:760px){.confirm-actions{flex-direction:column-reverse}.confirm-actions .btn{width:100%}.success-layout{grid-template-columns:1fr}.qr-card{width:min(320px,100%);margin-inline:auto}.checkout-shell{align-items:end;padding:0}.confirm-card,.stripe-card{max-height:95dvh;border-radius:26px 26px 0 0}}
.legal-page{width:min(820px,calc(100% - 32px));margin:30px auto;padding:clamp(28px,6vw,64px);border:1px solid #eadce1;border-radius:30px;background:#fff;box-shadow:0 28px 90px rgba(65,29,43,.1)}.legal-page>a{color:#b32f5d;font-weight:850;text-decoration:none}.legal-page h1{margin:24px 0 12px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(3rem,8vw,5rem);font-weight:400}.legal-page h2{margin-top:30px;color:#4b343e;font-size:1.25rem}.legal-page p{color:#74616a;line-height:1.75}


/* =========================================================
   PRIVATE GIFT PREVIEW
   ========================================================= */
.preview-shell {
    position: fixed;
    inset: 0;
    z-index: 120000;
    display: grid;
    place-items: center;
    padding: 18px;
}
.preview-shell[hidden] { display: none !important; }
.preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(27, 17, 22, .78);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.preview-card {
    width: min(100%, 1180px);
    height: min(94dvh, 920px);
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 40px 140px rgba(20,8,14,.48);
}
.preview-head,
.preview-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-color: rgba(72,42,54,.1);
    background: rgba(255,255,255,.96);
}
.preview-head { border-bottom: 1px solid rgba(72,42,54,.1); }
.preview-actions { border-top: 1px solid rgba(72,42,54,.1); justify-content: flex-end; }
.preview-head h2 { margin: 3px 0 2px; font-size: 1.45rem; font-weight: 900; }
.preview-head p { margin: 0; color: #7b6870; font-size: .84rem; }
.preview-frame-wrap { position: relative; min-height: 0; background: #eee; }
#giftPreviewFrame { width: 100%; height: 100%; display: block; border: 0; background: #fff; }
.preview-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    background: #fff7fa;
    color: #7b6870;
    font-weight: 800;
}
.preview-loading.is-hidden { display: none; }

@media (max-width: 720px) {
    .preview-shell { padding: 0; }
    .preview-card { width: 100%; height: 100dvh; border-radius: 0; }
    .preview-head { padding: 14px 16px; }
    .preview-head p { display: none; }
    .preview-actions { padding: 12px; }
    .preview-actions .btn { flex: 1; }
}

/* LoveUnlocked 2.4.1 — reliable scrollable private preview */
.preview-frame-wrap {
    min-height: 0 !important;
    overflow: hidden !important;
    overscroll-behavior: contain;
}

#giftPreviewFrame {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: auto !important;
    touch-action: auto !important;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 720px) {
    .preview-card {
        min-height: 0;
        grid-template-rows: auto minmax(0, 1fr) auto;
    }

    .preview-frame-wrap,
    #giftPreviewFrame {
        min-height: 0 !important;
    }
}

/* LoveUnlocked 2.5.2 commercial polish */
.builder-hero{overflow:hidden;padding:clamp(3rem,7vw,7rem) 0;background:radial-gradient(circle at 80% 25%,rgba(222,108,146,.22),transparent 28%),linear-gradient(135deg,#fffafc,#fff5f1)}
.hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.78fr);gap:clamp(2rem,6vw,6rem);align-items:center}
.hero-copy h1{max-width:780px}.hero-actions{display:flex;align-items:center;gap:1.2rem;flex-wrap:wrap}.hero-actions>span{max-width:280px;color:#77666d;font-weight:700;font-size:.9rem}
.phone-showcase{min-height:580px;position:relative;display:grid;place-items:center}.phone-glow{position:absolute;width:430px;height:430px;border-radius:50%;background:rgba(222,108,146,.3);filter:blur(85px)}
.phone-frame{width:290px;height:570px;position:relative;overflow:hidden;border:9px solid #191617;border-radius:50px;color:#fff;background:radial-gradient(circle at 20% 10%,rgba(255,255,255,.34),transparent 31%),linear-gradient(145deg,#df90aa,#ad4169 53%,#68213e);box-shadow:0 46px 100px rgba(62,26,40,.3),inset 0 0 0 1px rgba(255,255,255,.08);transform:rotate(4deg)}
.phone-island{position:absolute;top:12px;left:50%;width:105px;height:28px;border-radius:20px;background:#171516;transform:translateX(-50%)}.showcase-lock{height:100%;display:flex;flex-direction:column;justify-content:center;padding:75px 28px 32px;text-align:center}.showcase-lock h2{font-family:Georgia,serif;font-size:2.3rem;font-weight:400;line-height:1.05}.mini-kicker{margin-bottom:1rem;font-size:.68rem;font-weight:800;letter-spacing:.18em;text-transform:uppercase}.mini-code{margin:2.5rem 0 1.5rem;letter-spacing:.35rem}.mini-flower{font-size:2.5rem;animation:phoneFlower 3s ease-in-out infinite}.showcase-lock p{opacity:.8;font-size:.8rem}@keyframes phoneFlower{50%{transform:translateY(-8px) rotate(8deg)}}
.look-card small{display:block;color:#796b71;margin-top:.45rem;line-height:1.4}.color-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin:1rem 0}.color-grid label{font-size:.78rem;font-weight:800}.color-grid input{display:block;width:100%;height:44px;margin-top:.35rem;border:1px solid rgba(0,0,0,.12);border-radius:12px;padding:3px;background:#fff}.gift-palette-preview{--preview-primary:#c33a68;--preview-soft:#f7dbe6;--preview-bg:#fff9f6;--preview-text:#3c2931;display:flex;align-items:center;gap:.8rem;padding:.8rem;border-radius:14px;background:var(--preview-bg);color:var(--preview-text);border:1px solid color-mix(in srgb,var(--preview-primary) 22%,transparent)}.gift-palette-preview>span{width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,var(--preview-primary) 50%,var(--preview-soft) 50%);box-shadow:0 5px 16px color-mix(in srgb,var(--preview-primary) 25%,transparent)}
.drag{touch-action:none;-webkit-user-select:none;user-select:none}.section-card.touch-dragging{opacity:.78;transform:scale(.99);box-shadow:0 18px 45px rgba(40,20,30,.18)}
@media(max-width:991px){.hero-grid{grid-template-columns:1fr}.phone-showcase{min-height:480px}.phone-frame{width:240px;height:475px;border-radius:42px}.showcase-lock h2{font-size:1.9rem}}
@media(max-width:600px){.builder-hero{padding:2.5rem 0 3rem}.hero-grid{gap:1rem}.phone-showcase{min-height:390px}.phone-frame{width:205px;height:405px;border-width:7px;border-radius:36px}.phone-island{width:82px;height:22px}.showcase-lock{padding:58px 20px 24px}.showcase-lock h2{font-size:1.55rem}.mini-code{margin:1.6rem 0 1rem;font-size:.75rem}.color-grid{grid-template-columns:1fr 1fr}.section-card .drag{min-width:44px;min-height:44px;font-size:1.5rem}}

/* LoveUnlocked 2.6 commercial presentation */
.hero-proof{display:flex;flex-wrap:wrap;gap:10px 18px;margin-top:22px;color:#6b5360;font-size:.88rem;font-weight:750}.hero-proof span{display:flex;align-items:center;gap:6px}.mini-envelope{width:82px;height:58px;position:relative;display:grid;place-items:center;margin:17px auto;border-radius:6px;background:linear-gradient(145deg,#f4d5df,#d98ba7);box-shadow:0 16px 30px rgba(91,30,54,.18);font-size:1.8rem}.mini-envelope::before{content:"";position:absolute;inset:0;clip-path:polygon(0 0,100% 0,50% 58%);background:#efbfd0}.phone-float-card{position:absolute;z-index:5;padding:10px 14px;border:1px solid rgba(255,255,255,.7);border-radius:14px;background:rgba(255,255,255,.82);box-shadow:0 18px 45px rgba(75,35,51,.15);backdrop-filter:blur(14px);font-size:.76rem;font-weight:850;white-space:nowrap}.phone-float-one{left:-65px;top:26%;transform:rotate(-5deg)}.phone-float-two{right:-78px;bottom:18%;transform:rotate(4deg)}
.value-strip{padding:0 0 64px}.value-strip .container{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.value-strip article{padding:24px;border:1px solid rgba(127,68,91,.12);border-radius:22px;background:rgba(255,255,255,.74);box-shadow:0 20px 55px rgba(93,46,63,.07)}.value-strip strong,.value-strip span{display:block}.value-strip strong{margin-bottom:6px;font-family:Georgia,serif;font-size:1.25rem}.value-strip span{color:#735e67;font-size:.9rem;line-height:1.55}.builder-shell{box-shadow:0 35px 100px rgba(84,40,57,.11)}.publish-button{min-height:64px;font-size:1.08rem;box-shadow:0 20px 45px rgba(190,42,91,.23)}
@media(max-width:850px){.value-strip .container{grid-template-columns:1fr}.phone-float-card{display:none}.hero-proof{justify-content:center}.value-strip{padding-bottom:35px}}


/* Language selector and reliable text selection */
.language-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.language-option{display:flex;align-items:center;gap:10px;text-align:left;border:1px solid rgba(60,41,49,.14);background:#fff;border-radius:16px;padding:13px;transition:.2s ease}.language-option>span{font-size:1.45rem}.language-option strong,.language-option small{display:block}.language-option small{font-size:.72rem;opacity:.65;margin-top:2px}.language-option.active{border-color:var(--danger,#c33a68);box-shadow:0 0 0 3px rgba(195,58,104,.1);background:#fff8fb}.language-help{font-size:.83rem;opacity:.72;margin:6px 0 0}
.builder-body input[type="text"],.builder-body input[type="url"],.builder-body input[type="number"],.builder-body input[type="date"],.builder-body input:not([type]),.builder-body textarea,.builder-body [contenteditable="true"]{-webkit-user-select:text!important;user-select:text!important;cursor:text}.section-card input,.section-card textarea{pointer-events:auto!important}
@media(max-width:420px){.language-grid{grid-template-columns:1fr}}


/* =========================================================
   LOVEUNLOCKED 4.2 — LIVE DEMO GALLERY
   ========================================================= */
.example-gallery{position:relative;overflow:hidden;padding:clamp(4rem,8vw,7.5rem) 0;border-top:1px solid rgba(79,43,58,.07);border-bottom:1px solid rgba(79,43,58,.07);background:radial-gradient(circle at 8% 18%,rgba(226,142,170,.18),transparent 26rem),radial-gradient(circle at 91% 82%,rgba(241,205,153,.2),transparent 28rem),linear-gradient(180deg,rgba(255,255,255,.92),rgba(251,245,247,.96))}.example-gallery::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.34;background-image:radial-gradient(rgba(119,71,91,.13) .7px,transparent .7px);background-size:22px 22px;mask-image:linear-gradient(to bottom,transparent,#000 20%,#000 80%,transparent)}.example-gallery .container{position:relative;z-index:1}.example-gallery-head{display:flex;align-items:end;justify-content:space-between;gap:2rem;margin-bottom:clamp(2rem,5vw,3.5rem)}.example-gallery-head h2{max-width:760px;margin:15px 0 13px;color:#35232b;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2.5rem,6vw,5.2rem);font-weight:400;letter-spacing:-.045em;line-height:.98}.example-gallery-head p{max-width:650px;margin:0;color:#735f68;font-size:clamp(.96rem,1.4vw,1.08rem);line-height:1.7}.example-gallery-link,.example-cta{display:inline-flex;align-items:center;gap:.55rem;color:#a92d59;font-weight:900;text-decoration:none}.example-gallery-link{flex:0 0 auto;padding-bottom:7px}.example-gallery-link span,.example-cta span{transition:transform .2s ease}.example-gallery-link:hover span,.example-cta:hover span{transform:translateX(4px)}.example-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(1rem,2.2vw,1.65rem)}.example-card{min-width:0;display:grid;grid-template-rows:310px minmax(0,1fr);overflow:hidden;border:1px solid rgba(76,40,55,.1);border-radius:30px;background:rgba(255,255,255,.88);box-shadow:0 24px 65px rgba(73,35,50,.1);transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s ease}.example-card:hover{transform:translateY(-8px);box-shadow:0 34px 85px rgba(73,35,50,.16)}.example-phone{position:relative;display:grid;place-items:end center;overflow:hidden;padding-top:35px;background:radial-gradient(circle at 50% 18%,rgba(255,255,255,.62),transparent 30%),linear-gradient(145deg,#f5d4e0,#ca5f86)}.example-card--gold .example-phone{background:radial-gradient(circle at 50% 18%,rgba(255,255,255,.68),transparent 31%),linear-gradient(145deg,#f8e8c9,#d99b43)}.example-card--violet .example-phone{background:radial-gradient(circle at 50% 18%,rgba(255,255,255,.62),transparent 31%),linear-gradient(145deg,#e3d8f6,#8e69be)}.example-phone::before,.example-phone::after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.25)}.example-phone::before{width:160px;height:160px;top:-65px;right:-35px}.example-phone::after{width:105px;height:105px;left:-30px;bottom:12px}.example-phone-screen{width:174px;height:286px;position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:45px 20px 24px;border:7px solid #1c191a;border-bottom:0;border-radius:31px 31px 0 0;color:#fff;background:linear-gradient(165deg,rgba(255,255,255,.24),rgba(101,25,53,.53)),#b83f69;box-shadow:0 25px 48px rgba(54,22,35,.28),inset 0 0 0 1px rgba(255,255,255,.12);text-align:center}.example-card--gold .example-phone-screen{background:linear-gradient(165deg,rgba(255,255,255,.25),rgba(117,67,13,.45)),#cb8632}.example-card--violet .example-phone-screen{background:linear-gradient(165deg,rgba(255,255,255,.24),rgba(50,29,85,.48)),#7753a5}.example-phone-island{position:absolute;z-index:3;top:48px;left:50%;width:68px;height:18px;border-radius:20px;background:#191718;transform:translateX(-50%)}.example-screen-kicker{margin-bottom:15px;font-size:.55rem;font-weight:900;letter-spacing:.18em;text-transform:uppercase;opacity:.82}.example-screen-icon{display:grid;place-items:center;width:50px;height:50px;margin-bottom:13px;border:1px solid rgba(255,255,255,.45);border-radius:50%;background:rgba(255,255,255,.13);font-family:Georgia,serif;font-size:1.75rem}.example-phone-screen strong{max-width:125px;font-family:Georgia,serif;font-size:1.23rem;font-weight:400;line-height:1.08}.example-screen-code{margin:18px 0 16px;font-size:.61rem;letter-spacing:.2rem;opacity:.9}.example-screen-line{width:110px;height:5px;border-radius:9px;background:rgba(255,255,255,.3)}.example-screen-line.short{width:76px;margin-top:7px}.example-copy{display:flex;flex-direction:column;align-items:flex-start;padding:clamp(1.35rem,3vw,1.8rem)}.example-label{color:#a62e59;font-size:.67rem;font-weight:950;letter-spacing:.13em;text-transform:uppercase}.example-copy h3{margin:8px 0 10px;color:#3d2932;font-family:Georgia,serif;font-size:clamp(1.45rem,2.2vw,1.85rem);font-weight:400;line-height:1.08}.example-copy p{margin:0 0 18px;color:#75616a;font-size:.88rem;line-height:1.62}.example-passcode{display:flex;align-items:center;justify-content:space-between;width:100%;margin:0 0 20px;padding:10px 12px;border:1px solid rgba(166,46,89,.12);border-radius:13px;background:#fff7fa;color:#785863}.example-passcode span{font-size:.72rem;font-weight:800}.example-passcode strong{font-size:.88rem;letter-spacing:.18em;color:#a62e59}.example-cta{margin-top:auto}.example-privacy-note{display:flex;align-items:center;justify-content:center;gap:8px;margin:25px 0 0;color:#806c74;font-size:.77rem;text-align:center}@media(max-width:990px){.example-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.example-card:last-child{grid-column:1/-1;grid-template-columns:minmax(250px,.85fr) 1fr;grid-template-rows:330px}.example-card:last-child .example-copy{justify-content:center}}@media(max-width:720px){.example-gallery{padding:3.8rem 0}.example-gallery-head{display:block}.example-gallery-link{margin-top:18px}.example-grid{grid-template-columns:1fr}.example-card,.example-card:last-child{grid-column:auto;grid-template-columns:1fr;grid-template-rows:285px minmax(0,1fr)}.example-phone-screen{width:164px;height:264px}.example-phone-island{top:46px}}
