.couple-proactive-letter-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: calc(18px + env(safe-area-inset-top, 0px) + var(--device-top-offset, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.couple-proactive-letter-modal[hidden] {
    display: none !important;
}

.couple-proactive-letter-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 18, 20, 0.62);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 220ms ease;
}

.couple-proactive-letter-paper {
    position: relative;
    width: min(100%, 430px);
    max-height: calc(100vh - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - var(--device-top-offset, 0px));
    max-height: min(760px, calc(var(--app-vh, 100dvh) - 36px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - var(--device-top-offset, 0px)));
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    color: #151719;
    background:
        linear-gradient(rgba(255, 255, 255, 0.91), rgba(255, 255, 255, 0.91)),
        repeating-linear-gradient(0deg, transparent 0, transparent 27px, rgba(25, 28, 31, 0.035) 28px);
    border: 1px solid rgba(255, 255, 255, 0.66);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(22px) scale(0.975);
    transition: opacity 220ms ease, transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.couple-proactive-letter-modal.is-open .couple-proactive-letter-backdrop,
.couple-proactive-letter-modal.is-open .couple-proactive-letter-paper {
    opacity: 1;
}

.couple-proactive-letter-modal.is-open .couple-proactive-letter-paper {
    transform: translateY(0) scale(1);
}

.couple-proactive-letter-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 25px 25px 18px;
}

.couple-proactive-letter-kicker {
    display: block;
    margin-bottom: 5px;
    color: #767b80;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.22em;
}

.couple-proactive-letter-header h2 {
    margin: 0;
    font-family: "Songti SC", "Noto Serif SC", serif;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: 0.06em;
}

.couple-proactive-letter-close {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border: 1px solid #d8dbde;
    border-radius: 50%;
    color: #232629;
    background: rgba(245, 246, 247, 0.9);
    font: 300 25px/30px Arial, sans-serif;
    cursor: pointer;
}

.couple-proactive-letter-sender {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 25px;
    padding: 14px 0;
    border-top: 1px solid #dfe1e3;
    border-bottom: 1px solid #dfe1e3;
}

.couple-proactive-letter-sender img {
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    border-radius: 14px;
    object-fit: cover;
    filter: grayscale(0.15);
    background: #e6e7e8;
}

.couple-proactive-letter-sender div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.couple-proactive-letter-sender strong {
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.couple-proactive-letter-sender span {
    color: #777c81;
    font-size: 11px;
    letter-spacing: 0.04em;
}

.couple-proactive-letter-rule {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 25px 4px;
    color: #868b90;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.couple-proactive-letter-rule i {
    height: 1px;
    flex: 1;
    background: #d5d8da;
}

.couple-proactive-letter-content {
    min-height: 150px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 15px 27px 20px;
    color: #292c2f;
    font-family: "Songti SC", "Noto Serif SC", serif;
    font-size: 15px;
    line-height: 2;
    letter-spacing: 0.035em;
    white-space: pre-wrap;
    word-break: break-word;
}

.couple-proactive-letter-actions {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 10px;
    padding: 13px 20px calc(19px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e0e2e4;
    background: rgba(249, 249, 249, 0.94);
}

.couple-proactive-letter-actions button {
    min-height: 46px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 680;
    cursor: pointer;
}

.couple-proactive-letter-later {
    border: 1px solid #d5d8da;
    color: #4a4e52;
    background: #f4f5f5;
}

.couple-proactive-letter-open {
    border: 1px solid #151719;
    color: #fff;
    background: #151719;
    box-shadow: 0 8px 18px rgba(19, 21, 23, 0.18);
}

@media (max-width: 430px) {
    .couple-proactive-letter-modal {
        padding-right: 12px;
        padding-left: 12px;
    }

    .couple-proactive-letter-paper {
        border-radius: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .couple-proactive-letter-backdrop,
    .couple-proactive-letter-paper {
        transition-duration: 0.01ms;
    }
}
