:root {
    --burgundy: #4A0E17;
    --burgundy-dark: #2B070D;
    --burgundy-card: #52141D;
    --cream: #FFF7F0;
    --cream-light: #FFFCF9;
    --rose-accent: #C84B5B;
    --rose-soft: #FDE8EC;
    --rose-deep: #962838;
    --gold: #D4AF37;
    --gold-light: #F4E8C1;
    --text-dark: #3E1017;
    --text-muted: #7A353F;
    --soft-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    --card-shadow: 0 8px 24px rgba(66, 11, 19, 0.25);
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: #3B0A11;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(200, 75, 91, 0.15), transparent 70%),
        radial-gradient(circle at 80% 80%, rgba(74, 14, 23, 0.4), transparent 60%);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    overflow-y: auto;
}

/* =========================================
   FLOATING HEARTS BACKGROUND
========================================= */
#heart-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    bottom: -30px;
    color: rgba(200, 75, 91, 0.25);
    animation: floatUp 7s linear infinite;
    pointer-events: none;
    user-select: none;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
    15% { opacity: 0.8; }
    85% { opacity: 0.8; }
    100% { transform: translateY(-105vh) rotate(360deg) scale(1.2); opacity: 0; }
}

/* =========================================
   PERSISTENT FLOATING MUSIC BAR
========================================= */
.global-music-bar {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 100;
    animation: fadeIn 0.4s ease;
}

.floating-music-btn {
    background: rgba(82, 20, 29, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid rgba(248, 215, 218, 0.4);
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #FFF4EA;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, background 0.2s;
}

.floating-music-btn:active {
    transform: scale(0.95);
}

.mini-equalizer {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.mini-equalizer span {
    width: 2.5px;
    height: 3px;
    background: #FFF4EA;
    border-radius: 1px;
}

.mini-equalizer.playing span:nth-child(1) { animation: jump 0.5s infinite alternate; }
.mini-equalizer.playing span:nth-child(2) { animation: jump 0.4s infinite alternate 0.15s; }
.mini-equalizer.playing span:nth-child(3) { animation: jump 0.6s infinite alternate 0.3s; }

/* =========================================
   VIEWPORT & SECTION CONTAINERS
========================================= */
.card-viewport {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 12px;
}

section {
    width: 100%;
    max-width: 820px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.active-screen {
    display: flex !important;
    animation: scaleIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hidden-screen {
    display: none !important;
}

/* =========================================
   1. KEYPAD & DUAL AVATAR PASSCODE SCREEN
========================================= */
.vintage-frame {
    background: #50131B;
    background-image: 
        radial-gradient(#6B1A24 1.5px, transparent 1.5px),
        linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    background-size: 18px 18px, 100% 100%;
    border: 3px solid #842634;
    border-radius: 28px;
    box-shadow: var(--soft-shadow);
    padding: clamp(24px, 5vw, 36px) clamp(20px, 4vw, 42px);
    width: 100%;
}

.keypad-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 5vw, 45px);
}

.heart-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.duo-avatar-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.avatar-circle {
    width: clamp(85px, 18vw, 110px);
    height: clamp(85px, 18vw, 110px);
    border-radius: 50%;
    border: 3px solid #FFF4EA;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    background: #420B13;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-heart-connector {
    font-size: 24px;
    z-index: 2;
}

.pulse-heart {
    display: inline-block;
    animation: heartbeat 1.3s ease infinite;
}

.avatar-names {
    color: #F8D7DA;
    font-family: 'Dancing Script', cursive;
    font-size: 20px;
    letter-spacing: 1px;
}

.keypad-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    width: 100%;
}

.subtitle-script {
    color: #FFF4EA;
    font-family: 'Dancing Script', 'Playfair Display', cursive, serif;
    font-size: clamp(22px, 5vw, 26px);
    text-align: center;
    margin-bottom: 2px;
    line-height: 1.2;
}

.passcode-hint {
    color: #E29578;
    font-size: 11.5px;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
}

.passcode-slots {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.passcode-slots .box {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FFF;
    font-size: 22px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.passcode-slots .box.filled {
    background: #FFF4EA;
    border-color: #FFF4EA;
    color: var(--burgundy);
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(255, 244, 234, 0.5);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 220px;
}

.key-btn {
    height: 52px;
    background: #FFF4EA;
    border: none;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 600;
    color: var(--burgundy);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.12s, background 0.12s;
    touch-action: manipulation;
}

.key-btn:active {
    transform: scale(0.92);
    background: #FCE8EC;
}

.key-btn.icon-btn {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.key-btn.unlock-key {
    background: var(--rose-accent);
    color: white;
    font-size: 10px;
}

/* =========================================
   2. ERROR SCREEN MODAL
========================================= */
.error-modal {
    background: #FFF4EA;
    border: 3px solid #F8D7DA;
    padding: 32px 24px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--soft-shadow);
    max-width: 400px;
    width: 90%;
    animation: shake 0.4s ease-in-out;
}

.error-badge {
    font-weight: 700;
    color: #B31312;
    letter-spacing: 1px;
    font-size: 18px;
    margin-bottom: 14px;
}

.meme-container {
    margin: 12px auto 18px;
    width: 140px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.meme-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.error-text {
    font-size: 13.5px;
    color: #6C4A4A;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* =========================================
   3. GIFT SCREEN
========================================= */
.lace-banner {
    background: #50131B;
    border: 3px dashed #F8D7DA;
    border-radius: var(--border-radius-lg);
    padding: clamp(30px, 6vw, 45px) clamp(20px, 4vw, 35px);
    text-align: center;
    max-width: 580px;
    width: 95%;
    box-shadow: var(--soft-shadow);
}

.love-subtitle-tag {
    color: #E29578;
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.banner-title {
    font-family: 'Dancing Script', 'Playfair Display', cursive, serif;
    color: #FFF4EA;
    font-size: clamp(28px, 6vw, 38px);
    margin-bottom: 18px;
    line-height: 1.3;
}

.gift-box-wrapper {
    cursor: pointer;
    margin: 20px auto;
    display: inline-block;
    position: relative;
}

.gift-animated {
    font-size: clamp(75px, 15vw, 95px);
    animation: bounce 1.5s infinite;
    display: inline-block;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,0.4));
}

.sparkle-ring {
    font-size: 16px;
    margin-top: 4px;
}

.click-tag {
    color: #F8D7DA;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

/* =========================================
   4. GINGHAM SCRAPBOOK GREETING CARD
========================================= */
.gingham-card {
    background: repeating-linear-gradient(45deg, #7A1C28, #7A1C28 15px, #8A2331 15px, #8A2331 30px);
    padding: clamp(12px, 3vw, 20px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--soft-shadow);
    max-width: 720px;
    width: 95%;
}

.scallop-inner {
    background: var(--cream);
    padding: clamp(32px, 6vw, 50px) clamp(20px, 4vw, 40px);
    border-radius: 18px;
    text-align: center;
    border: 2px dashed rgba(200, 75, 91, 0.3);
}

.script-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(26px, 6.5vw, 44px);
    color: var(--burgundy);
    font-style: italic;
    font-weight: 700;
    margin-bottom: 8px;
}

.tagline {
    font-size: clamp(13.5px, 3.2vw, 15px);
    color: #6C4A4A;
    margin-top: 8px;
    line-height: 1.6;
}

.divider {
    color: var(--rose-accent);
    margin: 18px 0;
    font-size: 13px;
    letter-spacing: 6px;
}

.sub-quote {
    font-family: 'Dancing Script', cursive;
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* =========================================
   5. SPLIT CALENDAR CARD
========================================= */
.split-scrapbook-card {
    background: var(--cream);
    border-radius: var(--border-radius-lg);
    display: flex;
    max-width: 760px;
    width: 95%;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
}

.photo-side {
    flex: 1.1;
    background: #842634;
    padding: clamp(18px, 4vw, 25px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.calendar-preview-wrap {
    width: 100%;
    max-width: 240px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.calendar-img-full {
    width: 100%;
    height: auto;
    display: block;
}

.stamp-badge {
    background: var(--cream);
    padding: 12px;
    border-radius: 12px;
    width: 100%;
    font-size: 10.5px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.mini-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-top: 6px;
    font-size: 9.5px;
}

.cal-highlight {
    background: var(--rose-accent);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    box-shadow: 0 0 6px rgba(200, 75, 91, 0.6);
}

.text-side {
    flex: 1.2;
    padding: clamp(24px, 5vw, 40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.title-official {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 5vw, 30px);
    line-height: 1.2;
}

.title-official span {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(32px, 6vw, 40px);
    color: var(--rose-accent);
}

.date-badge {
    margin-top: 12px;
    background: #FCE8EC;
    color: var(--burgundy);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 1px;
}

.story-snippet {
    font-size: 13.5px;
    color: #6C4A4A;
    margin: 14px 0 10px;
    line-height: 1.6;
}

/* =========================================
   6. MAP & DISTANCE PHOTO FRAME
========================================= */
.map-board {
    max-width: 800px;
}

.distance-badge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.location-pill {
    background: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.distance-pill {
    background: var(--rose-accent);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13.5px;
    letter-spacing: 0.5px;
}

.map-photo-frame {
    width: 100%;
    max-height: 360px;
    background: #FFF;
    padding: 8px;
    border-radius: 18px;
    border: 3px solid #E8D0C5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    margin: 8px 0 16px 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

/* =========================================
   7. FIRSTS & PHONE MOCKUPS
========================================= */
.scrapbook-board, .garland-board {
    background: var(--cream);
    border: 3px solid #E8D0C5;
    border-radius: var(--border-radius-lg);
    padding: clamp(24px, 4vw, 35px) clamp(16px, 3vw, 25px);
    max-width: 800px;
    width: 95%;
    text-align: center;
    box-shadow: var(--soft-shadow);
}

.cursive-header {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(30px, 6vw, 38px);
    color: var(--burgundy);
    margin-bottom: 4px;
}

.vintage-quote {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(17px, 3.8vw, 20px);
    color: var(--text-muted);
    margin-bottom: 14px;
}

.heart-frames-grid {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 18px 0;
    flex-wrap: wrap;
}

.firsts-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s;
}

.firsts-card:hover {
    transform: translateY(-6px);
}

.phone-mockup {
    width: 130px;
    height: 190px;
    background: #201316;
    border-radius: 20px;
    padding: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    border: 2px solid #5C323A;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.phone-inner-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #FFF4EA, #FCE8EC);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    text-align: center;
}

.phone-inner-card.call-theme {
    background: linear-gradient(145deg, #1C3B2B, #2E5A44);
    color: #FFF;
}

.phone-inner-card.movie-theme {
    background: linear-gradient(145deg, #2D1A3B, #49285E);
    color: #FFF;
}

.card-icon {
    font-size: 26px;
    margin-bottom: 4px;
}

.card-mini-text {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-date-tag {
    font-size: 9.5px;
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 8px;
}

.firsts-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--burgundy);
}

/* =========================================
   8. MEMORY TIMELINE CARDS
========================================= */
.wide-board {
    max-width: 840px;
}

.vintage-subtitle {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 5vw, 26px);
    color: var(--burgundy);
    margin-bottom: 4px;
}

.memory-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.story-card {
    background: white;
    padding: 18px 16px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(200, 75, 91, 0.15);
    transition: transform 0.2s;
}

.story-card:hover {
    transform: translateY(-4px);
}

.story-card.highlight-card {
    border: 2px dashed var(--rose-accent);
    background: #FFF9FA;
}

.story-badge {
    background: #FCE8EC;
    color: var(--rose-accent);
    font-weight: 700;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    align-self: flex-start;
}

.story-badge.highlight-badge {
    background: var(--rose-accent);
    color: white;
}

.story-card h3 {
    font-size: 15.5px;
    color: var(--burgundy);
}

.story-decor-icon {
    font-size: 20px;
}

.story-card p {
    font-size: 12.5px;
    line-height: 1.55;
    color: #553338;
}

.story-card.clickable-chapter {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.story-card.clickable-chapter:active {
    transform: scale(0.97);
}

.read-hint-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--rose-accent);
    background: #FFF4EA;
    padding: 4px 10px;
    border-radius: 10px;
    margin-top: 4px;
    display: inline-block;
    align-self: flex-start;
    border: 1px solid rgba(200, 75, 91, 0.2);
    transition: all 0.2s;
}

.read-hint-tag.highlight {
    background: #FCE8EC;
    color: var(--burgundy);
}

.story-card:hover .read-hint-tag {
    background: var(--rose-accent);
    color: white;
}

/* =========================================
   8.1 INDIVIDUAL CHAPTER DETAIL SCREENS
========================================= */
.chapter-board {
    max-width: 580px;
    width: 95%;
    margin: 0 auto;
}

.chapter-board.highlight-board {
    border: 3px dashed var(--rose-accent);
    background: linear-gradient(180deg, #FFF9FA 0%, var(--cream) 100%);
}

.chapter-badge {
    display: inline-block;
    background: #FCE8EC;
    color: var(--rose-accent);
    font-weight: 700;
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 14px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.chapter-badge.highlight-badge {
    background: var(--rose-accent);
    color: white;
}

.chapter-detail-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(24px, 5vw, 28px);
    color: var(--burgundy);
    margin-bottom: 6px;
}

.chapter-decor-banner {
    font-size: 24px;
    margin: 10px 0;
    letter-spacing: 6px;
}

.chapter-reading-card {
    background: white;
    border-radius: var(--border-radius-md);
    padding: clamp(18px, 4vw, 26px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(200, 75, 91, 0.15);
    margin: 14px 0 20px 0;
    text-align: left;
}

.chapter-quote {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(19px, 4.2vw, 22px);
    color: var(--rose-accent);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 3px solid var(--rose-accent);
}

.chapter-body-text {
    font-size: 14px;
    line-height: 1.7;
    color: #4A282D;
}

.nav-next-chapter {
    background: var(--rose-accent);
    color: white;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 25px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(200, 75, 91, 0.3);
    transition: transform 0.15s, background 0.15s;
}

.nav-next-chapter:active {
    transform: scale(0.94);
    background: var(--burgundy);
}

/* =========================================
   9. POLAROIDS & GARLAND
========================================= */
.garland-string {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.polaroid-pin {
    background: white;
    padding: 8px 8px 18px 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    border-radius: 4px;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 170px;
}

.polaroid-pin:hover {
    transform: scale(1.06) rotate(0deg) translateY(-6px) !important;
    z-index: 10;
}

.polaroid-frame-inner {
    width: 140px;
    height: 140px;
    background: #3B0A11;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.polaroid-frame-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.polaroid-frame-inner.quote-inner {
    background: linear-gradient(135deg, #FDE8EC, #FFF4EA);
    padding: 12px;
    text-align: center;
    flex-direction: column;
}

.quote-symbol {
    font-size: 24px;
    margin-bottom: 4px;
}

.inner-quote {
    font-size: 11.5px;
    font-style: italic;
    color: var(--burgundy);
    line-height: 1.4;
}

.pin-caption {
    display: block;
    font-size: 13.5px;
    margin-top: 8px;
    font-family: 'Dancing Script', cursive;
    color: var(--burgundy);
}

.pin {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
}

.rot-left { transform: rotate(-3.5deg); }
.rot-right { transform: rotate(4deg); }

/* =========================================
   10. RETRO LETTER & IPOD (CENTERED & SPACIOUS)
========================================= */
.letter-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    background: var(--cream);
    padding: clamp(24px, 5vw, 36px) clamp(20px, 4vw, 32px);
    border-radius: var(--border-radius-lg);
    max-width: 680px;
    width: 95%;
    box-shadow: var(--soft-shadow);
    text-align: center;
}

.letter-note {
    width: 100%;
    text-align: center;
    background: #FFFCF9;
    padding: clamp(22px, 4.5vw, 32px) clamp(18px, 4vw, 28px);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(212, 175, 55, 0.35);
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.06);
}

.letter-header-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.letter-header-row h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(20px, 4.5vw, 24px);
    color: var(--burgundy);
}

.wax-seal {
    font-size: 22px;
}

.scrolling-letter-body {
    font-size: 14px;
    line-height: 1.8;
    color: #4A1E24;
    max-width: 540px;
    margin: 0 auto;
    text-align: center;
}

.scrolling-letter-body p {
    margin-bottom: 12px;
}

.love-quote-note {
    font-family: 'Dancing Script', 'Playfair Display', cursive, serif;
    font-size: 20px;
    color: var(--rose-accent);
    font-weight: 700;
    margin: 14px 0 8px;
    text-align: center;
}

.sign-off {
    margin-top: 16px;
    font-family: 'Dancing Script', cursive;
    font-size: 22px;
    color: var(--burgundy);
}

.ipod-widget {
    background: #1C1C1E;
    border-radius: 24px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.15), 0 8px 24px rgba(0,0,0,0.35);
    width: 100%;
    max-width: 250px;
    margin: 4px auto 0;
}

.ipod-screen {
    background: #9DB49D;
    width: 100%;
    padding: 10px 8px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #333;
    color: #111;
}

.screen-header {
    display: flex;
    justify-content: space-between;
    font-size: 8.5px;
    font-weight: 700;
    border-bottom: 1px solid rgba(0,0,0,0.2);
    padding-bottom: 3px;
    margin-bottom: 6px;
}

.album-art-wrap {
    font-size: 32px;
    margin: 2px 0;
}

.spinning-disc {
    display: inline-block;
    animation: rotateDisc 4s linear infinite paused;
}

.equalizer.playing ~ .album-art-wrap .spinning-disc,
.playing .spinning-disc {
    animation-play-state: running;
}

@keyframes rotateDisc {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.song-title {
    font-size: 11.5px;
    font-weight: 700;
    color: #111;
}

.artist-title {
    font-size: 9.5px;
    color: #333;
    margin-bottom: 4px;
}

.equalizer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
    margin-top: 4px;
}

.equalizer .bar {
    width: 3px;
    background: #111;
    border-radius: 2px;
    height: 3px;
}

.equalizer.playing .bar:nth-child(1) { animation: jump 0.6s ease infinite alternate; }
.equalizer.playing .bar:nth-child(2) { animation: jump 0.4s ease infinite alternate 0.2s; }
.equalizer.playing .bar:nth-child(3) { animation: jump 0.7s ease infinite alternate 0.1s; }
.equalizer.playing .bar:nth-child(4) { animation: jump 0.5s ease infinite alternate 0.3s; }
.equalizer.playing .bar:nth-child(5) { animation: jump 0.65s ease infinite alternate 0.15s; }

@keyframes jump {
    0% { height: 3px; }
    100% { height: 14px; }
}

.ipod-wheel {
    width: 95px;
    height: 95px;
    background: #E5E5EA;
    border-radius: 50%;
    margin-top: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    user-select: none;
}

.wheel-text {
    position: absolute;
    font-size: 8px;
    font-weight: 700;
    color: #8E8E93;
}

.wheel-text.top-t { top: 6px; }
.wheel-text.left-t { left: 8px; }
.wheel-text.right-t { right: 8px; }
.wheel-text.bot-t { bottom: 6px; }

.ipod-center-btn {
    width: 38px;
    height: 38px;
    background: #D1D1D6;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    color: #3A3A3C;
    transition: transform 0.1s;
}

.ipod-center-btn:active {
    transform: scale(0.92);
}

/* =========================================
   11. NAVIGATION & PILL BUTTONS
========================================= */
.nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 16px;
    padding: 0 4px;
}

.nav-row.center-nav {
    justify-content: center;
}

.nav-arrow-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--rose-accent);
    color: white;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(200, 75, 91, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background 0.2s;
    touch-action: manipulation;
}

.nav-arrow-btn:hover {
    transform: scale(1.08);
    background: var(--rose-deep);
}

.nav-arrow-btn:active {
    transform: scale(0.94);
}

.nav-back-btn {
    background: transparent;
    border: 1.5px solid rgba(200, 75, 91, 0.4);
    color: var(--burgundy);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.nav-back-btn:hover {
    background: rgba(200, 75, 91, 0.1);
}

.pill-btn {
    padding: 12px 28px;
    border-radius: 25px;
    border: none;
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: manipulation;
}

.pill-btn.surprise-btn {
    background: var(--rose-accent);
    color: white;
}

.pill-btn.big-btn {
    padding: 14px 34px;
    font-size: 16px;
}

.pill-btn.secondary-btn {
    background: #FFF4EA;
    color: var(--burgundy);
    border: 1.5px solid #842634;
}

.pill-btn.danger {
    background: #B31312;
    color: white;
}

.pill-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.pill-btn:active {
    transform: scale(0.96);
}

.interactive-heart-burst {
    margin: 22px 0 14px;
}

.ending-actions {
    margin-top: 10px;
}

/* =========================================
   KEYFRAME ANIMATIONS
========================================= */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.22); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* =========================================
   RESPONSIVE LAYOUT ADJUSTMENTS
========================================= */
@media (max-width: 720px) {
    .keypad-card {
        flex-direction: column;
        gap: 20px;
        padding: 24px 18px;
    }

    .split-scrapbook-card {
        flex-direction: column;
    }

    .letter-card-container {
        padding: 20px 16px;
    }

    .photo-side {
        padding: 20px 16px;
    }

    .text-side {
        padding: 22px 16px;
    }
}

/* =========================================
   TOAST NOTIFICATION
========================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast-msg {
    background: rgba(74, 14, 23, 0.95);
    color: #FFF4EA;
    border: 1.5px solid #C84B5B;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: toastPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    backdrop-filter: blur(8px);
}

@keyframes toastPop {
    from { opacity: 0; transform: translateY(12px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}