.has-ambient-background {
    position: relative;
    background:
        radial-gradient(circle at top, rgba(255, 250, 247, 0.94), rgba(255, 253, 252, 0.98) 38%, #fff 100%);
}

.has-ambient-background > * {
    position: relative;
    z-index: 1;
}

.ambient-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.ambient-orb {
    position: absolute;
    left: var(--orb-left);
    top: var(--orb-top);
    width: var(--orb-size);
    height: var(--orb-size);
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.22) 28%, rgba(235, 201, 210, 0.14) 58%, rgba(201, 169, 110, 0.08) 100%);
    filter: blur(10px);
    opacity: 0.52;
    transform: translate3d(0, 0, 0) scale(0.92);
    animation: ambientOrbFloat var(--orb-duration) ease-in-out infinite;
    animation-delay: var(--orb-delay);
    will-change: transform, opacity;
}

@keyframes ambientOrbFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(0.92);
        opacity: 0.36;
    }

    50% {
        transform: translate3d(var(--orb-drift-x), var(--orb-drift-y), 0) scale(1.08);
        opacity: 0.62;
    }
}

.section-alt {
    background: linear-gradient(180deg, rgba(235, 201, 210, 0.14), rgba(255, 253, 252, 0.94));
}

.counter-box,
.story-image-frame,
.story-gallery-shell,
.story-quote,
.emotion-strip,
.polaroid,
.final-card {
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.story-intro {
    max-width: 760px;
    margin: 0 auto 42px;
}

.counter-stage {
    padding-top: 88px;
    padding-bottom: 28px;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.counter-box {
    position: relative;
    overflow: hidden;
    text-align: center;
    min-width: 0;
    padding: 1.25rem 0.7rem;
    border-radius: 26px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 241, 243, 0.96));
    border: 1px solid rgba(110, 59, 71, 0.12);
    box-shadow:
        0 14px 30px rgba(110, 59, 71, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.counter-box::before,
.counter-box::after {
    position: absolute;
    pointer-events: none;
}

.counter-box::after {
    content: '';
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(216, 167, 177, 0.2), transparent 30%),
        radial-gradient(circle at 82% 78%, rgba(201, 169, 110, 0.16), transparent 26%),
        linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.38) 45%, transparent 70%);
    opacity: 0.9;
    animation: counterGlowShift 6.5s ease-in-out infinite;
    z-index: 1;
}

.counter-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.counter-bubbles span {
    position: absolute;
    bottom: -44px;
    left: var(--bubble-left);
    width: var(--bubble-size);
    height: var(--bubble-size);
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.36) 24%, rgba(255, 255, 255, 0.12) 44%, rgba(216, 167, 177, 0.1) 68%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.52);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.18),
        0 10px 18px rgba(201, 169, 110, 0.08);
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.72);
    animation: counterBubbleFloat var(--bubble-duration) cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
    animation-delay: var(--bubble-delay);
    will-change: transform, opacity;
}

.counter-bubbles span:nth-child(1) {
    --bubble-left: 10%;
    --bubble-size: 30px;
    --bubble-duration: 5.4s;
    --bubble-delay: -0.8s;
    --bubble-drift-x: 16px;
    --bubble-rise: -156px;
}

.counter-bubbles span:nth-child(2) {
    --bubble-left: 30%;
    --bubble-size: 22px;
    --bubble-duration: 6.2s;
    --bubble-delay: -2.6s;
    --bubble-drift-x: -12px;
    --bubble-rise: -178px;
}

.counter-bubbles span:nth-child(3) {
    --bubble-left: 62%;
    --bubble-size: 34px;
    --bubble-duration: 4.9s;
    --bubble-delay: -1.7s;
    --bubble-drift-x: 10px;
    --bubble-rise: -166px;
}

.counter-bubbles span:nth-child(4) {
    --bubble-left: 80%;
    --bubble-size: 24px;
    --bubble-duration: 6.8s;
    --bubble-delay: -3.4s;
    --bubble-drift-x: -18px;
    --bubble-rise: -184px;
}

.counter-box:nth-child(2) .counter-bubbles span:nth-child(1),
.counter-box:nth-child(5) .counter-bubbles span:nth-child(3) {
    --bubble-left: 18%;
    --bubble-size: 38px;
    --bubble-duration: 6.1s;
    --bubble-delay: -2.2s;
    --bubble-drift-x: -16px;
    --bubble-rise: -192px;
}

.counter-box:nth-child(2) .counter-bubbles span:nth-child(2),
.counter-box:nth-child(6) .counter-bubbles span:nth-child(4) {
    --bubble-left: 74%;
    --bubble-size: 28px;
    --bubble-duration: 5.2s;
    --bubble-delay: -0.4s;
    --bubble-drift-x: 18px;
    --bubble-rise: -172px;
}

.counter-box:nth-child(3) .counter-bubbles span:nth-child(1),
.counter-box:nth-child(4) .counter-bubbles span:nth-child(4) {
    --bubble-left: 48%;
    --bubble-size: 40px;
    --bubble-duration: 7.1s;
    --bubble-delay: -3.1s;
    --bubble-drift-x: 12px;
    --bubble-rise: -198px;
}

.counter-box:nth-child(3) .counter-bubbles span:nth-child(3),
.counter-box:nth-child(6) .counter-bubbles span:nth-child(1) {
    --bubble-left: 12%;
    --bubble-size: 26px;
    --bubble-duration: 4.7s;
    --bubble-delay: -1.1s;
    --bubble-drift-x: -10px;
    --bubble-rise: -160px;
}

.counter-box:nth-child(4) .counter-bubbles span:nth-child(2),
.counter-box:nth-child(5) .counter-bubbles span:nth-child(4) {
    --bubble-left: 56%;
    --bubble-size: 32px;
    --bubble-duration: 6.6s;
    --bubble-delay: -2.9s;
    --bubble-drift-x: -20px;
    --bubble-rise: -188px;
}

.counter-box:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(110, 59, 71, 0.18);
    box-shadow:
        0 22px 44px rgba(110, 59, 71, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.counter-box strong {
    position: relative;
    z-index: 2;
    display: block;
    font-size: clamp(1.9rem, 2.2vw, 2.4rem);
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
    color: var(--wine);
    text-shadow: 0 10px 18px rgba(110, 59, 71, 0.12);
}

.counter-box span {
    position: relative;
    z-index: 2;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
}

@keyframes counterBubbleFloat {
    0% {
        transform: translate3d(0, 0, 0) scale(0.66) rotate(0deg);
        opacity: 0;
    }

    12% {
        opacity: 0.92;
    }

    35% {
        transform: translate3d(calc(var(--bubble-drift-x) * 0.4), calc(var(--bubble-rise) * 0.35), 0) scale(0.9);
        opacity: 0.95;
    }

    68% {
        transform: translate3d(calc(var(--bubble-drift-x) * 0.7), calc(var(--bubble-rise) * 0.72), 0) scale(1.02);
        opacity: 0.84;
    }

    100% {
        transform: translate3d(var(--bubble-drift-x), var(--bubble-rise), 0) scale(1.08);
        opacity: 0;
    }
}

@keyframes counterGlowShift {
    0%,
    100% {
        transform: translateX(-8%) translateY(0);
        opacity: 0.78;
    }

    50% {
        transform: translateX(8%) translateY(-2px);
        opacity: 1;
    }
}

.counter-note {
    max-width: 720px;
    margin: 24px auto 0;
    text-align: center;
    color: var(--text-muted);
}

.story-spotlight-section {
    padding-top: 0;
    padding-bottom: 92px;
}

.story-gallery-section,
.phrase-stream-section,
.memory-grid-section,
.final-section {
    padding-top: 92px;
    padding-bottom: 92px;
}

.story-spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 30px;
    align-items: center;
}

.story-image-frame {
    padding: 14px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(110, 59, 71, 0.08);
    box-shadow: var(--shadow-soft);
}

.story-image-frame:hover {
    transform: translateY(-8px) rotate(-0.6deg);
}

.story-image-frame img {
    width: 100%;
    height: min(70vh, 620px);
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

.story-copy h2 {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 0.98;
    margin: 16px 0 16px;
}

.story-copy p {
    font-size: 1.02rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.memory-caption {
    margin-top: 22px;
    padding: 1rem 1.1rem;
    display: grid;
    gap: 6px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(235, 201, 210, 0.3), rgba(255, 255, 255, 0.94));
    border: 1px solid rgba(110, 59, 71, 0.08);
}

.memory-caption strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
}

.quote-break-section,
.emotion-strip-section {
    padding-top: 84px;
    padding-bottom: 84px;
}

.quote-spotlight {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 2.1rem;
    text-align: center;
    border-radius: 38px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(110, 59, 71, 0.08);
    position: relative;
    overflow: hidden;
}

.quote-spotlight::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(216, 167, 177, 0.14), transparent 20%),
        radial-gradient(circle at 88% 78%, rgba(201, 169, 110, 0.14), transparent 20%);
}

.quote-mark {
    position: relative;
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 5rem;
    line-height: 0.8;
    color: rgba(110, 59, 71, 0.28);
}

.quote-spotlight p {
    position: relative;
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3.6vw, 2.45rem);
    line-height: 1.35;
    color: var(--text-main);
    text-wrap: balance;
}

.story-gallery-shell {
    padding: 18px;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(110, 59, 71, 0.08);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.story-gallery-shell:hover {
    transform: translateY(-6px);
}

.swiper-romance {
    border-radius: 28px;
    overflow: visible;
    padding: 24px 0 26px;
}

.swiper-slide {
    background: #24191d;
    width: min(72%, 760px);
    border-radius: 28px;
    overflow: hidden;
    transform: scale(0.84);
    opacity: 0.5;
    filter: saturate(0.82) blur(0.2px);
    box-shadow: 0 22px 40px rgba(35, 23, 27, 0.14);
    transition: transform 1.05s ease, opacity 1.05s ease, filter 1.05s ease, box-shadow 1.05s ease;
}

.swiper-slide img {
    width: 100%;
    height: min(72vh, 560px);
    object-fit: cover;
}

.swiper-slide-active {
    transform: scale(1);
    opacity: 1;
    filter: none;
    box-shadow: 0 30px 64px rgba(35, 23, 27, 0.24);
}

.swiper-slide-prev,
.swiper-slide-next {
    opacity: 0.68;
    filter: saturate(0.88);
}

.slide-caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(59, 45, 49, 0.5);
    color: #fff;
    backdrop-filter: blur(12px);
}

.emotion-strip {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 2.1rem;
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(110, 59, 71, 0.08);
    box-shadow: var(--shadow-sm);
}

.emotion-strip p {
    margin: 18px 0 0;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.35rem, 3.4vw, 2.05rem);
    line-height: 1.38;
    color: var(--text-main);
}

.story-quote {
    height: 100%;
    padding: 1.7rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(110, 59, 71, 0.08);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    text-align: center;
}

.story-quote:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 34px rgba(110, 59, 71, 0.12);
}

.story-quote p {
    width: 100%;
    font-family: 'Playfair Display', serif;
    font-size: 1.32rem;
    line-height: 1.55;
}

.phrase-stream-grid {
    justify-content: center;
}

.polaroid-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.polaroid {
    flex: 0 1 calc(25% - 15px);
    max-width: calc(25% - 15px);
    background: #fff;
    padding: 0.95rem 0.95rem 1.15rem;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.polaroid:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(110, 59, 71, 0.14);
}

.polaroid:nth-child(2n) {
    transform: rotate(-2deg);
}

.polaroid:nth-child(3n) {
    transform: rotate(2.6deg);
}

.polaroid:nth-child(2n):hover,
.polaroid:nth-child(3n):hover {
    transform: translateY(-8px) rotate(0deg);
}

.polaroid img {
    width: 100%;
    aspect-ratio: 1 / 1.08;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 0.85rem;
}

.final-section {
    background: linear-gradient(180deg, rgba(235, 201, 210, 0.22), rgba(255, 253, 252, 1));
}

.final-card {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
    padding: 2.7rem 2.4rem;
    border-radius: 36px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(110, 59, 71, 0.08);
}

@media (max-width: 991.98px) {
    .counter-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 10px;
    }

    .story-spotlight {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .polaroid {
        flex-basis: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .story-spotlight {
        grid-template-columns: 1fr;
    }

    .story-image-frame img,
    .swiper-slide img {
        height: 440px;
    }

    .swiper-slide {
        width: min(82%, 640px);
    }
}

@media (max-width: 767.98px) {
    .counter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .story-spotlight-section {
        padding-bottom: 56px;
    }

    .story-gallery-section,
    .phrase-stream-section,
    .memory-grid-section,
    .final-section,
    .quote-break-section,
    .emotion-strip-section {
        padding-top: 56px;
        padding-bottom: 56px;
    }

    .polaroid {
        flex-basis: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .quote-spotlight,
    .emotion-strip,
    .final-card {
        padding: 1.6rem;
    }

    .story-image-frame img,
    .swiper-slide img {
        height: 320px;
    }

    .swiper-slide {
        width: 88%;
        transform: scale(0.86);
    }

    .slide-caption {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .phrase-stream-section .row {
        --bs-gutter-x: 0.9rem;
        --bs-gutter-y: 0.9rem;
    }

    .story-quote {
        padding: 1.1rem;
        border-radius: 20px;
    }

    .story-quote p,
    .emotion-strip p {
        font-size: 1rem;
        line-height: 1.45;
    }

    .quote-spotlight p {
        font-size: 1.4rem;
    }
}
