/* ==========================================================================
   KAWAII SANRIO / HELLO KITTY THEME STYLING
   ========================================================================== */

:root {
    --pink-lightest: #fff5f8;
    --pink-bg: #ffeef3;
    --pink-soft: #ffd8e4;
    --pink-pastel: #ffb7ce;
    --pink-primary: #ff7597;
    --pink-vibrant: #ff4d6d;
    --pink-deep: #c9184a;
    --pink-cream: #fff9fa;
    --gold-star: #ffb703;
    --mint-accent: #b7e4c7;
    --text-dark: #592e3a;
    --text-muted: #8c5b69;
    --white-frost: rgba(255, 255, 255, 0.88);
    --card-shadow: 0 12px 36px rgba(255, 117, 151, 0.2), 0 4px 12px rgba(255, 183, 206, 0.25);
    --border-radius-lg: 28px;
    --border-radius-md: 20px;
    --border-radius-sm: 14px;
    --font-heading: 'Comfortaa', 'Nunito', cursive, sans-serif;
    --font-body: 'Nunito', sans-serif;
}

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

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: var(--text-dark);
    background: linear-gradient(135deg, #fff0f5 0%, #ffe8ee 50%, #fed7e2 100%);
    background-attachment: fixed;
    line-height: 1.5;
    touch-action: manipulation;
}

/* Polka dot subtle kawaii overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(var(--pink-pastel) 12%, transparent 12%),
                      radial-gradient(var(--pink-soft) 12%, transparent 12%);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    opacity: 0.22;
    pointer-events: none;
    z-index: 0;
}

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

.floating-icon {
    position: absolute;
    bottom: -50px;
    user-select: none;
    opacity: 0.65;
    animation: floatUpward linear infinite;
}

@keyframes floatUpward {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.8);
        opacity: 0;
    }
    15% {
        opacity: 0.7;
    }
    85% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-115vh) rotate(360deg) scale(1.1);
        opacity: 0;
    }
}

/* ==========================================================================
   HEADER & SOUND CONTROLS
   ========================================================================== */
.kawaii-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 240, 245, 0.85);
    border-bottom: 2px dashed rgba(255, 183, 206, 0.6);
    padding: 10px 16px;
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge-love-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 2px solid var(--pink-pastel);
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(255, 117, 151, 0.15);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pink-deep);
}

.pulse-icon {
    display: inline-block;
    animation: heartPulse 1.4s infinite ease-in-out;
}

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

.cute-icon-btn {
    background: #ffffff;
    border: 2px solid var(--pink-pastel);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(255, 117, 151, 0.15);
    transition: transform 0.2s, background-color 0.2s;
}

.cute-icon-btn:active {
    transform: scale(0.9);
}

/* ==========================================================================
   MAIN APP CONTAINER & STEP NAVIGATION
   ========================================================================== */
.app-container {
    position: relative;
    z-index: 2;
    max-width: 580px;
    margin: 0 auto;
    padding: 8px 12px 16px 12px;
}

/* Quest Navigation */
.quest-navigation {
    margin-bottom: 10px;
}

.nav-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white-frost);
    padding: 6px 10px;
    border-radius: 50px;
    border: 2px solid rgba(255, 183, 206, 0.6);
    box-shadow: 0 4px 15px rgba(255, 117, 151, 0.12);
}

.nav-step-btn {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 12px;
    transition: all 0.25s ease;
    opacity: 0.65;
    user-select: none;
    -webkit-user-select: none;
}

.nav-step-btn.active {
    opacity: 1;
    transform: scale(1.06);
}

.nav-step-btn.active .step-num {
    background: var(--pink-primary);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 117, 151, 0.45);
}

.step-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--pink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.step-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dark);
}

.step-line {
    flex-grow: 1;
    height: 3px;
    background: var(--pink-soft);
    border-radius: 2px;
    margin: 0 4px;
}

/* ==========================================================================
   KAWAII CARD BASE STYLES
   ========================================================================== */
.quest-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.quest-section.active-section {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.kawaii-card {
    background: var(--white-frost);
    border: 3px solid #ffccd9;
    border-radius: var(--border-radius-lg);
    padding: clamp(14px, 2.5vh, 20px) clamp(12px, 3.5vw, 18px);
    text-align: center;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.bow-decoration {
    font-size: 1.8rem;
    margin-bottom: 2px;
    animation: gentleWiggle 3s infinite ease-in-out;
}

@keyframes gentleWiggle {
    0%, 100% { transform: rotate(-4deg); }
    50% { transform: rotate(4deg); }
}

.section-badge {
    display: inline-block;
    background: #ffe3ec;
    border: 1.5px solid var(--pink-pastel);
    color: var(--pink-deep);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 50px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
    -webkit-user-select: none;
}

.kawaii-title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    font-weight: 700;
    color: var(--pink-deep);
    margin-bottom: 4px;
    line-height: 1.25;
    text-shadow: 0 2px 4px rgba(255, 117, 151, 0.15);
}

.kawaii-subtitle {
    font-size: clamp(0.78rem, 2.4vw, 0.88rem);
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

/* Buttons */
.cute-action-btn {
    background: linear-gradient(135deg, #ff7597 0%, #ff4d6d 100%);
    color: white;
    border: none;
    padding: 11px 22px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: clamp(0.88rem, 3.2vw, 1rem);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 77, 109, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 330px;
    margin-top: 10px;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
}

.cute-action-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.3);
}

.cute-action-btn .btn-text {
    white-space: nowrap;
}

.cute-action-btn .btn-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
    line-height: 1;
    font-size: 1.1rem;
}

.pill-mini-btn {
    background: #ffffff;
    border: 2px solid var(--pink-pastel);
    color: var(--pink-deep);
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(255, 117, 151, 0.12);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s, background-color 0.15s;
    user-select: none;
    -webkit-user-select: none;
    white-space: nowrap;
}

.pill-mini-btn:active {
    transform: scale(0.94);
    background: #fff0f5;
}

/* ==========================================================================
   SECTION 1: ENVELOPE SURPRISE
   ========================================================================== */
.envelope-box-wrapper {
    margin: 22px auto 16px;
    display: flex;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}

.envelope-container {
    width: 220px;
    height: 155px;
    background: #ffe0e9;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(255, 117, 151, 0.3);
    transition: transform 0.3s ease;
    border: 3px solid #ff9eb5;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    overflow: visible;
}

.envelope-container:hover {
    transform: scale(1.03);
}

/* Decorative stickers stuck to the envelope */
.env-stamp {
    position: absolute;
    top: -8px;
    right: 10px;
    background: #ffffff;
    border: 2px dashed #ff85a2;
    border-radius: 6px;
    padding: 2px 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotate(7deg);
    box-shadow: 0 3px 8px rgba(255, 117, 151, 0.25);
    z-index: 6;
    pointer-events: none;
    user-select: none;
}
.stamp-icon {
    font-size: 1.15rem;
    line-height: 1;
}
.stamp-text {
    font-size: 0.55rem;
    font-weight: 900;
    color: var(--pink-deep);
    letter-spacing: 0.5px;
}

.env-sticker {
    position: absolute;
    z-index: 6;
    pointer-events: none;
    user-select: none;
    filter: drop-shadow(0 3px 6px rgba(255, 117, 151, 0.25));
    transition: transform 0.2s ease;
}

.sticker-bunny {
    top: -12px;
    left: 8px;
    font-size: 1.35rem;
    transform: rotate(-12deg);
    background: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffd8e4;
    box-shadow: 0 3px 8px rgba(255, 117, 151, 0.2);
}

.sticker-badge {
    top: 22px;
    left: 10px;
    transform: rotate(-8deg);
    background: #ffffff;
    border: 1.5px solid #ffaac1;
    color: var(--pink-deep);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(255, 117, 151, 0.2);
    z-index: 3;
}

.env-washi-tape {
    position: absolute;
    bottom: -6px;
    right: 14px;
    width: 44px;
    height: 14px;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 183, 206, 0.85),
        rgba(255, 183, 206, 0.85) 5px,
        rgba(255, 255, 255, 0.95) 5px,
        rgba(255, 255, 255, 0.95) 10px
    );
    border-radius: 2px;
    transform: rotate(-5deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    opacity: 0.9;
    z-index: 6;
    pointer-events: none;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 107px solid transparent;
    border-right: 107px solid transparent;
    border-top: 68px solid #ff85a2;
    transform-origin: top;
    transition: transform 0.45s ease;
    z-index: 4;
}

.envelope-seal {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 34px;
    height: 34px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(255, 77, 109, 0.35);
    z-index: 5;
    transition: opacity 0.3s ease, transform 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.envelope-paper {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    background: #ffffff;
    padding: 8px 10px;
    border-radius: 10px;
    border: 2px dashed #ffb7ce;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--pink-deep);
    z-index: 2;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
}

.opened-greeting-content {
    animation: fadeInScale 0.45s ease forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.greeting-banner-badge {
    background: #ffffff;
    border: 2px solid #ffccd9;
    border-radius: var(--border-radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    margin-bottom: 20px;
    box-shadow: 0 6px 18px rgba(255, 117, 151, 0.12);
}

.mascot-img-mini {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--pink-pastel);
    flex-shrink: 0;
}

.mascot-img-medium {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--pink-pastel);
    box-shadow: 0 8px 20px rgba(255, 117, 151, 0.25);
    margin: 0 auto 12px;
}

.banner-texts h3 {
    color: var(--pink-deep);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.banner-texts p {
    font-size: 0.88rem;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Scattered phrases badges */
.scattered-phrases-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 25px;
}

.floating-pill-phrase {
    background: #ffffff;
    border: 2px solid #ffaac1;
    color: var(--pink-deep);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(255, 117, 151, 0.14);
    display: inline-block;
    animation: gentleFloat 4s ease-in-out infinite;
}

.pill-1 { animation-delay: 0s; transform: rotate(-2deg); }
.pill-2 { animation-delay: 1s; transform: rotate(2deg); }
.pill-3 { animation-delay: 2s; transform: rotate(-1deg); }
.pill-4 { animation-delay: 3s; transform: rotate(3deg); }

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

/* ==========================================================================
   SECTION 2: PHOTO PUZZLE
   ========================================================================== */
.puzzle-controls-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}

.puzzle-preview-box {
    background: #ffffff;
    border: 2px dashed var(--pink-pastel);
    padding: 10px;
    border-radius: var(--border-radius-md);
    margin: 0 auto 14px;
    max-width: 260px;
    animation: fadeInScale 0.3s ease;
}

.preview-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}

.puzzle-preview-box img {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.puzzle-frame {
    position: relative;
    max-width: 360px;
    margin: 0 auto;
    padding: 8px;
    background: #ffffff;
    border: 3px solid #ffb7ce;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(255, 117, 151, 0.2);
}

.puzzle-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    aspect-ratio: 1/1;
    background: #fff5f8;
    border-radius: 14px;
    overflow: hidden;
}

.puzzle-tile {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background-repeat: no-repeat;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
    transition: transform 0.15s, box-shadow 0.15s, outline 0.15s;
    position: relative;
    user-select: none;
}

.puzzle-tile:hover {
    transform: scale(0.97);
}

.puzzle-tile.selected {
    outline: 3px solid var(--pink-vibrant);
    box-shadow: 0 0 14px rgba(255, 77, 109, 0.6);
    transform: scale(0.93);
    z-index: 10;
}

.tile-number {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--pink-deep);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(255, 117, 151, 0.25);
    user-select: none;
    -webkit-user-select: none;
}

/* Victory Overlay */
.puzzle-victory-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 240, 245, 0.96);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(6px);
    animation: fadeInScale 0.4s ease forwards;
    z-index: 20;
}

.victory-bow {
    font-size: 2.2rem;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

.victory-heading {
    font-family: var(--font-heading);
    color: var(--pink-deep);
    font-size: 1.55rem;
    font-weight: 800;
    margin: 6px 0;
}

.victory-subtext {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}

.puzzle-footer-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
}

#puzzleMovesCount {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--pink-deep);
}

.puzzle-hint-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.upload-status {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 700;
}
.upload-status.success {
    background: #d1fae5;
    color: #065f46;
}
.upload-status.error {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================================================
   SECTION 3: LOVE QUIZ
   ========================================================================== */
.quiz-progress-bar {
    width: 100%;
    height: 10px;
    background: #ffe3ec;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--pink-pastel);
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffaac1 0%, #ff4d6d 100%);
    border-radius: 50px;
    transition: width 0.3s ease;
}

.quiz-question-box {
    margin-bottom: 15px;
}

.question-header {
    margin-bottom: 10px;
}

.q-badge {
    background: #ffffff;
    border: 1.5px solid var(--pink-pastel);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--pink-deep);
}

.quiz-question-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 18px;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-opt-btn {
    background: #ffffff;
    border: 2px solid #ffccd9;
    border-radius: 18px;
    padding: 14px 18px;
    text-align: left;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 117, 151, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quiz-opt-btn:active, .quiz-opt-btn:hover {
    border-color: var(--pink-primary);
    background: #fff5f8;
    transform: translateX(4px);
}

.quiz-opt-btn.correct-opt {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.quiz-reaction-card {
    background: #ffffff;
    border: 2px solid var(--pink-pastel);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 6px 18px rgba(255, 117, 151, 0.16);
    margin-top: 15px;
    animation: fadeInScale 0.3s ease;
}

.reaction-emoji {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

#quizReactionText {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pink-deep);
    margin-bottom: 12px;
}

.cute-action-btn-small {
    background: var(--pink-primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 117, 151, 0.35);
}

.quiz-completed-box {
    animation: fadeInScale 0.4s ease;
    padding: 10px 0;
}

.quiz-completed-box h3 {
    font-family: var(--font-heading);
    color: var(--pink-deep);
    font-size: 1.35rem;
    margin-bottom: 8px;
}

.quiz-completed-box p {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

/* ==========================================================================
   SECTION 4: MAGIC COMPLIMENTS JAR
   ========================================================================== */
.magic-jar-wrapper {
    margin: 8px auto 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
}

.magic-jar {
    width: 135px;
    height: 160px;
    position: relative;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.magic-jar * {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.magic-jar:active {
    transform: scale(0.93) rotate(-3deg);
}

.jar-lid {
    width: 78px;
    height: 22px;
    background: #ffccd9;
    border: 3px solid #ff85a2;
    border-radius: 12px 12px 4px 4px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    position: relative;
    z-index: 2;
}

.jar-body {
    width: 135px;
    height: 140px;
    background: rgba(255, 255, 255, 0.65);
    border: 4px solid #ff9eb5;
    border-radius: 20px 20px 30px 30px;
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 25px rgba(255, 117, 151, 0.25), inset 0 0 16px rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.jar-shine {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 12px;
    height: 75px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    transform: rotate(10deg);
}

.jar-stars-inside {
    font-size: 1.35rem;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
    animation: gentleWiggle 2.5s infinite ease-in-out;
}

.jar-label {
    background: #ffffff;
    border: 1.5px dashed var(--pink-primary);
    border-radius: 8px;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--pink-deep);
    margin-top: 6px;
}

.jar-instruction {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--pink-deep);
    margin-top: 6px;
    animation: gentleFloat 1.8s infinite ease-in-out;
    user-select: none;
    -webkit-user-select: none;
}

.drawn-compliment-card {
    background: #ffffff;
    border: 2px solid #ffccd9;
    border-radius: 16px;
    padding: 11px 16px;
    position: relative;
    margin: 10px auto 4px;
    max-width: 440px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(255, 117, 151, 0.18);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    -webkit-user-select: none;
}

.card-pin {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
}

.compliment-text {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--pink-deep);
    line-height: 1.35;
    user-select: none;
    -webkit-user-select: none;
}

.compliments-counter-bar {
    margin: 4px 0 8px;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-muted);
    user-select: none;
    -webkit-user-select: none;
}

/* ==========================================================================
   SECTION 5: FINAL LOVE LETTER & OVERFLOWING LOVE METER
   ========================================================================== */
.final-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    text-align: left;
}

.mascot-img-compact {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid var(--pink-pastel);
    box-shadow: 0 4px 10px rgba(255, 117, 151, 0.2);
    flex-shrink: 0;
}

.final-title {
    font-size: 1.22rem !important;
    margin-bottom: 2px !important;
}

.final-tag {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--pink-deep);
    display: block;
}

.love-letter-paper {
    background: #ffffff;
    border: 2px dashed #ffb7ce;
    border-radius: 16px;
    padding: 12px 14px;
    text-align: left;
    position: relative;
    box-shadow: inset 0 0 16px rgba(255, 240, 245, 0.5);
    margin-bottom: 8px;
}

.letter-stamp {
    position: absolute;
    top: 8px;
    right: 10px;
    background: #ffe3ec;
    border: 1.5px solid var(--pink-primary);
    color: var(--pink-deep);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    transform: rotate(6deg);
}

.letter-paragraph {
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.letter-signature {
    margin-top: 6px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--pink-deep);
    font-size: 0.88rem;
    text-align: right;
}

/* OVERFLOWING INFINITY LOVE METER */
.love-meter-wrapper {
    background: #ffffff;
    border: 2px solid #ffccd9;
    border-radius: 14px;
    padding: 8px 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 14px rgba(255, 117, 151, 0.15);
    position: relative;
    overflow: visible;
}

.meter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.meter-val {
    color: var(--pink-vibrant);
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.98rem;
    animation: heartPulse 1.2s infinite ease-in-out;
}

.meter-track-container {
    position: relative;
    overflow: visible;
    height: 20px;
    margin: 6px 0;
}

.meter-track {
    width: 100%;
    height: 100%;
    background: #ffe3ec;
    border-radius: 50px;
    position: relative;
    overflow: visible;
}

.meter-fill-overflow {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 125%;
    background: linear-gradient(90deg, #ff85a2 0%, #ff4d6d 50%, #c9184a 80%, #ff0055 100%);
    border-radius: 50px;
    box-shadow: 0 0 16px rgba(255, 77, 109, 0.75), 0 0 28px rgba(255, 0, 85, 0.5);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    animation: pulseOverflow 2s infinite alternate ease-in-out;
    z-index: 5;
}

@keyframes pulseOverflow {
    0% { width: 118%; box-shadow: 0 0 10px rgba(255, 77, 109, 0.6); }
    100% { width: 132%; box-shadow: 0 0 22px rgba(255, 0, 85, 0.9); }
}

.meter-overflow-text {
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    white-space: nowrap;
    margin-right: 6px;
}

.meter-infinity-rocket {
    font-size: 0.85rem;
    animation: gentleWiggle 1s infinite;
}

.meter-alert-badge {
    display: inline-block;
    background: #fff0f3;
    border: 1px dashed var(--pink-vibrant);
    color: var(--pink-deep);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    margin-top: 2px;
    animation: gentleFloat 2s infinite ease-in-out;
}

.final-buttons-row {
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: center;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.cute-kiss-btn {
    background: linear-gradient(135deg, #ff4d6d 0%, #c9184a 100%);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 800;
    font-family: var(--font-body);
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(201, 24, 74, 0.35);
    flex: 1;
    white-space: nowrap;
    transition: transform 0.15s, box-shadow 0.15s;
    user-select: none;
    -webkit-user-select: none;
}

.cute-kiss-btn:active {
    transform: scale(0.95);
}

.cute-fireworks-btn {
    background: #ffffff;
    border: 2px solid var(--pink-primary);
    color: var(--pink-deep);
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 800;
    font-family: var(--font-body);
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(255, 117, 151, 0.15);
    flex: 1;
    white-space: nowrap;
    transition: transform 0.15s;
    user-select: none;
    -webkit-user-select: none;
}

.cute-fireworks-btn:active {
    transform: scale(0.95);
    background: #fff0f5;
}

/* ==========================================================================
   KISS & HEART FLOATING ANIMATION LAYER
   ========================================================================== */
.kiss-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.kiss-particle {
    position: absolute;
    user-select: none;
    font-size: 2.2rem;
    animation: kissFlyUp 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes kissFlyUp {
    0% {
        transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -80px) scale(1.3) rotate(-10deg);
    }
    100% {
        transform: translate(-50%, -240px) scale(0.9) rotate(15deg);
        opacity: 0;
    }
}

/* ==========================================================================
   MOBILE & RESPONSIVE TWEAKS
   ========================================================================== */
@media (max-width: 480px) {
    .app-container {
        padding: 10px 12px 40px 12px;
    }
    .kawaii-card {
        padding: 20px 14px;
        border-radius: 22px;
    }
    .step-label {
        display: none; /* Icon-only on tiny screens */
    }
    .nav-step-btn {
        padding: 2px 4px;
    }
    .step-num {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    .puzzle-frame {
        max-width: 310px;
    }
    .magic-jar {
        width: 120px;
        height: 150px;
    }
    .jar-body {
        width: 120px;
        height: 130px;
    }
}
