:root {
    --memory-blue: #1769f5;
    --memory-blue-dark: #0b4fd5;
    --memory-navy: #102447;
    --memory-muted: #64748b;
    --memory-pale: #eff6ff;
    --memory-line: #dbeafe;
}

.memorable-days-page {
    overflow-x: hidden;
}

.memory-page,
.memory-page button {
    font-family: inherit;
}

.memory-hero {
    position: relative;
    overflow: hidden;
    padding: 104px 0 76px;
    border-bottom: 1px solid #e8f0fb;
    background:
        radial-gradient(circle at 78% 28%, rgba(96, 165, 250, .18), transparent 24%),
        linear-gradient(120deg, #fff 8%, #f7fbff 54%, #eef7ff 100%);
}

.memory-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, .9fr);
    align-items: center;
    gap: 60px;
}

.memory-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: var(--memory-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.memory-hero h1 {
    max-width: 700px;
    margin: 0 0 18px;
    color: var(--memory-navy);
    font-size: clamp(44px, 5vw, 72px);
    font-weight: 700;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.memory-hero h1 span {
    color: var(--memory-blue);
}

.memory-hero-copy > p {
    max-width: 680px;
    margin: 0;
    color: #586a85;
    font-size: 18px;
    line-height: 1.75;
}

.memory-hero-art {
    position: relative;
    min-height: 270px;
}

.memory-camera-glow {
    position: absolute;
    right: 180px;
    bottom: 18px;
    width: 220px;
    height: 150px;
    border-radius: 50%;
    background: rgba(116, 202, 255, .24);
    filter: blur(2px);
    transform: rotate(-12deg);
}

.memory-camera {
    position: absolute;
    z-index: 4;
    right: 190px;
    bottom: 38px;
    width: 150px;
    height: 104px;
    border: 8px solid #fff;
    border-radius: 28px;
    background: linear-gradient(145deg, #3e83fa, #0a47be);
    box-shadow: 0 22px 38px rgba(20, 79, 180, .24);
    transform: rotate(-10deg);
}

.memory-camera::before {
    position: absolute;
    top: -27px;
    left: 25px;
    width: 55px;
    height: 26px;
    border: 7px solid #fff;
    border-bottom: 0;
    border-radius: 13px 13px 0 0;
    background: #2e72e9;
    content: "";
}

.memory-camera-lens {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border: 8px solid #9cc8ff;
    border-radius: 50%;
    background: #0d2c6d;
    box-shadow: inset 0 0 0 6px #2d6bd0;
    transform: translate(-50%, -50%);
}

.memory-camera-lens i {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d9f3ff, #4ea3ff 42%, #0b2861 43%);
}

.memory-camera-flash {
    position: absolute;
    top: 13px;
    right: 17px;
    width: 17px;
    height: 11px;
    border-radius: 4px;
    background: #dceeff;
}

.memory-photo-frame {
    position: absolute;
    z-index: 3;
    width: 142px;
    height: 104px;
    padding: 8px 8px 21px;
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 13px 26px rgba(30, 64, 113, .2);
}

.memory-photo-frame span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 2px;
    background:
        linear-gradient(145deg, transparent 53%, rgba(20, 87, 155, .72) 54%),
        linear-gradient(40deg, transparent 48%, rgba(64, 144, 106, .92) 49%),
        linear-gradient(#9fdcff 0 55%, #d9f4ff 56%);
}

.memory-photo-frame--one { top: 6px; right: 146px; transform: rotate(8deg); }
.memory-photo-frame--two { top: 82px; right: 24px; transform: rotate(13deg); }
.memory-photo-frame--three { top: 0; right: 5px; transform: rotate(-4deg) scale(.82); }

.memory-spark {
    position: absolute;
    z-index: 2;
    width: 33px;
    height: 3px;
    border-radius: 10px;
    background: #ff9348;
}

.memory-spark--one { left: 30px; top: 55px; transform: rotate(47deg); }
.memory-spark--two { left: 9px; top: 98px; transform: rotate(8deg); }
.memory-spark--three { left: 49px; top: 24px; transform: rotate(72deg); }

.memory-hero-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(109, 190, 255, .12);
}

.memory-hero-orb--one { right: -80px; bottom: -155px; width: 360px; height: 360px; }
.memory-hero-orb--two { top: -100px; left: 45%; width: 210px; height: 210px; }

.memory-timeline-section {
    padding: 84px 0 110px;
    background: #fff;
}

.memory-entry {
    position: relative;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 34px;
    padding-bottom: 62px;
}

.memory-entry:not(:last-child)::before {
    position: absolute;
    top: 10px;
    bottom: -4px;
    left: 55px;
    width: 2px;
    background: linear-gradient(var(--memory-line), #edf5ff);
    content: "";
}

.memory-date-column {
    position: relative;
    z-index: 2;
    padding-top: 18px;
}

.memory-timeline-dot {
    display: block;
    width: 15px;
    height: 15px;
    margin: 0 auto 14px;
    border: 4px solid #e6f1ff;
    border-radius: 50%;
    background: var(--memory-blue);
    box-sizing: content-box;
}

.memory-date-card {
    display: flex;
    width: 94px;
    min-height: 108px;
    margin: 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid #dceaff;
    border-radius: 17px;
    background: linear-gradient(145deg, #fff, #eef6ff);
    box-shadow: 0 12px 26px rgba(29, 93, 190, .11);
    color: var(--memory-navy);
}

.memory-date-day { color: var(--memory-blue); font-size: 35px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.memory-date-month { margin-top: 5px; font-size: 13px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.memory-date-year { color: #5d7292; font-size: 12px; font-weight: 600; }

.memory-content {
    min-width: 0;
    padding: 22px 22px 24px;
    border: 1px solid #e7eff8;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(20, 48, 89, .075);
}

.memory-entry-header {
    display: flex;
    min-height: 60px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 0 4px 17px;
}

.memory-entry-header h2 {
    margin: 0 0 4px;
    color: var(--memory-navy);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.025em;
}

.memory-entry-header p {
    max-width: 760px;
    margin: 0;
    color: var(--memory-muted);
    font-size: 14px;
    line-height: 1.6;
}

.memory-photo-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 11px;
    background: var(--memory-pale);
    color: #184c9d;
    font-size: 13px;
    font-weight: 600;
}

.memory-photo-count i { color: var(--memory-blue); font-size: 16px; }

.memory-carousel {
    position: relative;
    padding-bottom: 27px;
}

.memory-carousel-viewport {
    overflow: hidden;
    border-radius: 16px;
    touch-action: pan-y;
}

.memory-carousel-track {
    --memory-gap: 10px;
    --memory-per-view: 4;
    display: flex;
    gap: var(--memory-gap);
    transition: transform .58s cubic-bezier(.22, .61, .36, 1);
    will-change: transform;
}

.memory-photo {
    position: relative;
    flex: 0 0 calc((100% - (var(--memory-gap) * (var(--memory-per-view) - 1))) / var(--memory-per-view));
    overflow: hidden;
    height: 220px;
    padding: 0;
    border: 0;
    border-radius: 15px;
    background: #eaf2fb;
    cursor: zoom-in;
    box-shadow: 0 6px 18px rgba(15, 42, 80, .12);
}

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

.memory-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    background: linear-gradient(180deg, transparent 25%, rgba(5, 22, 54, .7));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity .3s ease;
}

.memory-photo-overlay i { font-size: 22px; }
.memory-photo:hover img { transform: scale(1.055); }
.memory-photo:hover .memory-photo-overlay,
.memory-photo:focus-visible .memory-photo-overlay { opacity: 1; }

.memory-carousel-arrow,
.memory-lightbox-arrow,
.memory-lightbox-close {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: transform .25s ease, background .25s ease, color .25s ease, opacity .25s ease;
}

.memory-carousel-arrow {
    position: absolute;
    z-index: 4;
    top: 86px;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 8px 24px rgba(18, 54, 103, .2);
    color: var(--memory-blue);
    font-size: 20px;
}

.memory-carousel-arrow--prev { left: -18px; }
.memory-carousel-arrow--next { right: -18px; }
.memory-carousel-arrow:hover:not(:disabled) { background: var(--memory-blue); color: #fff; transform: scale(1.06); }
.memory-carousel-arrow:disabled { opacity: .35; cursor: default; }
.memory-carousel-arrow.is-hidden { display: none; }

.memory-carousel-dots {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.memory-carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #cfdaea;
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}

.memory-carousel-dot.is-active { width: 22px; border-radius: 5px; background: var(--memory-blue); }

.memory-empty {
    max-width: 720px;
    margin: 10px auto;
    padding: 70px 30px;
    border: 1px solid #dceaff;
    border-radius: 28px;
    background: linear-gradient(145deg, #fff, #f3f8ff);
    box-shadow: 0 20px 50px rgba(20, 63, 120, .09);
    text-align: center;
}

.memory-empty-icon {
    display: grid;
    width: 82px;
    height: 82px;
    margin: 0 auto 22px;
    place-items: center;
    border-radius: 24px;
    background: #e7f1ff;
    color: var(--memory-blue);
    font-size: 34px;
    transform: rotate(-5deg);
}

.memory-empty h2 { margin: 0 0 10px; color: var(--memory-navy); font-size: 34px; }
.memory-empty p { margin: 0; color: var(--memory-muted); }

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

.memory-reveal.is-visible { opacity: 1; transform: none; }

.memory-lightbox {
    position: fixed;
    z-index: 100000;
    inset: 0;
    display: grid;
    visibility: hidden;
    place-items: center;
    opacity: 0;
    transition: opacity .25s ease, visibility .25s ease;
}

.memory-lightbox.is-open { visibility: visible; opacity: 1; }
.memory-lightbox-backdrop { position: absolute; inset: 0; background: rgba(5, 15, 35, .94); }

.memory-lightbox-figure {
    position: relative;
    z-index: 2;
    display: flex;
    max-width: 90vw;
    margin: 0;
    align-items: center;
    flex-direction: column;
    transform: scale(.96);
    transition: transform .28s ease;
}

.memory-lightbox.is-open .memory-lightbox-figure { transform: scale(1); }
.memory-lightbox-figure img { display: block; max-width: 88vw; max-height: 82vh; border-radius: 10px; object-fit: contain; box-shadow: 0 20px 65px rgba(0, 0, 0, .45); }
.memory-lightbox-figure figcaption { margin-top: 14px; color: rgba(255, 255, 255, .8); font-size: 14px; letter-spacing: .08em; }

.memory-lightbox-close,
.memory-lightbox-arrow {
    position: absolute;
    z-index: 4;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 23px;
    backdrop-filter: blur(8px);
}

.memory-lightbox-close { top: 24px; right: 28px; }
.memory-lightbox-arrow { top: 50%; transform: translateY(-50%); }
.memory-lightbox-arrow--prev { left: 26px; }
.memory-lightbox-arrow--next { right: 26px; }
.memory-lightbox-close:hover { background: #fff; color: var(--memory-navy); transform: rotate(6deg); }
.memory-lightbox-arrow:hover { background: var(--memory-blue); transform: translateY(-50%) scale(1.06); }
.memory-lightbox-arrow.is-hidden { display: none; }
.memory-lightbox-open { overflow: hidden; }

@media (max-width: 1199.98px) {
    .memory-hero-grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 25px; }
    .memory-carousel-track { --memory-per-view: 3; }
    .memory-photo { height: 215px; }
}

@media (max-width: 991.98px) {
    .memory-hero { padding: 82px 0 58px; }
    .memory-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .memory-hero-copy { width: 100%; min-width: 0; text-align: center; }
    .memory-hero h1 { width: 100%; max-width: 100%; margin-inline: auto; white-space: normal; }
    .memory-hero-copy > p { margin-inline: auto; }
    .memory-hero-art { width: 520px; max-width: 100%; min-height: 230px; margin: -5px auto 0; transform: scale(.88); }
    .memory-entry { grid-template-columns: 92px minmax(0, 1fr); gap: 20px; }
    .memory-entry:not(:last-child)::before { left: 45px; }
    .memory-date-card { width: 82px; }
    .memory-carousel-track { --memory-per-view: 2; }
}

@media (max-width: 767.98px) {
    .memory-hero { padding: 70px 0 45px; }
    .memory-hero h1 { font-size: 44px; }
    .memory-hero-copy > p { font-size: 16px; line-height: 1.65; }
    .memory-hero-art { min-height: 190px; margin-top: -20px; transform: scale(.72); transform-origin: center; }
    .memory-timeline-section { padding: 55px 0 80px; }
    .memory-entry { display: block; padding-bottom: 42px; }
    .memory-entry:not(:last-child)::before { display: none; }
    .memory-date-column { display: flex; align-items: center; gap: 12px; padding: 0 0 14px 4px; }
    .memory-timeline-dot { width: 12px; height: 12px; margin: 0; }
    .memory-date-card { width: auto; min-width: 148px; min-height: 58px; margin: 0; padding: 9px 14px; flex-direction: row; gap: 7px; border-radius: 14px; }
    .memory-date-day { font-size: 28px; }
    .memory-date-month { margin: 0; }
    .memory-date-year { padding-left: 1px; }
    .memory-content { padding: 17px 14px 20px; border-radius: 20px; }
    .memory-entry-header { display: block; min-height: 0; padding: 0 2px 15px; }
    .memory-entry-header h2 { font-size: 19px; }
    .memory-entry-header p { margin-bottom: 11px; }
    .memory-photo-count { padding: 7px 10px; }
    .memory-carousel-track { --memory-per-view: 1; --memory-gap: 0px; }
    .memory-photo { height: min(64vw, 310px); border-radius: 14px; }
    .memory-carousel-arrow { top: calc(50% - 26px); width: 48px; height: 48px; }
    .memory-carousel-arrow--prev { left: 9px; }
    .memory-carousel-arrow--next { right: 9px; }
    .memory-lightbox-arrow { top: auto; bottom: 24px; width: 48px; height: 48px; transform: none; }
    .memory-lightbox-arrow--prev { left: calc(50% - 62px); }
    .memory-lightbox-arrow--next { right: calc(50% - 62px); }
    .memory-lightbox-arrow:hover { transform: scale(1.05); }
    .memory-lightbox-close { top: 16px; right: 16px; }
    .memory-lightbox-figure img { max-width: 94vw; max-height: 72vh; }
}

@media (max-width: 480px) {
    .memory-hero .container { width: 100%; padding-inline: 24px; }
    .memory-hero-copy { display: flex; align-items: center; flex-direction: column; }
    .memory-hero h1 { font-size: clamp(30px, 9vw, 36px); line-height: 1.12; letter-spacing: -.04em; text-align: center; }
    .memory-hero h1 span { display: block; }
    .memory-hero-copy > p { width: 100%; max-width: 330px; text-align: center; }
    .memory-hero-art { width: 500px; margin-left: -48px; max-width: calc(100% + 96px); }
    .memory-content { margin-inline: -3px; }
}

@media (prefers-reduced-motion: reduce) {
    .memory-reveal { opacity: 1; transform: none; transition: none; }
    .memory-carousel-track,
    .memory-photo img,
    .memory-lightbox,
    .memory-lightbox-figure { transition: none; }
}
