/* ===== Flip Book Container ===== */
.flip-book {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    box-shadow: var(--shadow-strong);
    border-radius: 8px;
    background: transparent;
}

/* ===== Page Styles ===== */
.page {
    background: linear-gradient(135deg, var(--purple-pastel-2), var(--purple-pastel-3));
    overflow: hidden;
}

.page.hard {
    background: linear-gradient(135deg, var(--purple-800), var(--purple-900));
}

.page-content {
    width: 100%;
    height: 100%;
    padding: 24px 24px 40px 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ===== Cover Pages ===== */
.cover-page .page-content {
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, var(--purple-800), var(--purple-900));
    border: 2px solid var(--gold);
}

.front-cover {
    border-radius: 0 8px 8px 0;
}

.back-cover {
    border-radius: 8px 0 0 8px;
}

.cover-decoration {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.cover-decoration.top {
    top: 30px;
}

.cover-decoration.bottom {
    bottom: 30px;
}

.cover-content {
    z-index: 1;
}

.book-title {
    font-family: var(--font-script);
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--gold);
    text-shadow: 0 2px 15px rgba(212, 175, 55, 0.3);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.heart-divider {
    width: 40px;
    height: 40px;
    margin: var(--spacing-md) auto;
    background: var(--gold);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.cover-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-style: italic;
    color: var(--purple-200);
    margin-bottom: var(--spacing-xs);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.cover-years {
    font-family: var(--font-sans);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--purple-300);
    margin-bottom: var(--spacing-lg);
    letter-spacing: 0.15em;
    font-weight: 500;
}

.cover-edition {
    display: inline-block;
    font-family: var(--font-sans);
    background: var(--gold);
    color: var(--purple-900);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cover-hint {
    position: absolute;
    bottom: 50px;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--purple-300);
    opacity: 0.8;
    letter-spacing: 0.02em;
}

/* Back Cover */
.back-title {
    font-family: var(--font-script);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    color: var(--gold);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

.infinity-symbol {
    font-size: 3rem;
    color: var(--purple-300);
    margin: var(--spacing-md) 0;
    font-weight: 200;
    opacity: 0.8;
}

.back-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--purple-200);
    margin-bottom: var(--spacing-md);
}

.heart-animation .heart {
    width: 48px;
    height: 48px;
    display: inline-block;
    background: var(--purple-300);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.back-quote {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--purple-300);
    margin-top: var(--spacing-md);
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

/* ===== Chapter Pages ===== */
.chapter-page {
    background: linear-gradient(180deg, var(--cream) 0%, var(--purple-pastel-1) 100%);
    color: var(--purple-900);
}

.chapter-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--purple-300);
}

.chapter-number {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--purple-500);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 4px;
    font-weight: 600;
}

.chapter-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--purple-700);
    margin-bottom: 4px;
    font-weight: 600;
}

.chapter-year {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--purple-400);
    letter-spacing: 0.1em;
}

.page-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: var(--spacing-lg);
    /* Hide scrollbar but allow scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.page-body::-webkit-scrollbar {
    display: none;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--purple-600);
    text-align: center;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.story-text {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--purple-800);
    text-align: center;
}

.caption {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--purple-500);
    text-align: center;
    font-style: italic;
}

.page-number {
    position: absolute;
    bottom: 10px;
    left: 24px;
    right: 24px;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--purple-400);
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* ===== Photo Placeholders & Grid (Touch Optimized) ===== */
.photo-placeholder, .video-placeholder {
    background: linear-gradient(135deg, var(--purple-200), var(--purple-300));
    border: 2px dashed var(--purple-400);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 100px;
    transition: transform 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.photo-placeholder:active, .video-placeholder:active {
    transform: scale(0.98);
    border-color: var(--purple-500);
}

@media (hover: hover) {
    .photo-placeholder:hover, .video-placeholder:hover {
        border-color: var(--purple-500);
        transform: scale(1.01);
        box-shadow: 0 4px 16px rgba(123, 44, 191, 0.15);
    }
}

.photo-placeholder.large {
    min-height: 150px;
}

.photo-placeholder.wide {
    min-height: 90px;
}

.placeholder-icon {
    width: 32px;
    height: 32px;
    background: var(--purple-500);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.video-placeholder .placeholder-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.placeholder-text {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--purple-600);
    letter-spacing: 0.02em;
}

/* Photo Grid Layouts */
.photo-grid {
    display: grid;
    gap: 8px;
    flex: 1;
    min-height: 100px;
}

.photo-grid.two-photos {
    grid-template-columns: 1fr 1fr;
}

.photo-grid.three-photos {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== Photo Frames (Actual Images) ===== */
.photo-frame {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: var(--purple-200);
    position: relative;
    flex: 1;
    min-height: 80px;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* Show faces - bias toward top */
    display: block;
    transition: transform 0.3s ease;
}

.photo-frame.large {
    flex: 2;
    min-height: 120px;
}

.photo-frame.wide {
    flex: 1;
    min-height: 80px;
}

@media (hover: hover) {
    .photo-frame img:hover {
        transform: scale(1.03);
    }
}

.photo-frame:active img {
    transform: scale(0.98);
}

/* Photo grids with frames */
.photo-grid .photo-frame {
    height: 100%;
    min-height: 0;
    flex: unset;
}

.photo-grid .photo-frame img {
    height: 100%;
    object-position: center 20%; /* Show faces */
}

/* Actual Images (legacy placeholder-based) */
.photo-placeholder img,
.photo-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.photo-placeholder img:hover {
    transform: scale(1.05);
}

/* Video Styling */
.video-placeholder video {
    width: 100%;
    border-radius: 10px;
}

/* ===== Love Notes (Secret Messages - Touch Optimized) ===== */
.love-note {
    background: linear-gradient(135deg, var(--purple-500), var(--purple-600));
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s ease;
    position: relative;
    overflow: hidden;
    min-height: var(--touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Prevent page flip library from capturing these events */
    z-index: 100;
}

.love-note::before {
    content: attr(data-secret);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--purple-900);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Touch: tap to reveal */
.love-note.revealed::before {
    opacity: 1;
}

/* Desktop: hover to reveal */
@media (hover: hover) {
    .love-note:hover::before {
        opacity: 1;
    }
    
    .love-note:hover .note-text {
        opacity: 0;
    }
}

.love-note:active {
    transform: scale(0.98);
}

.note-text {
    font-family: var(--font-sans);
    color: var(--cream);
    font-size: 0.85rem;
    transition: opacity 0.3s ease;
    letter-spacing: 0.02em;
}

.love-note.revealed .note-text {
    opacity: 0;
}

/* ===== Milestone Badge ===== */
.milestone-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--purple-900);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 25px;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    align-self: center;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.25);
}

.badge-icon {
    width: 20px;
    height: 20px;
    background: var(--purple-800);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===== Anniversary Counter ===== */
.anniversary-counter {
    text-align: center;
    background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
    padding: var(--spacing-md);
    border-radius: 12px;
    color: white;
}

.counter-label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--purple-200);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.counter-number {
    display: block;
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--gold);
    font-weight: 700;
    line-height: 1.2;
}

.counter-text {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--purple-200);
    font-style: italic;
}

/* ===== Letter Page ===== */
.letter-page {
    background: linear-gradient(180deg, var(--cream) 0%, var(--purple-pastel-1) 100%);
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
}

.letter-container {
    background: white;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 4px;
    box-shadow: var(--shadow-medium);
    max-width: 100%;
    position: relative;
}

.letter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--purple-400), var(--purple-500), var(--purple-400));
}

.letter-header {
    text-align: right;
    margin-bottom: var(--spacing-md);
}

.letter-date {
    font-family: var(--font-sans);
    color: var(--purple-500);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.letter-greeting {
    font-family: var(--font-script);
    font-size: 1.6rem;
    color: var(--purple-700);
    margin-bottom: var(--spacing-sm);
}

.letter-text {
    font-family: var(--font-body);
    color: var(--purple-800);
    line-height: 1.8;
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
}

.letter-signature {
    text-align: right;
    margin-top: var(--spacing-md);
    font-family: var(--font-body);
    color: var(--purple-700);
    line-height: 1.6;
    font-size: 0.95rem;
}

.signature {
    font-family: var(--font-script);
    font-size: 1.4rem;
    color: var(--purple-600);
}

.letter-decoration {
    position: absolute;
    bottom: 12px;
    right: 16px;
    width: 24px;
    height: 24px;
    background: var(--purple-300);
    opacity: 0.4;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ===== Dreams Page ===== */
.dreams-page {
    background: linear-gradient(180deg, var(--cream) 0%, var(--purple-pastel-1) 100%);
    color: var(--purple-900);
    text-align: center;
}

.dreams-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--purple-700);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.dreams-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.dream-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
    min-height: var(--touch-target);
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.dream-item:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .dream-item:hover {
        transform: translateX(8px);
    }
}

.dream-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: var(--purple-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dream-icon::after {
    content: '';
    width: 16px;
    height: 16px;
    background: white;
}

.dream-item:nth-child(1) .dream-icon::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dream-item:nth-child(2) .dream-icon::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dream-item:nth-child(3) .dream-icon::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dream-item:nth-child(4) .dream-icon::after {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dream-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--purple-700);
    text-align: left;
}

.final-note {
    margin-top: auto;
}

/* ===== Responsive Book ===== */
@media (max-width: 768px) {
    .page-content {
        padding: 18px 18px 36px 18px;
    }
    
    .photo-grid.three-photos {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .letter-container {
        padding: 20px;
    }
    
    .dream-item {
        padding: 12px 15px;
    }
    
    .page-number {
        left: 18px;
        right: 18px;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 14px 14px 32px 14px;
    }
    
    .photo-grid.two-photos {
        grid-template-columns: 1fr 1fr;
    }
    
    .photo-grid.three-photos {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .page-number {
        left: 14px;
        right: 14px;
    }
}
    
    .photo-placeholder.large {
        min-height: 140px;
    }
}
