﻿/* 摘自参考站 style.css：hero 区、头像浮动、爱心跳动、波浪、3D 相册墙样式 */


/* 头部 */
.main-header {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 2rem;
}


/* ── Hero Carousel (首页) ──────────────────────────────────── */
.main-header-hero {
    height: 92vh;
    min-height: 540px;
    max-height: 960px;
    margin-bottom: 2rem;
}


.hero-carousel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}


.hero-slides {
    position: absolute;
    inset: 0;
}


.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.04);
    animation: none;
}


.hero-slide-active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 8s ease-out;
}


@keyframes heroSlideKenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.06); }
}


.hero-slide-active {
    animation: heroSlideKenBurns 8s ease-out forwards;
}


/* Multi-layer gradient overlay */
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(0,0,0,0.18) 0%,
            rgba(0,0,0,0.08) 35%,
            rgba(0,0,0,0.12) 65%,
            rgba(0,0,0,0.42) 100%),
        radial-gradient(ellipse at 50% 60%, rgba(0,0,0,0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}


/* Center content */
.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    padding-bottom: 6rem; /* leave room for wave */
}


.hero-distance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 0.8rem 0.48rem 0.5rem;
    border-radius: 14px;
    background: rgba(32, 36, 38, 0.72);
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}


.hero-distance-button {
    cursor: pointer;
    appearance: none;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}


.hero-distance-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    background: rgba(23, 27, 30, 0.82);
}


.hero-distance-button:focus-visible {
    outline: 2px solid rgba(255, 184, 202, 0.95);
    outline-offset: 3px;
}


.hero-distance-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 1.05rem;
}


.hero-distance-badge strong {
    color: #ffffff;
    font-size: 1.14rem;
    letter-spacing: 0.02em;
}


.hero-distance-badge em {
    color: rgba(255, 255, 255, 0.72);
    font-style: normal;
    font-weight: 700;
}


@media (prefers-reduced-motion: reduce) {
    .distance-leaflet-heart-icon span {
        animation: none;
    }

    .distance-fast-route,
    .distance-fast-heart {
        animation: none;
    }

    .hero-distance-button {
        transition: none;
    }
}


/* Couple row */
.hero-couple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3.5rem;
}


/* Avatar wrapper */
.hero-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    animation: heroAvatarFloat 4s ease-in-out infinite;
}


.hero-avatar-left  { animation-delay: 0s; }

.hero-avatar-right { animation-delay: 0.6s; }


@keyframes heroAvatarFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}


/* Glossy ring */
.hero-avatar-ring {
    width: 136px;
    height: 136px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(145deg,
        rgba(255,255,255,0.95) 0%,
        rgba(255,182,193,0.85) 45%,
        rgba(255,255,255,0.92) 100%);
    box-shadow:
        0 0 0 2px rgba(255,255,255,0.55),
        0 12px 40px rgba(0,0,0,0.32),
        inset 0 1px 0 rgba(255,255,255,0.9);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
    cursor: default;
}


.hero-avatar-ring:hover {
    transform: scale(1.06);
    box-shadow:
        0 0 0 3px rgba(255,255,255,0.8),
        0 18px 50px rgba(0,0,0,0.38),
        inset 0 1px 0 rgba(255,255,255,0.95);
}


.hero-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}


.hero-avatar-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 12px rgba(0,0,0,0.55);
    white-space: nowrap;
}


/* Heart center */
.hero-heart-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}


.hero-heart-icon {
    font-size: 2.4rem;
    color: #ff5c8d;
    filter: drop-shadow(0 4px 16px rgba(255,60,120,0.7));
    animation: heroHeartBeat 1.4s ease-in-out infinite;
}


@keyframes heroHeartBeat {
    0%, 100% { transform: scale(1); }
    14%      { transform: scale(1.22); }
    28%      { transform: scale(1); }
    42%      { transform: scale(1.12); }
    70%      { transform: scale(1); }
}


/* Days badge below heart */
.hero-days-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 0.2rem;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 4px 18px rgba(0,0,0,0.18);
    color: #fff;
    white-space: nowrap;
}


.hero-days-num {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, #ffd1e8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


.hero-days-unit {
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.9;
}


/* Tagline */
.hero-tagline {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.88);
    letter-spacing: 0.12em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    margin-top: 0.2rem;
}


.hero-tagline strong {
    color: #ffd1e8;
    font-weight: 800;
}


/* Title-only fallback */
.hero-title-only {
    text-align: center;
    color: #fff;
}


.hero-title-only h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-shadow: 0 4px 24px rgba(0,0,0,0.4);
    margin-bottom: 0.5rem;
}


.hero-title-only p {
    font-size: 1.1rem;
    opacity: 0.82;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}


/* Dot navigation */
.hero-dots {
    position: absolute;
    bottom: 6.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    padding: 0;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}


.hero-dot-active {
    width: 24px;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 10px rgba(255,92,141,0.5);
}


.hero-dot:hover:not(.hero-dot-active) {
    background: rgba(255,255,255,0.72);
    transform: scale(1.2);
}


/* ── Static header (album / article detail pages) ──────────── */
.main-header-page {
    margin-bottom: 2rem;
}


/* 旧的 .header-overlay 规则已移除：遮罩统一由 style.css 的 .header-overlay 控制 */


.header-wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 120px;
    pointer-events: none;
    overflow: hidden;
}


.header-wave .waves {
    width: 100%;
    height: 100%;
    display: block;
}


.header-wave .parallax>use {
    animation: moveForever 18s cubic-bezier(.55, .5, .45, .5) infinite;
}


.header-wave .parallax>use:nth-child(1) {
    animation-delay: -6s;
    animation-duration: 20s;
}


.header-wave .parallax>use:nth-child(2) {
    animation-delay: -4s;
    animation-duration: 18s;
}


.header-wave .parallax>use:nth-child(3) {
    animation-delay: -2s;
    animation-duration: 16s;
}


.header-wave .parallax>use:nth-child(4) {
    animation-delay: 0s;
    animation-duration: 14s;
}


@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}


/* Memory wall on albums page */
.memory-wall-section {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: 1.5rem;
    align-items: stretch;
    margin: 0 0 2rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 138, 181, 0.22);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 185, 215, 0.82), transparent 36%),
        radial-gradient(circle at 82% 15%, rgba(191, 215, 255, 0.72), transparent 34%),
        radial-gradient(circle at 50% 90%, rgba(255, 160, 200, 0.38), transparent 40%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 252, 0.92));
    box-shadow:
        0 32px 90px rgba(255, 100, 163, 0.18),
        0 8px 32px rgba(15, 23, 42, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    overflow: hidden;
}


.memory-wall-section::before {
    content: '';
    position: absolute;
    inset: auto 6% -48% auto;
    width: 38%;
    height: 76%;
    background: radial-gradient(circle, rgba(255, 64, 128, 0.16), transparent 66%);
    pointer-events: none;
    animation: mw-glow-pulse 4s ease-in-out infinite;
}


.memory-wall-section::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 28%;
    height: 70%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 180, 220, 0.18), transparent 60%);
    pointer-events: none;
    animation: mw-glow-pulse 4s ease-in-out infinite reverse;
}


.memory-wall-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 420px;
    padding: 1.4rem;
}


.memory-wall-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 0.9rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #ff4f87;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255, 138, 181, 0.2);
}


.memory-wall-copy h3 {
    max-width: 9em;
    margin: 0;
    color: #26324b;
    font-size: clamp(1.55rem, 3vw, 2.6rem);
    line-height: 1.16;
    letter-spacing: 0;
}


.memory-wall-copy p {
    max-width: 20rem;
    margin: 1rem 0 0;
    color: #67738a;
    font-size: 0.98rem;
    line-height: 1.8;
}


.memory-wall-stage {
    position: relative;
    z-index: 1;
    min-height: 480px;
    border-radius: 18px;
    overflow: hidden;
    cursor: grab;
    isolation: isolate;
    touch-action: none;
    user-select: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 246, 250, 0.12)),
        radial-gradient(circle at 50% 48%, rgba(255, 103, 151, 0.2), transparent 42%);
}


.memory-wall-stage.is-dragging {
    cursor: grabbing;
}


.memory-wall-stage.memory-wall-three .memory-wall-scene {
    display: none;
}


.memory-wall-three-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
}


.memory-wall-halo {
    position: absolute;
    inset: 8% 6%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.62), transparent 36%),
        radial-gradient(circle, rgba(255, 64, 129, 0.22), transparent 60%);
    filter: blur(10px);
    opacity: 0.92;
    transform: scale(0.9);
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.7s ease;
    animation: halo-breathe 3.2s ease-in-out infinite;
}


.memory-wall-stage.is-expanded .memory-wall-halo {
    opacity: 0.65;
    transform: scale(1.18);
}


.memory-wall-scene {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1300px;
    perspective-origin: center;
}


.memory-wall-cluster {
    position: relative;
    width: 1px;
    height: 1px;
    transform-style: preserve-3d;
    will-change: transform;
}


.memory-wall-card {
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    aspect-ratio: 4 / 5;
    border-radius: 10px;
    text-decoration: none;
    transform-style: preserve-3d;
    transform-origin: center;
    will-change: transform, opacity;
    cursor: pointer;
}


.memory-wall-card-inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}


.memory-wall-stage .memory-wall-card:hover .memory-wall-card-inner,
.memory-wall-card:focus-visible .memory-wall-card-inner,
.memory-wall-stage.is-dragging .memory-wall-card-inner {
    transform: none !important;
}


.memory-wall-stage.is-viewing .memory-wall-card-inner {
    filter: saturate(0.72) blur(0.4px);
}


.memory-wall-card-front,
.memory-wall-card-back {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 8px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.7);
}


.memory-wall-card-front {
    padding: 2px;
    background: rgba(255, 255, 255, 0.84);
}


.memory-wall-card-front img {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 6px;
    object-fit: cover;
    background: #fff3f7;
}


.memory-wall-video {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #ff4f87;
    font-size: 0.44rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}


.memory-wall-card-back {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.26rem;
    padding: 0.5rem 0.42rem;
    background: linear-gradient(145deg, rgba(255, 76, 126, 0.96), rgba(255, 146, 176, 0.94));
    color: #fff;
    text-align: center;
    transform: rotateY(180deg);
}


.memory-wall-card-back strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.42rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.memory-wall-card-back span {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.34rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


.memory-wall-card-back small {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.32rem;
}


.memory-wall-viewer {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}


.memory-wall-viewer.is-open {
    opacity: 1;
    pointer-events: auto;
}


.memory-wall-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 250, 253, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}


.memory-wall-viewer-panel {
    position: relative;
    z-index: 1;
    width: min(74vw, 720px);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 0.7rem;
}


.memory-wall-viewer-figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.88);
}


.memory-wall-viewer-figure img {
    width: 100%;
    max-height: min(58vh, 520px);
    display: block;
    object-fit: contain;
    background: linear-gradient(135deg, #fff7fb, #f5fbff);
}


.memory-wall-viewer-figure figcaption {
    display: grid;
    gap: 0.24rem;
    padding: 0.85rem 1rem 1rem;
    color: #26324b;
}


.memory-wall-viewer-figure strong {
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.memory-wall-viewer-figure span {
    display: -webkit-box;
    overflow: hidden;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}


.memory-wall-viewer-figure small {
    color: #ff5b91;
    font-size: 0.78rem;
    font-weight: 700;
}


.memory-wall-viewer-link {
    justify-self: start;
    margin-top: 0.22rem;
    padding: 0.4rem 0.76rem;
    border-radius: 999px;
    background: #ff5b91;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(255, 91, 145, 0.26);
}


.memory-wall-viewer-close,
.memory-wall-viewer-nav {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: #ff5b91;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.13);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}


.memory-wall-viewer-close:hover,
.memory-wall-viewer-nav:hover {
    background: #fff;
    transform: translateY(-1px) scale(1.04);
}


.memory-wall-viewer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.22);
}


.memory-wall-viewer-nav {
    width: 44px;
    height: 44px;
}


.memory-wall-empty,
.memory-wall-hint {
    position: absolute;
    left: 50%;
    z-index: 3;
    transform: translateX(-50%);
    pointer-events: none;
}


.memory-wall-empty {
    top: 50%;
    color: #8a6274;
    transform: translate(-50%, -50%);
}


.memory-wall-hint {
    bottom: 1rem;
    padding: 0.42rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #ff4f87;
    font-size: 0.78rem;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(255, 138, 181, 0.22), inset 0 0 0 1px rgba(255,138,181,0.15);
    transition: opacity 0.35s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}


.memory-wall-stage.is-expanded .memory-wall-hint {
    opacity: 0;
}


.memory-wall-reduced .memory-wall-scene {
    position: relative;
    height: 100%;
    perspective: none;
}


.memory-wall-reduced .memory-wall-cluster {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 0.8rem;
    padding: 1rem;
    transform: none !important;
}


.memory-wall-reduced .memory-wall-card {
    position: relative;
    width: 100%;
    opacity: 1 !important;
    pointer-events: auto;
    transform: none !important;
}


@media (min-width: 1180px) {
    .memory-wall-card {
        width: 31px;
    }
}


@media (max-width: 900px) {
    .memory-wall-section {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 1rem;
    }

    .memory-wall-copy {
        min-height: auto;
        padding: 0.5rem 0.6rem 0;
    }

    .memory-wall-copy h3 {
        max-width: none;
        font-size: 1.55rem;
    }

    .memory-wall-copy p {
        margin-top: 0.5rem;
        font-size: 0.9rem;
    }

    .memory-wall-stage {
        min-height: 390px;
    }

    .memory-wall-card {
        width: 25px;
    }

    .memory-wall-viewer {
        padding: 0.75rem;
    }

    .memory-wall-viewer-panel {
        width: 100%;
        grid-template-columns: 38px minmax(0, 1fr) 38px;
        gap: 0.45rem;
    }

    .memory-wall-viewer-nav {
        width: 38px;
        height: 38px;
    }

    .memory-wall-viewer-figure img {
        max-height: 46vh;
    }
}


@media (max-width: 520px) {
    .memory-wall-section {
        border-radius: 18px;
    }

    .memory-wall-stage {
        min-height: 340px;
        border-radius: 14px;
    }

    .memory-wall-card {
        width: 22px;
    }

    .memory-wall-hint {
        bottom: 0.7rem;
        font-size: 0.72rem;
    }

    .memory-wall-viewer-panel {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "figure figure"
            "prev next";
    }

    .memory-wall-viewer-prev {
        grid-area: prev;
        justify-self: end;
    }

    .memory-wall-viewer-next {
        grid-area: next;
        justify-self: start;
    }

    .memory-wall-viewer-figure {
        grid-area: figure;
    }

    .memory-wall-viewer-close {
        top: -10px;
        right: -6px;
    }
}


/* Petal rain canvas – covers memory-wall-section, pointer-events:none so it doesn’t block interaction */
.petal-rain-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}


/* Zoom hint tooltip on the memory wall */
.memory-wall-zoom-hint {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 4;
    padding: 0.3rem 0.62rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.80);
    color: #c0508a;
    font-size: 0.7rem;
    font-weight: 600;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(255,138,181,0.16);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}


.memory-wall-stage:hover .memory-wall-zoom-hint,
.memory-wall-stage:focus-within .memory-wall-zoom-hint {
    opacity: 1;
    transform: translateY(0);
}


/* ── Hero Carousel responsive ──────────────────────────── */
@media (max-width: 640px) {
    .main-header-hero {
        height: 85vh;
        min-height: 460px;
    }

    .hero-couple {
        gap: 1.8rem;
    }

    .hero-distance-badge {
        gap: 0.34rem;
        padding: 0.4rem 0.65rem 0.4rem 0.42rem;
        border-radius: 12px;
        font-size: 0.86rem;
    }

    .hero-distance-icon {
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 0.9rem;
    }

    .hero-distance-badge strong {
        font-size: 0.98rem;
    }

    .distance-map-shell {
        padding: 0.9rem;
    }

    .distance-map-stage {
        border-radius: 24px;
    }

    .distance-map-close {
        top: 0.9rem;
        right: 0.9rem;
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .distance-map-panel {
        top: 0.8rem;
        width: calc(100% - 4.2rem);
        gap: 0.75rem;
        padding: 0.8rem 0.95rem;
        border-radius: 24px;
    }

    .distance-map-avatar {
        width: 44px;
        height: 44px;
    }

    .distance-map-name {
        font-size: 1rem;
    }

    .distance-map-place {
        font-size: 0.72rem;
    }

    .distance-map-km {
        font-size: 1.3rem;
    }

    .distance-map-loading {
        font-size: 0.78rem;
    }

    .distance-map-caption {
        left: 1rem;
        bottom: 1rem;
        padding: 0.7rem 0.85rem;
    }

    .distance-map-caption strong {
        font-size: 1.4rem;
    }

    .distance-map-caption span {
        font-size: 0.8rem;
    }

    .hero-avatar-ring {
        width: 96px;
        height: 96px;
    }

    .hero-avatar-name {
        font-size: 0.88rem;
    }

    .hero-heart-icon {
        font-size: 1.8rem;
    }

    .hero-days-num {
        font-size: 1.2rem;
    }

    .hero-tagline {
        font-size: 0.8rem;
        letter-spacing: 0.06em;
    }

    .hero-dots {
        bottom: 5.5rem;
    }
}

/* 我们的容器：竖排居中 */
.hero-stack-reference { display:flex; flex-direction:column; align-items:center; gap:1.2rem; }

/* —— 照片放大层修正：铺满全屏 + 关闭按钮固定在右上角，永远看得见 —— */
body.mw-viewer-open {
    overflow: hidden;
}

.memory-wall-viewer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    padding: clamp(12px, 3vh, 34px);
}

.memory-wall-viewer-panel {
    width: min(92vw, 980px);
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    max-height: 100%;
}

.memory-wall-viewer-figure {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2 * clamp(12px, 3vh, 34px));
}

.memory-wall-viewer-figure img {
    width: 100%;
    max-height: min(70vh, 760px);
    object-fit: contain;
}

.memory-wall-viewer-figure figcaption {
    flex: 0 0 auto;
    overflow-y: auto;
}

.memory-wall-viewer-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    font-size: 16px;
}

@media (max-width: 720px) {
    .memory-wall-viewer-panel {
        width: 94vw;
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        gap: 0.4rem;
    }

    .memory-wall-viewer-figure img {
        max-height: 62vh;
    }

    .memory-wall-viewer-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }
}