:root { 
    --law-blue: #2c3e50; 
    --heart-red: #e74c3c; 
    --bg-paper: #f4f1ea;
    --gold: #c9a227;
    --pink: #ff6b9d;
}

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

body {
    font-family: 'Lora', serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex; 
    justify-content: center; 
    align-items: center;
    min-height: 100vh; 
    margin: 0; 
    overflow-x: hidden;
    position: relative;
}

/* Floating background particles */
.bg-particles {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* Mouse trail hearts */
.trail-heart {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    font-size: 20px;
    animation: trailFade 1s ease-out forwards;
}

@keyframes trailFade {
    0% { transform: scale(1) translateY(0); opacity: 1; }
    100% { transform: scale(0) translateY(-50px); opacity: 0; }
}

/* Main container - Standardized Fixed Height */
#main-container {
    background: var(--bg-paper);
    width: 92%; 
    max-width: 480px;
    height: 580px;
    min-height: 580px;
    padding: 25px 25px 20px 25px;
    border: 1px solid rgba(201, 162, 39, 0.4);
    border-radius: 16px;
    box-shadow: 
        0 25px 60px rgba(0,0,0,0.4),
        0 0 100px rgba(231, 76, 60, 0.1),
        inset 0 0 80px rgba(255,255,255,0.05);
    position: relative;
    z-index: 5;
    background-image: radial-gradient(#dcdcdc 1px, transparent 1px);
    background-size: 20px 20px;
    animation: containerSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#main-container:hover {
    transform: none;
    box-shadow: 
        0 25px 60px rgba(0,0,0,0.4),
        0 0 100px rgba(231, 76, 60, 0.1),
        inset 0 0 80px rgba(255,255,255,0.05);
}

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

/* Animated border glow */
#main-container::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(45deg, var(--heart-red), var(--gold), var(--pink), var(--heart-red));
    background-size: 400% 400%;
    z-index: -1;
    animation: borderGlow 4s ease infinite;
    opacity: 0;
    pointer-events: none;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Sweet Romantic Loader Canvas */
#loader {
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #fffcf9 0%, #fdf5f5 100%); 
    color: var(--law-blue); 
    font-family: 'Lora', serif;
    padding: 30px 20px; 
    box-sizing: border-box; 
    font-size: 14px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    transition: opacity 0.5s ease-out;
}

.loader-card-canvas {
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px dashed rgba(231, 76, 60, 0.3);
    border-radius: 14px;
    padding: 30px 24px;
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.08);
}

.loader-icon {
    font-size: 46px;
    margin-bottom: 16px;
    animation: pulseHeart 1.2s ease-in-out infinite;
    filter: drop-shadow(0 4px 10px rgba(231, 76, 60, 0.3));
}

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

#terminal-text {
    width: 100%;
    text-align: left;
}

.terminal-line {
    opacity: 0;
    margin: 8px 0;
    font-size: 13px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: sweetLineFade 0.4s ease-out forwards;
}

@keyframes sweetLineFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Legal Content Outer Layout */
#legal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

/* Card Deck Container & Header */
.deck-header {
    margin-bottom: 12px;
    text-align: center;
}

.deck-step-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--heart-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.deck-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(231, 76, 60, 0.15);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.deck-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--heart-red), var(--pink));
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(201, 162, 39, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: var(--heart-red);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
}

/* Card Deck Content Area */
#cardDeckContainer {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    overflow-y: auto;
    padding: 5px 0;
}

/* Card Steps - Standardized Height & Layout */
.card-step {
    width: 100%;
    min-height: 380px;
    display: none;
    margin: auto 0;
    text-align: center;
    opacity: 1;
}

.card-step.card-active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slide-in-right {
    animation: slideInRight 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-in-left {
    animation: slideInLeft 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

/* Deck Navigation Buttons */
.deck-nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(201, 162, 39, 0.3);
}

.btn-deck {
    padding: 10px 20px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.06);
    color: var(--law-blue);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-deck:hover:not(:disabled) {
    background: var(--heart-red);
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    transform: translateY(-2px);
}

.btn-deck:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* Header Component */
.header { 
    width: 100%;
    border-bottom: 3px double var(--law-blue); 
    text-align: center; 
    margin-bottom: 18px; 
    padding-bottom: 12px;
    cursor: pointer;
    transition: background 0.3s;
    opacity: 1;
}

.header:hover {
    background: rgba(231, 76, 60, 0.03);
}

.header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--law-blue);
    margin: 0;
    letter-spacing: 1px;
}

.header p {
    margin: 5px 0 0;
    font-size: 11px;
    font-weight: bold;
    color: #555;
    letter-spacing: 2px;
}

/* Stamp Component */
.stamp {
    position: absolute; 
    top: 20px; 
    right: 20px;
    border: 3px solid var(--heart-red); 
    color: var(--heart-red);
    padding: 6px 10px; 
    font-weight: bold; 
    transform: rotate(12deg);
    opacity: 0.75; 
    font-family: 'Playfair Display', serif; 
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 10;
}

.stamp:hover {
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.4);
    opacity: 1;
}

.stamp.spin {
    animation: stampSpin 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes stampSpin {
    0% { transform: rotate(12deg) scale(1); }
    50% { transform: rotate(372deg) scale(1.2); }
    100% { transform: rotate(372deg) scale(1); }
}

/* Case Info Component */
.case-info {
    width: 100%;
    margin-bottom: 15px;
    opacity: 1;
}

.case-info p {
    font-size: 14px;
    margin: 8px 0;
    color: #333;
}

.case-info strong {
    color: var(--law-blue);
}

.case-info .highlight {
    color: var(--heart-red);
    font-weight: 600;
    position: relative;
}

.case-info .highlight::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--heart-red);
    transform: scaleX(1);
}

/* Fancy Divider */
hr.fancy {
    border: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(to right, transparent, #ccc, transparent);
    margin: 15px 0;
    opacity: 1;
}

/* Decorative Ornament */
.ornament {
    text-align: center;
    font-size: 20px;
    color: var(--gold);
    margin: 10px 0;
    letter-spacing: 8px;
    opacity: 0.7;
}

/* Reasons Section Component */
.reasons-section {
    width: 100%;
    margin: 10px 0;
    opacity: 1;
}

.reasons-title {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--law-blue);
    text-align: center;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.reasons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.reason-card {
    background: rgba(231, 76, 60, 0.04);
    border: 1px solid rgba(231, 76, 60, 0.15);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.reason-card:hover {
    background: rgba(231, 76, 60, 0.1);
    transform: translateY(-3px) scale(1.03) rotate(-1deg);
    box-shadow: 0 6px 18px rgba(231, 76, 60, 0.2);
}

.reason-card .emoji {
    font-size: 20px;
    display: block;
    margin-bottom: 4px;
}

.reason-card .text {
    font-size: 11px;
    color: #555;
    font-style: italic;
}

.reason-card.revealed .text {
    animation: revealText 0.5s ease-out;
}

@keyframes revealText {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.reason-card.locked .text {
    filter: blur(4px);
    user-select: none;
}

.reason-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
}

/* Promise Section Component */
.promise-section {
    width: 100%;
    margin: 10px 0;
    padding: 16px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.03), rgba(201, 162, 39, 0.03));
    border-radius: 12px;
    border: 1px dashed rgba(201, 162, 39, 0.3);
    opacity: 1;
}

.promise-title {
    font-family: 'Playfair Display', serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.promise-list {
    list-style: none;
    padding: 0;
}

.promise-list li {
    font-size: 12px;
    color: #555;
    padding: 5px 0;
    border-bottom: 1px dotted rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.promise-list li:last-child {
    border-bottom: none;
}

.promise-list li::before {
    content: '♡';
    color: var(--heart-red);
    font-size: 14px;
}

/* Date Counter Component */
.date-counter {
    width: 100%;
    text-align: center;
    margin: 10px 0;
    padding: 16px;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 12px;
    opacity: 1;
}

.date-counter .label {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.counter-box {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 8px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-box .value {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 900;
    color: var(--heart-red);
}

.counter-box .unit {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.date-counter .unit-sub {
    font-size: 11px;
    color: #777;
    margin-top: 10px;
    font-style: italic;
}

/* HTMX Swap Transitions */
.htmx-swapping {
    opacity: 0;
    transform: scale(0.96);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.htmx-settling {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Wax Seal Component */
.wax-seal {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #c0392b, #8b0000);
    border-radius: 50%;
    margin: 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 -3px 6px rgba(0,0,0,0.3),
        inset 0 3px 6px rgba(255,255,255,0.2),
        0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.3s;
    opacity: 1;
}

.wax-seal:hover {
    transform: scale(1.1) rotate(5deg);
}

.wax-seal span {
    font-size: 24px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Footer Flourish Component */
.footer-flourish {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(201, 162, 39, 0.2);
    opacity: 1;
    width: 100%;
}

.footer-flourish .initials {
    font-family: 'Dancing Script', cursive;
    font-size: 30px;
    color: var(--heart-red);
    opacity: 0.75;
}

.footer-flourish .date {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Heart Icon Component */
.heart-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
    opacity: 1;
}

.heart-icon span {
    font-size: 44px;
    animation: heartbeat 1.5s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(231, 76, 60, 0.5));
    transition: transform 0.2s;
}

.heart-icon:hover span {
    transform: scale(1.1);
}

.heart-icon::after {
    content: 'double click me!';
    position: absolute;
    bottom: -18px;
    font-size: 10px;
    color: #aaa;
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s;
}

.heart-icon:hover::after {
    opacity: 1;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.18); }
    30% { transform: scale(1); }
    45% { transform: scale(1.12); }
    60% { transform: scale(1); }
}

/* Main Question with Gradient Text */
.main-question {
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 900;
    margin: 12px 0;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--heart-red), var(--pink), #ff8a80, var(--heart-red));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    opacity: 1;
}

.main-question .emoji-icon {
    -webkit-text-fill-color: initial !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    font-style: normal;
    display: inline-block;
    margin-left: 4px;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Body Text Component */
.body-text {
    text-align: justify;
    line-height: 1.65;
    color: #444;
    margin-bottom: 15px;
    font-size: 14px;
    opacity: 1;
}

/* Signature Box Component */
.signature-box {
    border-bottom: 2px solid #999;
    width: 240px; 
    margin: 15px auto 6px;
    height: 48px; 
    cursor: pointer; 
    text-align: center;
    position: relative;
    transition: border-color 0.3s;
    opacity: 1;
}

.signature-box:hover {
    border-color: var(--heart-red);
}

.signature-text { 
    font-family: 'Dancing Script', cursive; 
    font-size: 28px; 
    color: var(--heart-red); 
    display: none; 
    user-select: none;
}

.signature-text.show {
    display: block;
    animation: signWrite 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes signWrite {
    0% { opacity: 0; transform: scale(0.5) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.sign-label {
    text-align: center;
    font-size: 10px;
    color: #888;
    margin-bottom: 12px;
    font-style: italic;
    opacity: 1;
}

/* Action Buttons */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
    max-width: 260px;
    opacity: 1;
}

.btn {
    flex: 1;
    padding: 14px 16px;
    border: none;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.btn-yes {
    background: linear-gradient(135deg, var(--heart-red), #c0392b);
    color: white;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
}

.btn-yes:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6);
}

.btn-no {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
    box-shadow: 0 4px 15px rgba(149, 165, 166, 0.3);
}

.btn-no:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(149, 165, 166, 0.4);
}

/* Floating Hearts Animation */
.floating-heart {
    position: fixed; 
    font-size: 25px;
    animation: floatUp var(--duration, 6s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    opacity: 0; 
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg) scale(0); opacity: 0; }
    10% { opacity: 0.8; transform: scale(1); }
    90% { opacity: 0.8; }
    100% { transform: translateY(-100px) rotate(360deg) scale(0.5); opacity: 0; }
}

/* Reveal Final Content View */
.reveal-content {
    text-align: center;
    width: 100%;
    margin: auto 0;
}

.reveal-content .big-heart {
    font-size: 70px;
    display: block;
    margin-bottom: 12px;
    animation: revealHeart 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 0 30px rgba(231, 76, 60, 0.6));
}

@keyframes revealHeart {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.reveal-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    color: var(--heart-red);
    margin-bottom: 12px;
}

.reveal-content p {
    font-size: 14px;
    color: #555;
    margin: 8px 0;
}

.reveal-content .quote {
    font-style: italic;
    color: #666;
    margin: 15px 0;
    padding: 14px;
    border-left: 4px solid var(--heart-red);
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.05), transparent);
    text-align: left;
    font-size: 13px;
}

.reveal-content .promise {
    font-weight: 600;
    color: #333;
    margin: 15px 0;
    padding: 12px;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 8px;
    font-size: 12px;
}

.reveal-content .signature-final {
    font-family: 'Dancing Script', cursive;
    font-size: 26px;
    color: var(--heart-red);
    margin-top: 18px;
}

.reveal-content .case-closed {
    display: inline-block;
    margin-top: 15px;
    padding: 6px 16px;
    border: 2px solid var(--heart-red);
    color: var(--heart-red);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px 5px rgba(231, 76, 60, 0.2); }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 22px;
    border-radius: 50px;
    font-family: 'Lora', serif;
    font-size: 13px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Hidden Message Popup */
.hidden-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--bg-paper);
    padding: 30px 25px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 10001;
    text-align: center;
    max-width: 320px;
    animation: popupIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popupIn {
    0% { transform: translate(-50%, -50%) scale(0) rotate(-10deg); }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.hidden-popup h3 {
    font-family: 'Playfair Display', serif;
    color: var(--heart-red);
    font-size: 20px;
    margin-bottom: 12px;
}

.hidden-popup p {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
}

.hidden-popup .close-popup {
    margin-top: 15px;
    padding: 8px 20px;
    background: var(--heart-red);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Lora', serif;
    font-size: 12px;
    transition: transform 0.2s;
}

.hidden-popup .close-popup:hover {
    transform: scale(1.05);
}

/* Konami Hint */
.konami-hint {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 9px;
    color: rgba(255,255,255,0.2);
    z-index: 1;
    font-family: monospace;
}

/* Mobile Responsive adjustments for Mobile & Touch Devices */
* {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
    body {
        align-items: center;
        padding: 8px 0;
        min-height: 100dvh;
    }

    #main-container {
        width: 94%;
        height: calc(100dvh - 16px);
        max-height: 580px;
        min-height: 440px;
        padding: 14px 14px 12px 14px;
        margin: auto;
    }

    .header p { font-size: 10px; }
    .stamp { top: 15px; right: 15px; font-size: 9px; padding: 5px 8px; }
    .case-info p { font-size: 13px; }
    .heart-icon span { font-size: 38px; }
    .main-question { font-size: 22px; margin: 10px 0; }
    .body-text { font-size: 13px; text-align: left; }
    .reasons-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .reason-card .emoji { font-size: 18px; }
    .reason-card .text { font-size: 10px; }
    .counter-box .value { font-size: 20px; }
    .promise-section { padding: 12px; }
    .promise-list li { font-size: 11px; }
    .wax-seal { width: 55px; height: 55px; }
    .wax-seal span { font-size: 20px; }
    .footer-flourish .initials { font-size: 26px; }
    .signature-box { width: 100%; max-width: 220px; height: 44px; }
    .signature-text { font-size: 24px; }
    .btn { padding: 12px; font-size: 12px; }
    .reveal-content .big-heart { font-size: 55px; }
    .reveal-content h2 { font-size: 24px; }
    .reveal-content p { font-size: 13px; }
}

@media (max-width: 360px) {
    #main-container { padding: 14px 10px; height: calc(100dvh - 10px); max-height: 540px; min-height: 420px; }
    .main-question { font-size: 20px; }
    .header h2 { font-size: 14px; }
}

/* Reveal Content Card Scrollability & Touch Momentum Scrolling */
.reveal-content {
    text-align: center;
    width: 100%;
    height: 100%;
    max-height: 520px;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 10px 15px 40px 15px;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

.reveal-content::-webkit-scrollbar {
    width: 5px;
}

.reveal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.reveal-content::-webkit-scrollbar-thumb {
    background: rgba(231, 76, 60, 0.35);
    border-radius: 10px;
}

.reveal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(231, 76, 60, 0.6);
}
