:root {
    --bg: #f7e9e9;
    --bg-light: #fef5f5;
    --shadow-dark: #ddcfcf;
    --shadow-light: #ffffff;
    --accent: #d69e9e;
    --accent-soft: #e2b6b6;
    --text-primary: #6d4c4c;
    --text-secondary: #9e7a7a;
    --completed: #b5c9a0;
    --locked: #cbb2b2;
    --today-glow: #f3c1c1;
    --gray-disabled: #d5c5c5;
    --bubble-mine: #e8e0f0;
    --bubble-hers: #fce4e4;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
body {
    font-family: 'Noto Serif SC', serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.5;
}
.handwritten {
    font-family: 'Ma Shan Zheng', cursive;
}
.hidden {
    display: none !important;
}
.neu-raised {
    background: var(--bg);
    border-radius: 24px;
    box-shadow: 
        8px 8px 20px var(--shadow-dark),
        -8px -8px 20px var(--shadow-light);
}
.neu-pressed {
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
}
.neu-flat {
    background: linear-gradient(145deg, var(--bg-light), var(--bg));
    border-radius: 20px;
    box-shadow: 
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
}
.timer-container {
    animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
    0%, 100% {
        box-shadow: 
            8px 8px 20px var(--shadow-dark),
            -8px -8px 20px var(--shadow-light);
    }
    50% {
        box-shadow: 
            8px 8px 20px var(--shadow-dark),
            -8px -8px 20px var(--shadow-light),
            0 0 40px rgba(214, 158, 158, 0.25);
    }
}
.timer-numbers {
    font-family: 'Ma Shan Zheng', cursive;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem 1rem;
}
.time-group {
    display: inline-flex;
    align-items: baseline;
    white-space: nowrap;
}
.digit-flip {
    display: inline-block;
    transition: transform 0.1s ease, color 0.1s ease;
}
.digit-flip.changed {
    transform: scale(1.08);
    color: var(--accent);
}
.moment-card {
    background: linear-gradient(145deg, var(--bg-light), var(--bg));
    border-radius: 24px;
    box-shadow: 
        8px 8px 20px var(--shadow-dark),
        -8px -8px 20px var(--shadow-light);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}
.moment-card.fade-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}
.moment-card.fade-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.date-tag {
    background: linear-gradient(145deg, var(--accent-soft), var(--accent));
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    box-shadow: 
        3px 3px 6px var(--shadow-dark),
        -1px -1px 4px rgba(255,255,255,0.5);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.date-tag.today {
    background: linear-gradient(145deg, #f0b6b6, #d69e9e);
    box-shadow: 0 0 15px var(--today-glow), 3px 3px 8px var(--shadow-dark);
    animation: softPulse 2s infinite;
}
.date-tag.today::after {
    content: "❤️";
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.9;
}
@keyframes softPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.08); }
}
#momentText {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
    margin-top: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-soft) var(--bg);
    transition: scrollbar-color 0.2s ease;
    position: relative;
    white-space: pre-wrap;
    word-break: break-word;
    background: transparent;
}
#momentText::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}
#momentText::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 8px;
}
#momentText::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 8px;
    transition: background 0.2s ease;
}
#momentText::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
.scroll-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, var(--bg), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 5;
}
#momentText.has-overflow ~ .scroll-gradient {
    opacity: 1;
}
#momentText.has-overflow.scrolled-to-bottom ~ .scroll-gradient {
    opacity: 0;
}
@media (max-width: 480px) {
    #momentText {
        max-height: 150px;
    }
    .scroll-gradient {
        height: 30px;
    }
}
.compact-date-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1rem 0 1.5rem 0;
}
.date-nav-btn {
    background: var(--bg);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.date-nav-btn:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}
.current-date-btn {
    background: linear-gradient(145deg, var(--bg-light), var(--bg));
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 40px;
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.2rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
    min-width: 140px;
    text-align: center;
}
.current-date-btn:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}
.calendar-popup {
    position: absolute;
    z-index: 100;
    background: var(--bg);
    border-radius: 32px;
    box-shadow: 
        12px 12px 28px var(--shadow-dark),
        -12px -12px 28px var(--shadow-light);
    padding: 1.5rem;
    width: calc(100% - 2rem);
    max-width: 340px;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    display: none;
}
.calendar-popup.show {
    display: block;
}
.month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}
.month-nav button {
    background: var(--bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    font-size: 1.2rem;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.month-nav button:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
.month-year {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.2rem;
    color: var(--text-primary);
}
.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
}
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.3rem;
}
.day-cell {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 0.9rem;
    font-family: 'Ma Shan Zheng', cursive;
    background: var(--bg);
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    color: var(--text-primary);
    cursor: pointer;
    transition: 0.1s;
    border: none;
    width: 100%;
    padding: 0;
}
.day-cell:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
.day-cell.empty {
    background: transparent;
    box-shadow: none;
    cursor: default;
    color: transparent;
    pointer-events: none;
}
.day-cell.disabled {
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    background: var(--bg);
    color: var(--gray-disabled);
    cursor: not-allowed;
    opacity: 0.5;
}
.day-cell.today {
    background: linear-gradient(145deg, #f0b6b6, #d69e9e);
    color: white;
    box-shadow: 0 0 10px var(--today-glow), 3px 3px 6px var(--shadow-dark);
}
.day-cell.selected {
    background: var(--accent);
    color: white;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}
.milestone-track {
    background: var(--bg);
    border-radius: 10px;
    box-shadow: 
        inset 3px 3px 6px var(--shadow-dark),
        inset -3px -3px 6px var(--shadow-light);
}
.milestone-fill {
    background: linear-gradient(90deg, var(--completed), #b5d0b0);
    border-radius: 8px;
    box-shadow: 
        2px 2px 4px rgba(0,0,0,0.05),
        inset 0 1px 2px rgba(255,255,255,0.3);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
    60% { transform: scale(1); }
}
.counter-badge {
    background: var(--bg);
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.9rem;
    color: var(--accent);
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    font-family: 'Ma Shan Zheng', cursive;
}
.milestone-mark {
    width: 32px;
    height: 32px;
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    transition: all 0.2s ease;
}
.milestone-mark.completed {
    background: linear-gradient(145deg, var(--bg-light), var(--bg));
    color: #22ab2b;
}
.milestone-mark.locked {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    background: var(--bg);
    opacity: 0.9;
}
.milestone-mark svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}
.decorative-line {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-soft), transparent);
    border-radius: 1px;
}
.password-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(247, 233, 233, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.password-card {
    width: 100%;
    max-width: 360px;
    padding: 2.5rem 2rem;
    background: var(--bg);
    border-radius: 40px;
    box-shadow: 12px 12px 28px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
    text-align: center;
}
.password-card h2 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 2rem;
}
.password-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: var(--bg);
    box-shadow: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    margin-bottom: 2rem;
    text-align: center;
    transition: all 0.2s ease;
}
.password-input.error {
    box-shadow: inset 6px 6px 12px rgba(214, 158, 158, 0.4), inset -6px -6px 12px rgba(255, 255, 255, 0.7);
    color: #b29696;
}
.password-input.error::placeholder {
    color: #b29696;
    opacity: 0.9;
}
.password-input.locked {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    color: #a58e8e;
    opacity: 0.8;
    cursor: not-allowed;
}
.password-input.locked::placeholder {
    color: #a58e8e;
    opacity: 0.9;
}
.password-input.success {
    box-shadow: inset 6px 6px 12px rgba(165, 200, 140, 0.3), inset -6px -6px 12px #ffffff;
}
.password-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(145deg, var(--bg-light), #ecdcdc);
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.1s;
    font-family: 'Ma Shan Zheng', cursive;
}
.password-btn span {
    position: relative;
    display: inline-block;
    color: var(--accent);
    z-index: 1;
}
.password-btn span::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: transparent;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    animation: shine-text 2s infinite linear;
    pointer-events: none;
    z-index: 2;
}
@keyframes shine-text {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
.password-btn:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}
.password-btn:disabled {
    opacity: 0.6;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    cursor: not-allowed;
}
.password-btn:disabled span::after {
    animation: none;
}
.hint {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.floating-heart {
    position: absolute;
    opacity: 0.15;
    animation: floatUp 15s linear infinite;
    pointer-events: none;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}
.chat-bubble-mine {
    background: #e8e0f0;
    border-radius: 24px 24px 4px 24px;
    padding: 0.75rem 1.25rem;
    max-width: 85%;
    box-shadow: 4px 4px 10px var(--shadow-dark), -4px -4px 10px var(--shadow-light);
    align-self: flex-end;
    margin-left: auto;
}
.chat-bubble-hers {
    background: #fce4e4;
    border-radius: 24px 24px 24px 4px;
    padding: 0.75rem 1.25rem;
    max-width: 85%;
    box-shadow: 4px 4px 10px #f2c8cc, -4px -4px 10px #fff;
    align-self: flex-start;
    margin-right: auto;
}
.chat-bubble-mine img,
.chat-bubble-hers img {
    display: inline-block;
    vertical-align: middle;
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
    margin: 0 2px;
}
.chat-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 4px;
}
.message-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-align: right;
}
.message-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 12px 4px 12px 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-soft) var(--bg);
}
.message-list::-webkit-scrollbar {
    width: 6px;
}
.message-list::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 10px;
}
.message-list::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 10px;
}
.message-input-container {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    align-items: center;
    flex-wrap: nowrap;
}
.sender-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.message-editable, .comment-editable {
    background: var(--bg);
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 40px;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    font-family: 'Noto Serif SC', serif;
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    min-height: 48px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    flex: 1;
    max-height: 150px;
}
.message-editable[placeholder]:empty:before,
.comment-editable[placeholder]:empty:before {
    content: attr(placeholder);
    color: var(--text-secondary);
    opacity: 0.7;
    pointer-events: none;
}
.message-editable img, .comment-editable img {
    max-width: 24px;
    max-height: 24px;
    vertical-align: middle;
    margin: 0 2px;
    display: inline-block;
}
.send-btn {
    background: linear-gradient(145deg, var(--bg-light), var(--bg));
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.send-btn:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}
.send-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}
.history-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(247, 233, 233, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
}
.history-modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    background: var(--bg);
    border-radius: 32px;
    box-shadow: 12px 12px 28px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
    padding: 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
}
.history-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--shadow-dark);
}
.history-modal-header h3 {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.4rem;
    color: var(--text-primary);
}
.close-modal-btn {
    background: var(--bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.close-modal-btn:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
.modal-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 0.5rem 0 1.2rem 0;
}
.modal-date-nav-btn {
    background: var(--bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.modal-date-nav-btn:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
.modal-current-date {
    background: linear-gradient(145deg, var(--bg-light), var(--bg));
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
    min-width: 120px;
    text-align: center;
}
.modal-current-date:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
#modalCalendarPopup {
    margin-bottom: 1rem;
    width: 100%;
    max-width: none;
    left: 0;
    transform: none;
    box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
    padding: 1rem;
}
.history-message-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 12px 4px 12px 0;
    max-height: 50vh;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-soft) var(--bg);
}
.history-message-list::-webkit-scrollbar {
    width: 6px;
}
.history-message-list::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 10px;
}
.history-message-list::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 10px;
}
.history-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px dashed var(--accent-soft);
}
.history-link:hover {
    color: var(--text-primary);
}
#scrollHint {
    text-align: center; 
    font-size: 0.7rem; 
    color: var(--accent); 
    margin-bottom: 0.2rem;
    background: var(--bg-light); 
    border-radius: 30px; 
    padding: 0.2rem 1rem; 
    display: inline-block;
}
#commentsSection {
    margin-top: 1.2rem;
    border-top: 1px solid var(--shadow-dark);
    padding-top: 1rem;
    transition: opacity 0.3s, filter 0.3s;
}
#commentsSection.blur-comments {
    opacity: 0.5;
    filter: blur(2px);
    pointer-events: none;
    transition: 0.2s;
}
.comment-list {
    max-height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(214,158,158,0.4) transparent;
}
.comment-list::-webkit-scrollbar { width: 6px; background: transparent; }
.comment-list::-webkit-scrollbar-thumb { background: rgba(214,158,158,0.4); border-radius: 20px; }
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.comment-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg);
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: var(--accent); flex-shrink: 0;
}
.comment-bubble {
    background: #fce4e4;
    border-radius: 18px 18px 18px 4px;
    padding: 0.6rem 1rem;
    max-width: calc(100% - 42px);
    box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
}
.comment-bubble p {
    font-size: 0.9rem; line-height: 1.4;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}
.comment-meta {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.65rem; color: var(--text-secondary);
    flex-wrap: wrap;
}
.delete-comment, .delete-reply, .reply-btn-sm {
    color: #c47a7a; cursor: pointer; font-size: 0.7rem;
    padding: 2px 6px; border-radius: 12px;
    background: var(--bg); box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
    transition: 0.1s;
    display: inline-block;
}
.reply-btn-sm {
    color: var(--accent);
}
.delete-comment:active, .delete-reply:active, .reply-btn-sm:active {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
.replies-container {
    margin-top: 0.5rem;
    margin-left: 0px;
    padding-left: 1.2rem;
    border-left: 2px dashed #e2c5c5;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.reply-entry {
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.2rem 0 0.2rem 0.3rem;
}
.reply-main {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.4rem;
}
.reply-sender {
    font-weight: 500;
    color: var(--accent);
    white-space: nowrap;
}
.reply-to {
    color: var(--text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
}
.reply-content {
    color: var(--text-primary);
    word-break: break-word;
    flex: 1 1 100%;
    margin-top: 0.1rem;
}
.reply-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.reply-time {
    color: var(--text-secondary);
}
.reply-actions {
    display: flex;
    gap: 0.3rem;
}
.comment-input-wrapper {
    display: flex; align-items: center; gap: 0.6rem;
    background: var(--bg); border-radius: 40px;
    padding: 0.3rem 0.3rem 0.3rem 1rem;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    margin-top: 0.5rem;
}
.comment-input {
    flex: 1; background: transparent; border: none; font-size: 0.9rem;
    color: var(--text-primary); outline: none;
}
.comment-input::placeholder { color: var(--text-secondary); opacity: 0.7; }
.comment-send {
    background: var(--accent); border: none; width: 40px; height: 40px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    cursor: pointer;
}
.comment-send:active { box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light); }
.comment-send svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
#replyContext {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin: 0.2rem 0 0.2rem 0.5rem;
    color: var(--accent);
}
.reply-context-badge {
    background: #e2b6b6;
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    box-shadow: 2px 2px 5px var(--shadow-dark);
}
.cancel-reply {
    background: var(--bg);
    border: none;
    color: #c47a7a;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 12px;
    border-radius: 30px;
    box-shadow: 2px 2px 4px var(--shadow-dark), -2px -2px 4px var(--shadow-light);
    font-weight: 500;
}
.cancel-reply:active {
    box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
.emoji-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.emoji-btn:hover {
    background: var(--shadow-dark);
}
.emoji-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}
.emoji-picker {
    position: fixed;
    z-index: 3500;
    background: var(--bg-light);
    border: 2px solid var(--shadow-light);
    border-radius: 24px;
    box-shadow: 12px 12px 28px var(--shadow-dark), -12px -12px 28px var(--shadow-light);
    width: 300px;
    max-width: 90vw;
    height: 320px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    transition: opacity 0.1s;
    opacity: 1;
    pointer-events: auto;
}
.emoji-picker.hidden {
    display: none !important;
}
.emoji-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--shadow-dark);
    padding-bottom: 0.5rem;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: thin;
}
.emoji-categories::-webkit-scrollbar {
    height: 4px;
}
.emoji-categories::-webkit-scrollbar-track {
    background: var(--bg);
}
.emoji-categories::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 4px;
}
.emoji-cat {
    background: var(--bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s;
    color: var(--text-primary);
    flex-shrink: 0;
    overflow: hidden;
}
.emoji-cat img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: var(--bg-light);
}
.emoji-cat.active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
    background: var(--accent-soft);
    color: white;
}
.emoji-cat.active img {
    filter: brightness(0.9) contrast(1.1);
    box-shadow: inset 10 0 0 2px rgba(255,255,255,0.5);
    background-color: var(--accent-soft);
}
.emoji-cat:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
.emoji-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0.25rem 0.25rem 0 0.25rem !important;
}
.emoji-grid::-webkit-scrollbar {
    width: 6px;
}
.emoji-grid::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 8px;
}
.emoji-grid::-webkit-scrollbar-thumb {
    background: var(--accent-soft);
    border-radius: 8px;
}
.emoji-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
.emoji-item {
    background: var(--bg);
    border: none;
    border-radius: 12px;
    box-shadow: 2px 2px 5px var(--shadow-dark), -2px -2px 5px var(--shadow-light);
    font-size: 1.8rem;
    aspect-ratio: 1 / 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.1s;
    padding: 0;
    color: var(--text-primary);
    line-height: 1;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.emoji-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: var(--bg-light);
}
.emoji-item:active {
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
}
@media (max-width: 480px) {
    body { padding: 0 0.5rem; }
    .w-full.max-w-2xl { padding-left: 0.5rem; padding-right: 0.5rem; }
    .timer-numbers { font-size: 1.8rem !important; }
    .message-input-container { flex-wrap: nowrap !important; }
    .emoji-picker { 
        width: 280px; 
        height: 300px;
    }
    .emoji-item {
        font-size: 1.6rem;
    }
}
#emojiPicker .emoji-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0.25rem 0.25rem 0 0.25rem !important;
}
#emojiPicker .emoji-item {
    width: 100% !important;
    aspect-ratio: 1/1 !important;
    font-size: 1.8rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}
@media (max-width: 480px) {
    #emojiPicker .emoji-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 0.4rem !important;
    }
    #emojiPicker .emoji-item {
        font-size: 1.4rem !important;
    }
}
.wish-counter {
    background: var(--bg);
    padding: 0.25rem 1rem;
    border-radius: 30px;
    box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--shadow-light);
    font-size: 0.9rem;
    color: var(--accent);
    font-family: 'Ma Shan Zheng', cursive;
    white-space: nowrap;
}
.wish-item {
    background: var(--bg);
    border-radius: 20px;
    box-shadow: 3px 3px 8px var(--shadow-dark), -3px -3px 8px var(--shadow-light);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}
.wish-item:hover {
    box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light);
}
.wish-checkbox {
    appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--bg);
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.1s;
}
.wish-checkbox:checked {
    background: linear-gradient(145deg, #b5d0b0, #a0b894);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.1);
}
.wish-checkbox:checked::after {
    content: "✓";
    color: white;
    font-size: 18px;
    font-weight: bold;
}
.wish-checkbox:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.wish-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text-primary);
    word-break: break-word;
}
.wish-text.completed {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.7;
}
.wish-delete {
    background: transparent;
    border: none;
    color: #c47a7a;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.2rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.1s;
}
.wish-delete:hover {
    background: var(--shadow-dark);
}

.empty-wish {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 0;
    font-style: italic;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0 0.5rem;
}
.page-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}
.section-title-sm {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}
.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--bg-light);
    border-radius: 36px;
    box-shadow: 5px 5px 30px #a7a7a7, -5px -5px 30px #f9c7c7;
    max-width: 550px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 2rem 1.8rem;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-soft) var(--bg);
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.modal-close {
    background: var(--bg);
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--accent);
    cursor: pointer;
    transition: 0.1s;
}
.modal-close:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
.wish-add-container {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
    align-items: center;
}
.wish-input {
    flex: 1;
    background: var(--bg);
    border: none;
    border-radius: 40px;
    padding: 0.9rem 1.5rem;
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light), 0 2px 4px rgba(0,0,0,0.02);
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    color: var(--text-primary);
    outline: none;
    transition: box-shadow 0.2s;
}
.wish-input:focus {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light), 0 0 0 3px rgba(214,158,158,0.2);
}
.wish-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}
.wish-add-btn {
    background: linear-gradient(145deg, var(--accent-soft), var(--accent));
    border: none;
    border-radius: 40px;
    padding: 0.9rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
    cursor: pointer;
    transition: 0.1s;
    font-family: 'Noto Serif SC', serif;
    white-space: nowrap;
}
.wish-add-btn:active {
    box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    transform: scale(0.98);
}
@media (max-width: 480px) {
    .modal-content { padding: 1.5rem; }
    .wish-add-container { flex-direction: column; }
    .wish-add-btn { width: 100%; }
}
.wish-trigger {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2100;
    transition: transform 0.2s ease;
    filter: drop-shadow(0 10px 15px rgba(214, 158, 158, 0.4));
}
.wish-trigger:active { transform: scale(0.9); }
.heart-svg {
    width: 70px;
    height: 70px;
    display: block;
    animation: softHeartbeat 2.2s infinite ease-in-out;
    filter: drop-shadow(0 0 12px #ffa5a5) drop-shadow(0 0 20px #ffc1c1);
}
@keyframes softHeartbeat {
    0% { transform: scale(1); filter: drop-shadow(0 0 12px #ffa5a5); }
    50% { transform: scale(1.12); filter: drop-shadow(0 0 22px #ff7a7a) drop-shadow(0 0 8px #ffbaba); }
    100% { transform: scale(1); filter: drop-shadow(0 0 12px #ffa5a5); }
}
.wish-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #df4678;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 28px;
    height: 28px;
    border-radius: 30px;
    padding: 0 6px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 120, 120, 0.6);
    border: 2px solid #fff2f2;
    font-family: 'Ma Shan Zheng', sans-serif;
    z-index: 5;
}
.wish-badge.show {
    display: flex;
    animation: badgePulse 1.5s ease-in-out infinite;
}
@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.glow-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.glow-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 200, 200, 0.6);
    border-radius: 50%;
    box-shadow: 0 0 12px #ffb6b6;
    animation: float 3s infinite alternate;
}
.glow-particles span:nth-child(1) { top: 5%; left: 10%; }
.glow-particles span:nth-child(2) { bottom: 10%; right: 5%; width: 8px; height: 8px; animation-duration: 4s; }
.glow-particles span:nth-child(3) { top: 30%; right: 0; width: 5px; height: 5px; }
.glow-particles span:nth-child(4) { bottom: 20%; left: 0; width: 7px; height: 7px; }
@keyframes float {
    0% { transform: translate(0, 0); opacity: 0.3; }
    100% { transform: translate(8px, -12px); opacity: 0.1; }
}
.wish-inner-text {
    display: none;
}
.global-loading {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg);
    z-index: 2500;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Ma Shan Zheng', cursive;
    color: var(--accent);
}
.global-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--shadow-dark);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
#maximizeBtn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: var(--accent);
    cursor: pointer;
    transition: 0.1s;
    flex-shrink: 0;
}
#maximizeBtn:active {
    box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
#maximizeBtn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}
.maximized-content {
    display: flex !important;
    flex-direction: column !important;
    max-height: 90vh !important;
    overflow: hidden !important;
}
.maximized-content .modal-header {
    flex-shrink: 0 !important;
}
.maximized-scrollable {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-right: 8px;
    margin-top: 0.5rem;
}
#maximizedCommentList {
    max-height: none !important;
    overflow-y: visible !important;
}