body{margin:0;padding:0;background:#ffe;font-size:14px;font-family:'Poppins','微软雅黑','宋体',sans-serif;color:#231F20;overflow-x:hidden;user-select:text;-webkit-user-select:text}
* { box-sizing: border-box; }
a {color:#000;font-size:14px;}
#main{width:100%;background:transparent;position:relative;z-index:1;overflow:hidden;}
#wrap{position:relative;margin:0 auto;width:1100px;height:680px;margin-top:10px;}
#text{width:272px;
height:400px;
left:188px;
top:80px;
position:absolute;
z-index: 100;
pointer-events: auto;
}
#code{display:none;font-size:16px;line-height:1.8;}
#clock-box {position:absolute;left:60px;top:510px;font-size:28px;display:none;}
#clock-box a {font-size:28px;text-decoration:none;}
#clock{margin-left:48px;}
#clock .digit {font-size:64px;}
#canvas{margin:0 auto;width:1100px;height:680px;position:absolute;top:0;left:0;z-index:50;pointer-events:auto;}

/* ===== MUSIC PLAYER CONTROL ===== */
#music-player-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 120px;
    height: 120px;
}

.music-player-animation {
    width: 120px;
    height: 120px;
    position: relative;
}

.music-player-animation lottie-player {
    width: 120px;
    height: 120px;
}

.music-toggle-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(194, 24, 91, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(194, 24, 91, 0.4);
    z-index: 10;
}

.music-toggle-btn:hover {
    background: rgba(194, 24, 91, 1);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(194, 24, 91, 0.6);
}

.music-toggle-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.music-icon {
    font-size: 16px;
    line-height: 1;
}

.music-play {
    padding-left: 2px;
}

/* ===== MOBILE HERO SECTION ===== */
#mobile-hero {
    display: none; /* Hidden on desktop */
}
.mobile-letter-modal {
    display: none; /* Hidden by default */
}

/* ===== DESKTOP LETTER MODAL ===== */
.desktop-letter-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.85) !important;
    z-index: 999999 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 40px !important;
    overflow-y: auto !important;
    pointer-events: auto !important;
}

.desktop-letter-modal.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.desktop-letter-modal-content {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: letterModalOpen 0.5s ease-out forwards;
}

@keyframes letterModalOpen {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.desktop-letter-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
    font-size: 36px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    transition: background 0.2s;
}

.desktop-letter-close:hover {
    background: rgba(255,255,255,0.3);
}

.desktop-letter-paper {
    background: linear-gradient(135deg, #fff9f0 0%, #fffbf5 100%);
    border-radius: 20px;
    padding: 50px 45px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    border: 2px solid rgba(194,24,91,0.2);
}

.desktop-letter-text {
    font-family: 'Poppins', sans-serif;
}

.desktop-read-more-btn {
    background: linear-gradient(135deg, #c2185b 0%, #880e4f 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(194, 24, 91, 0.3);
    margin-top: 10px;
    margin-bottom: 40px;
    display: inline-block !important;
    visibility: visible !important;
    position: relative;
    z-index: 150;
    pointer-events: auto;
}

.desktop-read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 24, 91, 0.4);
}

.desktop-read-more-btn:active {
    transform: translateY(0);
}

#error{margin:0 auto;text-align:center;margin-top:60px;display:none;}
.hand{cursor:pointer;}
.say{margin-left:5px;}
.space{margin-right:150px;}

/* ===== PASSWORD WALL ===== */
#password-wall {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, #fff0f3 0%, #fce4ec 50%, #ffe4e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    overflow: hidden;
}

.pw-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    z-index: 0;
}

.pw-bg-animation lottie-player {
    width: 100%;
    height: 100%;
}

#password-wall.fade-out {
    animation: passwordExit 1s ease forwards;
}

@keyframes passwordExit {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

#password-box {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 60px 50px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    border: 3px solid rgba(194, 24, 91, 0.2);
    box-shadow: 0 20px 60px rgba(194, 24, 91, 0.3);
    max-width: 480px;
    width: 90%;
    animation: floatIn 1s ease-out;
}

@keyframes floatIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.pw-heart {
    font-size: 72px;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: block;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(194, 24, 91, 0.3));
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.pw-title {
    font-family: 'Dancing Script', cursive;
    color: #c2185b;
    font-size: 42px;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.pw-subtitle {
    color: #880e4f;
    font-size: 16px;
    margin: 0 0 35px 0;
    opacity: 0.85;
    font-family: 'Poppins', sans-serif;
}

#pw-input {
    width: 100%;
    padding: 16px 24px;
    border: 2px solid #f8bbd0;
    border-radius: 50px;
    background: #fff;
    color: #5d4037;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#pw-input::placeholder {
    color: rgba(194, 24, 91, 0.4);
}

#pw-input:focus {
    border-color: #e91e63;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#pw-submit {
    margin-top: 20px;
    padding: 16px 60px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 24px rgba(233, 30, 99, 0.4);
    letter-spacing: 0.5px;
}

#pw-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(233, 30, 99, 0.5);
}

#pw-submit:active {
    transform: translateY(-1px);
}

#pw-error {
    display: none;
    color: #e91e63;
    margin-top: 16px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    background: rgba(233, 30, 99, 0.1);
    padding: 10px 20px;
    border-radius: 20px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s ease;
}

/* Entrance animation for main content */
@keyframes siteEntrance {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

body.entering #main,
body.entering #mobile-hero,
body.entering #sections-container {
    animation: siteEntrance 0.8s ease-out 0.3s both;
}

/* ===== SECTIONS ===== */
#sections-container {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

#sections-container *,
#sections-container button,
#sections-container .add-btn,
#sections-container .polaroid-grid,
#sections-container .journal-grid,
#sections-container .bucket-list,
#sections-container .favs-grid {
    pointer-events: auto !important;
}

.love-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.section-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    width: 100%;
    gap: 60px;
}

.section-inner.reverse {
    flex-direction: row-reverse;
}

.section-animation {
    flex: 0 0 380px;
    max-width: 380px;
}

.section-animation lottie-player {
    width: 100%;
    height: 380px;
}

.section-content {
    flex: 1;
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 52px;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.placeholder-msg {
    font-size: 18px;
    line-height: 1.8;
    margin: 10px 0;
    opacity: 0.85;
}

/* ===== DATA TOOLBAR ===== */
#data-toolbar {
    display: none !important; /* Hidden on all devices */
}

/* ===== SECTION TOP (Photos, etc.) ===== */
.section-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 40px;
}
.photos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    gap: 30px;
    margin-bottom: 40px;
}
.photos-header-text {
    flex: 1;
}
.section-animation-small {
    flex: 0 0 160px;
    width: 160px;
    height: 160px;
}
.section-animation-small lottie-player {
    width: 160px;
    height: 160px;
}
.section-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.section-deco {
    font-size: 36px;
}
.section-subtitle {
    font-size: 16px;
    opacity: 0.75;
    margin: 6px 0 0 0;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    align-items: center;
    justify-content: center;
    z-index: 6000;
    gap: 20px;
    padding: 20px;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
    background: none;
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    font-size: 36px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.15); }
.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80vw;
    max-height: 85vh;
}
.lightbox-img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.lightbox-caption {
    font-family: 'Dancing Script', cursive;
    color: #f8bbd0;
    font-size: 22px;
    margin-top: 14px;
    text-align: center;
}

/* ===== SHOW MORE BUTTON ===== */
.show-more-btn {
    display: block;
    margin: 20px auto 0;
    background: none;
    border: 2px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 10px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.show-more-btn:hover {
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}
/* On light backgrounds */
.photos-section .show-more-btn,
.travel-section .show-more-btn {
    border-color: rgba(194,24,91,0.3);
    color: #c2185b;
}
.photos-section .show-more-btn:hover,
.travel-section .show-more-btn:hover {
    border-color: #c2185b;
}

/* ===== ADD BUTTON ===== */
.add-btn {
    display: block;
    margin: 30px auto 0;
    padding: 14px 40px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(233,30,99,0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}
.add-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(233,30,99,0.45);
}

/* ===== POLAROID GRID ===== */
.photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
    padding: 10px 0;
}
.polaroid {
    background: #fff;
    padding: 12px 12px 40px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
    width: 200px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: default;
    position: relative;
}
.polaroid:hover {
    transform: rotate(0deg) translateY(-6px) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,0.22);
}
.polaroid-img-area {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.polaroid-img-area img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f9f9f9;
}
.polaroid-caption {
    font-family: 'Dancing Script', cursive;
    font-size: 17px;
    color: #5d4037;
    text-align: center;
    padding-top: 10px;
    min-height: 28px;
}
.polaroid-placeholder {
    opacity: 0.5;
}
.polaroid-placeholder .polaroid-img-area {
    background: #fce4ec;
    border: 2px dashed #f48fb1;
    flex-direction: column;
    gap: 8px;
}
.ph-icon { font-size: 32px; }
.ph-label { font-size: 13px; color: #c2185b; margin: 0; }
.delete-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(194,24,91,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.polaroid:hover .delete-btn { display: flex; }

/* ===== MODAL ===== */
.modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0,0,0,0.85) !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    backdrop-filter: blur(8px) !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-y: auto !important;
}

.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure modals escape any parent constraints */
body > *:not(.modal-overlay) {
    isolation: auto !important;
}

#photo-modal,
#journal-modal,
#bucket-modal,
#fav-modal,
#topic-modal,
#chapter-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
}

#photo-modal[style*="display: flex"],
#journal-modal[style*="display: flex"],
#bucket-modal[style*="display: flex"],
#fav-modal[style*="display: flex"],
#topic-modal[style*="display: flex"],
#chapter-modal[style*="display: flex"] {
    display: flex !important;
}
.modal-box {
    background: #fff !important;
    border-radius: 20px;
    padding: 36px;
    width: 90%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: relative !important;
    z-index: 1000000 !important;
    pointer-events: auto !important;
}
.modal-title {
    font-family: 'Dancing Script', cursive;
    font-size: 30px;
    color: #c2185b;
    margin: 0 0 20px 0;
}
.file-upload-area {
    border: 2px dashed #f48fb1;
    border-radius: 12px;
    padding: 28px 20px;
    cursor: pointer;
    color: #c2185b;
    background: #fff0f3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.file-upload-area:hover { background: #fce4ec; }
.upload-icon { font-size: 28px; }
.file-upload-area input[type="file"] { display: none; }
.photo-preview {
    display: none;
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 14px;
}
.modal-input {
    width: 100%;
    margin-top: 14px;
    padding: 12px 16px;
    border: 2px solid #f8bbd0;
    border-radius: 50px;
    font-size: 15px;
    font-family: 'Dancing Script', cursive;
    color: #5d4037;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.modal-input:focus { border-color: #e91e63; }
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.btn-save {
    padding: 12px 36px;
    background: linear-gradient(135deg, #e91e63, #c2185b);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(233,30,99,0.3);
    transition: transform 0.2s;
}
.btn-save:hover { transform: translateY(-2px); }
.btn-cancel {
    padding: 12px 36px;
    background: #f5f5f5;
    color: #888;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-cancel:hover { background: #ececec; }

/* Section 1: Our Photos */
.photos-section {
    background: linear-gradient(135deg, #fff0f3 0%, #fce4ec 100%);
    flex-direction: column;
    padding-bottom: 60px;
}
.photos-section .section-title { color: #c2185b; }
.photos-section .section-subtitle { color: #5d4037; }

/* Section 2: Travel Journal */
.travel-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffd54f 60%, #ffab76 100%);
    flex-direction: column;
    padding-bottom: 60px;
}
.travel-section .section-title { color: #bf360c; }
.travel-header {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 40px;
}
.travel-header-text { flex: 1; }

/* Journal grid */
.journal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1000px;
}
.journal-card {
    background: #fffdf5;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}
.journal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.journal-card-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.journal-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.journal-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.journal-location {
    font-weight: 600;
    font-size: 15px;
    color: #bf360c;
}
.journal-date {
    font-size: 12px;
    color: #a1887f;
    font-style: italic;
}
.journal-story {
    font-family: 'Dancing Script', cursive;
    font-size: 17px;
    color: #4e342e;
    margin: 6px 0 0;
    line-height: 1.6;
}
.journal-delete {
    background: none;
    border: none;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}
.journal-delete:hover { color: #e91e63; }
.journal-placeholder {
    border: 2px dashed #ffa726;
    background: rgba(255,255,255,0.5);
    box-shadow: none;
}
.journal-placeholder .journal-location { color: #ffa726; }
.journal-placeholder .journal-story { color: #bcaaa4; }

/* Story truncation in card */
.journal-story-truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Journal Entry Viewer */
.journal-viewer-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.75);
    align-items: center;
    justify-content: center;
    z-index: 6000;
    padding: 20px;
    backdrop-filter: blur(6px);
}
.journal-viewer-box {
    background: #fffdf5;
    border-radius: 20px;
    max-width: 680px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.4);
    position: relative;
}
.journal-viewer-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #a1887f;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
    transition: color 0.2s;
}
.journal-viewer-close:hover { color: #bf360c; }
.journal-viewer-photo-wrap {
    width: 100%;
    max-height: 340px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}
.journal-viewer-photo {
    width: 100%;
    height: 340px;
    object-fit: cover;
}
.journal-viewer-body {
    padding: 32px 36px 36px;
}
.journal-viewer-date {
    font-size: 13px;
    color: #a1887f;
    font-style: italic;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
}
.journal-viewer-location {
    font-size: 26px;
    font-family: 'Dancing Script', cursive;
    color: #bf360c;
    margin: 0 0 16px;
}
.journal-viewer-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ffa726, #ff7043);
    border-radius: 2px;
    margin-bottom: 20px;
}
.journal-viewer-story {
    font-family: 'Dancing Script', cursive;
    font-size: 20px;
    color: #4e342e;
    line-height: 1.8;
    margin: 0;
    white-space: pre-wrap;
}

/* Textarea in modal */
.modal-textarea {
    border-radius: 14px !important;
    resize: vertical;
    min-height: 100px;
    padding: 12px 16px !important;
    font-family: 'Dancing Script', cursive !important;
    font-size: 17px !important;
}

/* Section 3: Bucket List */
.bucket-section {
    background: linear-gradient(135deg, #0d0221 0%, #1a0a2e 50%, #2a1240 100%);
    flex-direction: column;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}
.bucket-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, #ffffff 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.06;
    pointer-events: none;
}
.bucket-section .section-title { color: #e91e63; }
.bucket-section .section-subtitle { color: #ce93d8; }
.bucket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    gap: 30px;
    margin-bottom: 40px;
}
.bucket-header-text { flex: 1; }
.bucket-add-btn {
    background: linear-gradient(135deg, #9c27b0, #e91e63) !important;
    box-shadow: 0 4px 20px rgba(233,30,99,0.4) !important;
}

/* Bucket list items */
.bucket-list {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bucket-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 14px 20px;
    transition: background 0.3s, transform 0.2s;
}
.bucket-item:hover { background: rgba(255,255,255,0.11); transform: translateX(4px); }
.bucket-done { opacity: 0.55; }
.bucket-done .bucket-wish { text-decoration: line-through; }
.bucket-check {
    background: none;
    border: 2px solid #ce93d8;
    color: #ce93d8;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bucket-done .bucket-check { background: #9c27b0; border-color: #9c27b0; color: #fff; }
.bucket-wish {
    flex: 1;
    color: #f3e5f5;
    font-size: 17px;
}
.bucket-delete {
    background: none;
    border: none;
    color: rgba(255,255,255,0.2);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 0 4px;
}
.bucket-delete:hover { color: #e91e63; }
.bucket-placeholder {
    opacity: 0.35;
    pointer-events: none;
}
.placeholder-check { pointer-events: none; }

/* Section 6: Our Book */
.book-section {
    background: linear-gradient(135deg, #1a0a2e 0%, #4a1942 50%, #6d1f3e 100%);
    flex-direction: column;
    padding-bottom: 80px;
}
.book-section .section-title { color: #f8bbd0; }
.book-section .section-subtitle { color: #e0b0c0; }
.book-header {
    display: flex;
    align-items: center;
    gap: 30px;
    width: 100%;
    max-width: 900px;
    margin-bottom: 50px;
}
.book-header-text { flex: 1; }

/* Chapter cards */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: 900px;
}
.chapter-card {
    background: linear-gradient(160deg, #fffdf5 0%, #fdf6e3 100%);
    border-radius: 16px;
    padding: 36px 28px 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.chapter-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e91e63, #9c27b0);
}
.chapter-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.chapter-num {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: #c2185b;
    font-style: italic;
    line-height: 1;
    margin-bottom: 4px;
}
.chapter-ornament {
    color: #e91e63;
    font-size: 14px;
    letter-spacing: 6px;
    margin-bottom: 10px;
}
.chapter-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: #4a1942;
    margin: 0 0 14px;
}
.chapter-divider {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #e91e63, #9c27b0);
    border-radius: 1px;
    margin: 0 auto 16px;
}
.chapter-excerpt {
    font-family: 'Dancing Script', cursive;
    font-size: 17px;
    color: #6d4c41;
    line-height: 1.6;
    margin: 0 0 16px;
}
.chapter-read-link {
    display: inline-block;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    color: #c2185b;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}
.chapter-read-link:hover { color: #880e4f; text-decoration: underline; }
.chapter-delete {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: rgba(0,0,0,0.18);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    display: none;
    transition: color 0.2s;
}
.chapter-card:hover .chapter-delete { display: block; }
.chapter-delete:hover { color: #e91e63; }
.chapter-placeholder {
    opacity: 0.55;
    cursor: default;
}
.book-add-btn {
    background: linear-gradient(135deg, #6a1b9a, #c2185b) !important;
    box-shadow: 0 4px 20px rgba(106,27,154,0.35) !important;
}

/* Section 4: Favourites */
.fav-section {
    background: linear-gradient(135deg, #ff6b9d 0%, #c2185b 50%, #ff5252 100%);
    flex-direction: column;
    padding-bottom: 60px;
}
.fav-section .section-title { color: #fff; }
.fav-section .section-subtitle { color: rgba(255,255,255,0.85); }
.fav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    gap: 30px;
    margin-bottom: 30px;
}
.fav-header-text { flex: 1; }
.fav-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}
.fav-tab {
    padding: 10px 28px;
    border: 2px solid rgba(255,255,255,0.5);
    background: transparent;
    color: rgba(255,255,255,0.85);
    border-radius: 50px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.fav-tab.active {
    background: #fff;
    color: #c2185b;
    border-color: #fff;
    font-weight: 600;
}
.fav-tab:not(.active):hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.7);
    color: #fff;
}
.fav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 10px;
}
.fav-grid > .show-more-btn { grid-column: 1 / -1; }
.fav-card {
    background: rgba(255,255,255,0.93);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}
.fav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.fav-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.fav-cat-badge {
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 600;
}
.fav-cat-badge.cat-movie { background: #fce4ec; color: #c2185b; }
.fav-cat-badge.cat-webseries { background: #f3e5f5; color: #7b1fa2; }
.fav-cat-badge.cat-song { background: #fff3e0; color: #e65100; }
.fav-cat-badge.cat-youtube { background: #ffebee; color: #c62828; }
.fav-cat-badge.cat-other { background: #e8f5e9; color: #2e7d32; }
.fav-card-title {
    font-family: 'Dancing Script', cursive;
    font-size: 20px;
    color: #3e2723;
    margin: 0 0 6px;
}
.fav-card-notes {
    font-size: 13px;
    color: #757575;
    margin: 0 0 8px;
    line-height: 1.5;
}
.fav-card-link {
    font-size: 12px;
    color: #c2185b;
    text-decoration: none;
    font-weight: 500;
}
.fav-card-link:hover { text-decoration: underline; }
.fav-delete {
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.fav-delete:hover { color: #e91e63; }
.fav-placeholder {
    opacity: 0.5;
    pointer-events: none;
    border: 2px dashed rgba(194,24,91,0.3);
    background: rgba(255,255,255,0.6) !important;
}
.fav-section .show-more-btn {
    border-color: rgba(255,255,255,0.4);
    color: rgba(255,255,255,0.9);
}
.fav-section .show-more-btn:hover {
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}
/* Fav modal extras */
.fav-type-toggle {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}
.fav-type-btn {
    padding: 8px 20px;
    border: 2px solid #f48fb1;
    background: transparent;
    color: #c2185b;
    border-radius: 50px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.fav-type-btn.active {
    background: #e91e63;
    color: #fff;
    border-color: #e91e63;
}
.fav-cat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 6px;
}
.fav-cat-btn {
    padding: 6px 14px;
    border: 2px solid #f8bbd0;
    background: transparent;
    color: #c2185b;
    border-radius: 50px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.fav-cat-btn.active {
    background: #fce4ec;
    border-color: #e91e63;
}
.fav-card-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
    display: block;
}
.fav-modal-thumb {
    width: 100%;
    max-height: 150px;
    object-fit: cover;
    border-radius: 10px;
    margin-top: 10px;
    display: block;
}

/* Section 5: Topics to Talk About */
.topics-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #f3e5f5 50%, #fce4ec 100%);
    flex-direction: column;
    padding-bottom: 60px;
}
.topics-section .section-title { color: #880e4f; }
.topics-section .section-subtitle { color: #6a1b9a; opacity: 0.75; }
.topics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
    gap: 30px;
    margin-bottom: 40px;
}
.topics-header-text { flex: 1; }
.topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
}
.topic-card {
    width: 190px;
    min-height: 150px;
    border-radius: 2px;
    padding: 18px 18px 28px;
    box-shadow: 3px 4px 14px rgba(0,0,0,0.13);
    position: relative;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.topic-card:hover {
    transform: translateY(-5px) rotate(0deg) !important;
    box-shadow: 5px 8px 22px rgba(0,0,0,0.18);
}
.topic-card:nth-child(5n+1) { background: #fff9c4; transform: rotate(-1.5deg); }
.topic-card:nth-child(5n+2) { background: #f8bbd0; transform: rotate(1.2deg); }
.topic-card:nth-child(5n+3) { background: #b3e5fc; transform: rotate(-0.8deg); }
.topic-card:nth-child(5n+4) { background: #c8e6c9; transform: rotate(1.8deg); }
.topic-card:nth-child(5n+5) { background: #e1bee7; transform: rotate(-1deg); }
.topic-card-top {
    display: flex;
    justify-content: flex-end;
}
.topic-delete {
    background: none;
    border: none;
    color: rgba(0,0,0,0.25);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.topic-delete:hover { color: #e91e63; }
.topic-text {
    font-family: 'Dancing Script', cursive;
    font-size: 18px;
    color: #3e2723;
    line-height: 1.55;
    margin: 6px 0 10px;
    flex: 1;
    word-break: break-word;
}
.topic-discussed-btn {
    background: none;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 50px;
    font-size: 11px;
    font-family: 'Poppins', sans-serif;
    color: rgba(0,0,0,0.45);
    padding: 4px 10px;
    cursor: pointer;
    align-self: flex-start;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.topic-discussed-btn:hover {
    border-color: rgba(0,0,0,0.4);
    color: rgba(0,0,0,0.6);
}
.topic-card.topic-done {
    opacity: 0.5;
}
.topic-card.topic-done .topic-text {
    text-decoration: line-through;
}
.topic-card.topic-done .topic-discussed-btn {
    background: rgba(0,0,0,0.12);
    border-color: transparent;
}
.topic-who-badge {
    font-size: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}
.topic-who-badge.who-amarsh { background: #bbdefb; color: #0d47a1; }
.topic-who-badge.who-ashwani { background: #fce4ec; color: #880e4f; }
.topic-who-badge.who-both { background: #ede7f6; color: #4a148c; }
/* Who toggle in modal */
.topic-who-toggle {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}
.topic-who-btn {
    padding: 7px 18px;
    border: 2px solid #f8bbd0;
    background: transparent;
    color: #c2185b;
    border-radius: 50px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.topic-who-btn.active {
    background: #e91e63;
    color: #fff;
    border-color: #e91e63;
}
.topic-placeholder {
    opacity: 0.45;
    pointer-events: none;
    border: 2px dashed rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.6) !important;
}
.topics-section .show-more-btn {
    border-color: rgba(136,14,79,0.25);
    color: #880e4f;
}
.topics-section .show-more-btn:hover {
    border-color: #880e4f;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 1120px) {
    #wrap { width: 100%; max-width: 100%; }
    #canvas { width: 100%; max-width: 100%; }

    /* HIDE DESKTOP HERO ON TABLETS TOO */
    #main {
        display: none !important;
    }

    #main * {
        display: none !important;
    }

    #wrap, #text, #code, #clock-box, #clock, #canvas {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide desktop letter modal on tablets/mobile */
    .desktop-letter-modal {
        display: none !important;
    }

    .desktop-read-more-btn {
        display: none !important;
    }

    #mobile-hero {
        display: block !important;
        position: relative;
        min-height: 100vh;
        height: 100vh;
        width: 100%;
        background: linear-gradient(135deg, #fff0f3 0%, #fce4ec 50%, #ffe4e1 100%);
        overflow: hidden;
        z-index: 1;
    }

    .mobile-hero-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0.6;
        pointer-events: none;
    }

    .mobile-hero-bg lottie-player {
        width: 100%;
        height: 100%;
    }

    .mobile-hero-content {
        position: relative;
        z-index: 10;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 60px 30px;
        text-align: center;
    }

    .mobile-hero-title {
        font-family: 'Playfair Display', serif;
        font-size: 42px;
        color: #c2185b;
        margin: 0 0 15px;
        line-height: 1.3;
        text-shadow: 0 2px 8px rgba(255,255,255,0.8);
    }

    .mobile-hero-subtitle {
        display: block;
        font-family: 'Dancing Script', cursive;
        font-size: 24px;
        color: #880e4f;
        margin-top: 10px;
        font-weight: 400;
    }

    .mobile-hero-letter-wrap {
        width: 250px;
        height: 250px;
        margin: 50px auto 40px;
        cursor: pointer;
        transition: transform 0.3s;
        filter: drop-shadow(0 8px 16px rgba(194,24,91,0.3));
    }

    .mobile-hero-letter-wrap:hover {
        transform: scale(1.05);
    }

    .mobile-hero-letter-wrap lottie-player {
        width: 250px;
        height: 250px;
    }

    .mobile-hero-hint {
        font-family: 'Dancing Script', cursive;
        font-size: 20px;
        color: #c2185b;
        margin-top: -10px;
        animation: pulse 2s ease-in-out infinite;
    }

    #mobile-clock-box {
        margin-top: 40px;
        padding: 25px;
        background: rgba(255,255,255,0.7);
        border-radius: 20px;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    .mobile-clock-label {
        font-family: 'Dancing Script', cursive;
        font-size: 22px;
        color: #c2185b;
        margin-bottom: 12px;
    }

    #mobile-clock {
        font-family: 'Poppins', sans-serif;
        font-size: 16px;
        color: #5d4037;
        line-height: 1.8;
    }

    #mobile-clock .digit {
        font-size: 32px;
        font-weight: 600;
        color: #c2185b;
    }

    /* Mobile letter modal for tablets */
    .mobile-letter-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.85);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 30px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        overflow-y: auto;
    }

    .mobile-letter-modal.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-letter-modal-content {
        position: relative;
        width: 100%;
        max-width: 500px;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-letter-close {
        position: absolute;
        top: -45px;
        right: 0;
        background: rgba(255,255,255,0.2);
        border: 2px solid rgba(255,255,255,0.5);
        color: #fff;
        font-size: 36px;
        width: 45px;
        height: 45px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        z-index: 10;
        transition: background 0.2s;
    }

    .mobile-letter-close:hover,
    .mobile-letter-close:active {
        background: rgba(255,255,255,0.3);
    }

    .mobile-letter-paper {
        background: linear-gradient(135deg, #fff9f0 0%, #fffbf5 100%);
        border-radius: 15px;
        padding: 35px 30px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        border: 1px solid rgba(194,24,91,0.2);
    }

    .mobile-letter-text {
        font-family: 'Poppins', sans-serif;
    }
}

@media (max-width: 768px) {
    /* Password wall */
    #password-box {
        padding: 50px 30px;
        border-radius: 25px;
    }
    .pw-heart { font-size: 60px; margin-bottom: 15px; }
    .pw-title { font-size: 36px; }
    .pw-subtitle { font-size: 15px; margin-bottom: 30px; }
    #pw-input { padding: 14px 20px; font-size: 15px; }
    #pw-submit { padding: 14px 50px; font-size: 16px; }

    /* HIDE DESKTOP HERO, SHOW MOBILE HERO */
    #main {
        display: none !important;
    }

    #main * {
        display: none !important;
    }

    #wrap, #text, #code, #clock-box, #clock, #canvas {
        display: none !important;
        visibility: hidden !important;
    }

    /* Hide desktop letter modal on tablets/mobile */
    .desktop-letter-modal {
        display: none !important;
    }

    .desktop-read-more-btn {
        display: none !important;
    }

    #mobile-hero {
        display: block !important;
        position: relative;
        min-height: 100vh;
        height: 100vh;
        width: 100%;
        background: linear-gradient(135deg, #fff0f3 0%, #fce4ec 50%, #ffe4e1 100%);
        overflow: hidden;
        z-index: 1;
    }

    .mobile-hero-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        opacity: 0.6;
        pointer-events: none;
    }

    .mobile-hero-bg lottie-player {
        width: 100% !important;
        height: 100% !important;
        position: absolute;
        top: 0;
        left: 0;
    }

    .mobile-hero-content {
        position: relative;
        z-index: 10;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 40px 20px;
        text-align: center;
    }

    .mobile-hero-title {
        font-family: 'Playfair Display', serif;
        font-size: 32px;
        color: #c2185b;
        margin: 0 0 10px;
        line-height: 1.3;
        text-shadow: 0 2px 8px rgba(255,255,255,0.8);
    }

    .mobile-hero-subtitle {
        display: block;
        font-family: 'Dancing Script', cursive;
        font-size: 20px;
        color: #880e4f;
        margin-top: 8px;
        font-weight: 400;
    }

    .mobile-hero-letter-wrap {
        width: 200px;
        height: 200px;
        margin: 40px auto 30px;
        cursor: pointer;
        transition: transform 0.3s;
        filter: drop-shadow(0 8px 16px rgba(194,24,91,0.3));
    }

    .mobile-hero-letter-wrap:active {
        transform: scale(0.95);
    }

    .mobile-hero-letter-wrap lottie-player {
        width: 200px;
        height: 200px;
    }

    .mobile-hero-hint {
        font-family: 'Dancing Script', cursive;
        font-size: 18px;
        color: #c2185b;
        margin-top: -10px;
        animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
        0%, 100% { opacity: 0.7; transform: translateY(0); }
        50% { opacity: 1; transform: translateY(-4px); }
    }

    #mobile-clock-box {
        margin-top: 30px;
        padding: 20px;
        background: rgba(255,255,255,0.7);
        border-radius: 20px;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }

    .mobile-clock-label {
        font-family: 'Dancing Script', cursive;
        font-size: 20px;
        color: #c2185b;
        margin-bottom: 10px;
    }

    #mobile-clock {
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        color: #5d4037;
        line-height: 1.8;
    }

    #mobile-clock .digit {
        font-size: 28px;
        font-weight: 600;
        color: #c2185b;
    }

    /* MOBILE LETTER MODAL */
    .mobile-letter-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.85);
        z-index: 99999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        overflow-y: auto;
    }

    .mobile-letter-modal.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-letter-modal-content {
        position: relative;
        width: 100%;
        max-width: 400px;
        max-height: 90vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-letter-close {
        position: absolute;
        top: -40px;
        right: 0;
        background: rgba(255,255,255,0.2);
        border: 2px solid rgba(255,255,255,0.5);
        color: #fff;
        font-size: 32px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        z-index: 10;
        transition: background 0.2s;
    }

    .mobile-letter-close:active {
        background: rgba(255,255,255,0.3);
    }

    .mobile-letter-animation-wrap {
        animation: letterOpen 0.6s ease-out forwards;
        transform-origin: center;
    }

    @keyframes letterOpen {
        0% {
            transform: scale(0.3) rotateX(90deg);
            opacity: 0;
        }
        50% {
            transform: scale(0.7) rotateX(45deg);
            opacity: 0.8;
        }
        100% {
            transform: scale(1) rotateX(0deg);
            opacity: 1;
        }
    }

    .mobile-letter-paper {
        background: linear-gradient(135deg, #fffdf5 0%, #fdf6e3 100%);
        border-radius: 12px;
        padding: 30px 24px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
        border: 1px solid rgba(194,24,91,0.2);
    }

    .mobile-letter-text {
        font-family: 'Poppins', sans-serif;
    }

    .mobile-letter-text p {
        margin: 8px 0;
    }

    /* Sections */
    .love-section { padding: 60px 15px; min-height: auto; }
    .section-inner { flex-direction: column !important; gap: 30px; }
    .section-animation { flex: 0 0 200px; max-width: 200px; }
    .section-animation lottie-player { height: 200px; }
    .section-animation-small {
        width: 120px !important;
        height: 120px !important;
    }
    .section-animation-small lottie-player {
        width: 120px !important;
        height: 120px !important;
    }
    .section-title { font-size: 36px; }
    .section-subtitle { font-size: 14px; }
    .placeholder-msg { font-size: 15px; }
    .section-content { text-align: center; }
    .section-title-row {
        justify-content: center;
        flex-wrap: wrap;
    }
    .section-deco { font-size: 32px; }

    /* Photos */
    .photos-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    .photos-header-text {
        text-align: center !important;
        width: 100%;
    }
    .photos-grid {
        gap: 20px;
        justify-content: center;
    }
    .polaroid {
        width: 160px;
        padding: 10px 10px 34px;
    }
    .polaroid-img-area { height: 160px; }
    .polaroid-caption { font-size: 14px; }
    .add-btn {
        padding: 14px 40px;
        font-size: 16px;
        margin-top: 20px;
    }
    /* Lightbox */
    .lightbox-nav { width: 40px; height: 40px; font-size: 28px; }
    .lightbox-content { max-width: 90vw; }
    /* Travel journal */
    .travel-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    .travel-header-text {
        text-align: center !important;
        width: 100%;
    }
    .journal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .journal-card {
        margin: 0 auto;
        max-width: 400px;
    }
    .journal-viewer-body { padding: 24px 20px 28px; }
    .journal-viewer-story { font-size: 17px; }

    /* Bucket list */
    .bucket-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    .bucket-header-text {
        text-align: center !important;
        width: 100%;
    }
    .bucket-list {
        max-width: 100%;
        padding: 0 10px;
    }
    .bucket-item {
        padding: 12px 16px;
        gap: 12px;
    }
    .bucket-wish { font-size: 15px; }

    /* Favourites */
    .fav-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    .fav-header-text {
        text-align: center !important;
        width: 100%;
    }
    .fav-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 400px;
    }
    .fav-tabs {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .fav-tab {
        padding: 8px 20px;
        font-size: 14px;
    }

    /* Topics */
    .topics-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    .topics-header-text {
        text-align: center !important;
        width: 100%;
    }
    .topics-grid {
        gap: 16px;
        padding: 0 5px;
    }
    .topic-card {
        width: calc(50% - 8px);
        min-width: 150px;
        max-width: 180px;
        min-height: 140px;
        padding: 14px 14px 22px;
    }
    .topic-text { font-size: 15px; }
    .topic-discussed-btn { font-size: 10px; }

    /* Book */
    .book-header {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
    }
    .book-header-text {
        text-align: center !important;
        width: 100%;
    }
    .chapters-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
    }
    .chapter-card {
        padding: 30px 24px 28px;
    }

    /* Modal */
    .modal-box {
        padding: 28px 20px;
        max-width: 90%;
    }
    .modal-title { font-size: 26px; margin-bottom: 18px; }
    .modal-input {
        font-size: 15px;
        padding: 12px 16px;
    }
    .modal-textarea {
        min-height: 120px;
        font-size: 16px !important;
    }
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-save, .btn-cancel {
        width: 100%;
        padding: 14px 36px;
        font-size: 16px;
    }
    .file-upload-area {
        padding: 24px 16px;
    }
    .fav-type-toggle, .topic-who-toggle, .fav-cat-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Data toolbar - HIDDEN on mobile */
    #data-toolbar {
        display: none !important;
    }

    /* Music player - on mobile */
    #music-player-control {
        top: 15px;
        right: 15px;
        width: 90px;
        height: 90px;
    }

    .music-player-animation {
        width: 90px;
        height: 90px;
    }

    .music-player-animation lottie-player {
        width: 90px;
        height: 90px;
    }

    .music-toggle-btn {
        width: 36px;
        height: 36px;
    }

    .music-icon {
        font-size: 16px;
    }

    /* Show more buttons */
    .show-more-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Password wall */
    #password-box { padding: 40px 24px; }
    .pw-heart { font-size: 50px; }
    .pw-title { font-size: 30px; }
    .pw-subtitle { font-size: 14px; }
    #pw-input { padding: 12px 18px; font-size: 14px; }
    #pw-submit { padding: 12px 40px; font-size: 15px; }

    /* Mobile Hero adjustments for small screens */
    .mobile-hero-title { font-size: 28px; }
    .mobile-hero-subtitle { font-size: 18px; }
    .mobile-hero-letter-wrap {
        width: 160px;
        height: 160px;
        margin: 30px auto 20px;
    }
    .mobile-hero-letter-wrap lottie-player {
        width: 160px;
        height: 160px;
    }
    .mobile-hero-hint { font-size: 16px; }
    #mobile-clock .digit { font-size: 24px; }

    /* Sections */
    .love-section { padding: 50px 12px; }
    .section-title { font-size: 28px; }
    .section-subtitle { font-size: 13px; }
    .section-deco { font-size: 26px; }
    .section-animation-small {
        width: 100px !important;
        height: 100px !important;
    }
    .section-animation-small lottie-player {
        width: 100px !important;
        height: 100px !important;
    }

    /* Photos */
    .polaroid { width: 140px; padding: 8px 8px 30px; }
    .polaroid-img-area { height: 140px; }
    .photos-grid { gap: 14px; }
    .ph-icon { font-size: 24px; }
    .ph-label { font-size: 11px; }

    /* Favourites */
    .fav-grid { grid-template-columns: 1fr; }
    .fav-tab { padding: 8px 16px; font-size: 13px; }

    /* Topics */
    .topic-card {
        width: calc(50% - 8px);
        min-width: 140px;
        max-width: 160px;
        padding: 12px 12px 18px;
    }
    .topic-text { font-size: 14px; }

    /* Bucket */
    .bucket-item {
        padding: 10px 14px;
        font-size: 14px;
    }
    .bucket-wish { font-size: 14px; }

    /* Book */
    .chapter-num { font-size: 36px; }
    .chapter-title { font-size: 18px; }
    .chapter-excerpt { font-size: 15px; }

    /* Modal */
    .modal-title { font-size: 22px; }
    .modal-input { font-size: 14px; }
    .btn-save, .btn-cancel { font-size: 15px; padding: 12px 30px; }

    /* Add buttons */
    .add-btn { padding: 12px 32px; font-size: 15px; }

    /* Music player - on tiny screens */
    #music-player-control {
        top: 12px;
        right: 12px;
        width: 75px;
        height: 75px;
    }

    .music-player-animation {
        width: 75px;
        height: 75px;
    }

    .music-player-animation lottie-player {
        width: 75px;
        height: 75px;
    }

    .music-toggle-btn {
        width: 32px;
        height: 32px;
    }

    .music-icon {
        font-size: 14px;
    }
}
