/* ============================================================
   【16. 弹窗与列表适配】
   ============================================================ */
.action-sheet-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.2); 
    backdrop-filter: blur(2px); 
    z-index: 2000; 
    display: none; 
    flex-direction: column; 
    justify-content: flex-end; 
} 

.action-sheet-overlay.active { 
    display: flex; 
} 

.action-sheet { 
    background: var(--bg-body); 
    border-radius: 20px 20px 0 0; 
    padding: 25px 20px calc(25px + var(--safe-bottom)); 
    animation: slideUp 0.3s; 
    max-height: 60%; 
    overflow-y: auto; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05); 
} 

@keyframes slideUp { 
    from { transform: translateY(100%); } 
    to { transform: translateY(0); } 
} 

.action-btn { 
    background: var(--bg-card); 
    padding: 16px; 
    text-align: center; 
    color: var(--text-primary); 
    font-size: 16px; 
    border-radius: 14px; 
    margin-bottom: 12px; 
    font-weight: 500; 
    cursor: pointer; 
    border: 1px solid var(--separator); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.02); 
} 

.action-btn:active { 
    background: var(--bg-body); 
    transform: scale(0.98); 
} 

.action-btn.cancel { 
    font-weight: bold; 
    margin-bottom: 0; 
    color: var(--text-secondary); 
    background: var(--bg-body); 
    border: none; 
} 

.profile-container { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
} 

.profile-header { 
    position: relative; 
    width: 100%; 
    height: 240px; 
    flex-shrink: 0; 
} 

.profile-bg { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
} 

.profile-avatar-box { 
    position: absolute; 
    left: 20px; 
    bottom: 10px; 
    width: 90px; 
    height: 90px; 
    flex-shrink: 0; 
} 

.profile-avatar { 
    width: 100%; 
    height: 100%; 
    border-radius: 50%; 
    border: 4px solid var(--bg-card); 
    object-fit: cover; 
    background: #eee; 
}

.modal-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.2); 
    z-index: 2100; 
    display: none; 
    justify-content: center; 
    align-items: center; 
    backdrop-filter: blur(5px); 
    opacity: 0; 
    transition: opacity 0.3s; 
} 

.modal-overlay.active { 
    display: flex; 
    opacity: 1; 
} 

.add-contact-card { 
    width: 88%; 
    max-height: 85%; 
    background: var(--bg-card); 
    border-radius: 28px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    transform: scale(0.9); 
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    color: var(--text-primary); 
} 

.modal-overlay.active .add-contact-card { 
    transform: scale(1); 
} 

.card-header { 
    padding: 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: var(--bg-card); 
    border-bottom: 0.5px solid var(--separator); 
} 

.card-title { 
    font-weight: 600; 
    font-size: 18px; 
    letter-spacing: 1px; 
    color: var(--text-primary); 
} 

.card-body { 
    padding: 25px; 
    overflow-y: auto; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 18px; 
} 

.input-label { 
    font-size: 12px; 
    color: var(--text-secondary); 
    margin-left: 5px; 
    margin-bottom: 6px; 
    font-weight: 500; 
    letter-spacing: 0.5px; 
} 

.input-block { 
    width: 100%; 
    background: var(--bg-input); 
    border-radius: 10px; 
    padding: 14px; 
    font-size: 16px; 
    border: 1px solid var(--separator); 
    outline: none; 
    color: var(--text-primary); 
} 

.persona-block-wrapper { 
    position: relative; 
    width: 100%; 
} 

.persona-block { 
    width: 100%; 
    background: var(--bg-input); 
    border-radius: 10px; 
    padding: 14px; 
    font-size: 15px; 
    border: 1px solid var(--separator); 
    outline: none; 
    height: 120px; 
    resize: none; 
    line-height: 1.5; 
    color: var(--text-primary); 
} 

.expand-btn { 
    position: absolute; 
    bottom: 10px; 
    right: 10px; 
    width: 26px; 
    height: 26px; 
    background: var(--bg-card); 
    border-radius: 8px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    cursor: pointer; 
    color: var(--text-primary); 
    font-size: 14px; 
} 

.select-block { 
    width: 100%; 
    background: var(--bg-input); 
    border-radius: 10px; 
    padding: 14px; 
    font-size: 16px; 
    border: 1px solid var(--separator); 
    outline: none; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: var(--text-primary); 
} 

.full-screen-edit { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: var(--bg-body); 
    z-index: 3000; 
    transform: translateY(100%); 
    transition: transform 0.3s; 
    display: flex; 
    flex-direction: column; 
} 

.full-screen-edit.active { 
    transform: translateY(0); 
} 

.full-edit-area { 
    flex: 1; 
    padding: 25px; 
    font-size: 18px; 
    line-height: 1.8; 
    border: none; 
    outline: none; 
    resize: none; 
    font-family: 'InsFont', sans-serif; 
    background: var(--bg-body); 
    color: var(--text-primary); 
}

.settings-avatar-row { 
    display: flex; 
    justify-content: center; 
    padding: 30px 0; 
} 

.avatar-uploader { 
    width: 110px; 
    height: 110px; 
    border-radius: 50%; 
    overflow: hidden; 
    position: relative; 
    border: 1px solid var(--separator); 
    cursor: pointer; 
} 

.avatar-uploader img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
} 

.avatar-uploader::after { 
    content: '更换'; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 30px; 
    background: rgba(0,0,0,0.6); 
    color: white; 
    font-size: 11px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
} 

.delete-btn { 
    color: var(--text-secondary); 
    font-weight: bold; 
    text-align: center; 
    border-color: var(--separator); 
} 

.group-select-item { 
    display: flex; 
    align-items: center; 
    padding: 15px 0; 
    border-bottom: 0.5px solid var(--separator); 
} 

.group-checkbox { 
    width: 22px; 
    height: 22px; 
    border-radius: 50%; 
    border: 2px solid #ddd; 
    margin-right: 15px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: white; 
    transition: 0.2s; 
} 

.group-checkbox.checked { 
    background: #333; 
    border-color: #333; 
} 

.group-checkbox.checked::after { 
    content: '✓'; 
    font-size: 14px; 
    font-weight: bold; 
}

.wb-list-item { 
    background: var(--bg-card); 
    padding: 18px; 
    border-radius: 16px; 
    margin-bottom: 12px; 
    border: 1px solid var(--separator); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer; 
    transition: 0.2s; 
    color: var(--text-primary); 
} 

.wb-list-item:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.03); 
} 

.wb-pos-btn-group { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 15px; 
} 

.wb-pos-btn { 
    flex: 1; 
    padding: 12px; 
    border-radius: 10px; 
    border: 1px solid var(--separator); 
    background: var(--bg-input); 
    text-align: center; 
    font-size: 13px; 
    color: var(--text-secondary); 
    cursor: pointer; 
    transition: 0.2s; 
} 

.wb-pos-btn.active { 
    background: #333; 
    color: white; 
    border-color: #333; 
} 

.wb-pos-btn.urgent.active { 
    background: #666; 
    border-color: #666; 
}

.sms-root-list { 
    padding: 20px; 
} 

.ios-list-group { 
    background: var(--bg-card); 
    border-radius: 16px; 
    overflow: hidden; 
    margin-bottom: 20px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.02); 
} 

.ios-list-item { 
    display: flex; 
    align-items: center; 
    padding: 15px 18px; 
    border-bottom: 0.5px solid var(--separator); 
    cursor: pointer; 
} 

.ios-list-item:last-child { 
    border-bottom: none; 
} 

.ios-list-item:active { 
    background: var(--bg-input); 
} 

.ios-list-icon { 
    width: 30px; 
    height: 30px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    margin-right: 15px; 
} 

.ios-list-icon svg { 
    fill: var(--text-primary) !important; 
} 

.ios-list-label { 
    flex: 1; 
    font-size: 16px; 
    font-weight: 500; 
    color: var(--text-primary); 
} 

.ios-list-count { 
    color: var(--text-secondary); 
    font-size: 14px; 
    margin-right: 8px; 
} 

.ios-arrow { 
    color: var(--text-secondary); 
    font-size: 12px; 
} 

.sms-list-item { 
    padding: 15px; 
    border-bottom: 0.5px solid var(--separator); 
    cursor: pointer; 
    display: flex; 
    align-items: flex-start; 
    background: var(--bg-card); 
} 

.sms-list-item:active { 
    background: var(--bg-input); 
} 

.sms-avatar { 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    background: #eee; 
    color: #666; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    font-size: 20px; 
    margin-right: 15px; 
    flex-shrink: 0; 
    border: 1px solid var(--separator); 
} 

.sms-content-box { 
    flex: 1; 
    overflow: hidden; 
} 

.sms-sender { 
    font-weight: 600; 
    font-size: 16px; 
    margin-bottom: 4px; 
    color: var(--text-primary); 
} 

.sms-preview { 
    color: var(--text-secondary); 
    font-size: 14px; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
} 

.sms-time { 
    font-size: 12px; 
    color: var(--text-secondary); 
    margin-left: 10px; 
    white-space: nowrap; 
} 

.sms-unread-dot { 
    width: 8px; 
    height: 8px; 
    background: #333; 
    border-radius: 50%; 
    margin-top: 5px; 
}

.sms-chat-header { 
    position: relative; 
    padding-top: var(--safe-top); 
    height: calc(44px + var(--safe-top) + 36px); 
    background: var(--bg-header); 
    backdrop-filter: blur(10px); 
    border-bottom: 0.5px solid rgba(0,0,0,0.1); 
    display: flex; 
    align-items: flex-end; 
    justify-content: space-between; 
    padding-bottom: 8px; 
    z-index: 50; 
    flex-shrink: 0; 
} 

.sms-header-left, .sms-header-right { 
    width: 60px; 
    height: 44px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding-bottom: 15px; 
} 

.sms-header-center { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-end; 
    padding-bottom: 0px; 
} 

.sms-header-avatar { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    background: #ccc; 
    margin-bottom: 3px; 
    object-fit: cover; 
} 

.sms-header-name { 
    font-size: 12px; 
    font-weight: 500; 
    line-height: 1.2; 
    color: var(--text-primary); 
} 

.sms-header-sub { 
    font-size: 10px; 
    color: var(--text-secondary); 
    display: flex; 
    align-items: center; 
    line-height: 1.2; 
} 

.sms-chat-label { 
    text-align: center; 
    font-size: 11px; 
    color: var(--text-secondary); 
    margin-top: 10px; 
    margin-bottom: 5px; 
    font-weight: 500; 
} 

.sms-timestamp-label { 
    text-align: center; 
    font-size: 11px; 
    color: var(--text-secondary); 
    margin-bottom: 15px; 
}
/* ===== 分页滑动修复（追加在 modals.css 末尾） ===== */
.iphone-screen {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.pages-container {
    display: flex;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
}

.pages-container::-webkit-scrollbar {
    display: none;
}

.page {
    flex: 0 0 100%;
    scroll-snap-align: start;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-indicators,
.dock {
    flex-shrink: 0;
}

.page img {
    max-width: 100%;
    height: auto;
}