/***
作者：onlyScv
日期：2025-12-12
描述：电子礼簿系统-手机版
联系：200980998@qq.com
***/

/* 引入字体 */
@font-face {
    font-family: 'AlimamaDongFangDaKai';
    src: url('../static/AlimamaDongFangDaKai-Regular.woff2') format('woff2');
    font-style: normal;
    font-weight: bold;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 关键：禁止页面滚动、固定定位 */
html, body {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%; /* 这里不写 vh！交给 JS 控制 */
    overflow: hidden;
}

body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    /* 安全区顶部 */
    padding-top: env(safe-area-inset-top);
    padding-top: constant(safe-area-inset-top);
}

.main-record{
    max-width: 100%;
    margin: auto;
}

/* 打赏功能专属样式 */

/* 手机端顶部打赏按钮 */
.app-header .reward-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    background-color: #D81F26;
    color: white;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid #FFD700;
}

.reward-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 备份还原按钮样式 */
.backup-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.backup-buttons .success-confirm-btn {
    width: 100%;
}

#backupDataBtn {
    background: #4CAF50;
    color: white;
}

#backupDataBtn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

#importDataBtn {
    background: #2196F3;
    color: white;
}

.cloud-restore-btn {
    grid-column: 1 / -1;
    min-height: 50px;
    padding: 10px 12px;
    border: 1px solid #0ea5e9;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cloud-restore-btn:active {
    transform: translateY(1px);
}

.main-all-funeral .cloud-restore-btn {
    border-color: #7a7a7a;
    background: linear-gradient(135deg, #666666, #4b4b4b);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 备份选项样式 */
.backup-options {
    padding: 15px;
    background-color: #f9fafb;
    border-radius: 8px;
}

.backup-options h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: normal;
    color: #374151;
}

.backup-option {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.backup-option input[type="radio"] {
    margin-right: 8px;
    accent-color: #ef4444;
}

.backup-option label {
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
}

.ledger-selection {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    max-height: 200px;
    overflow-y: auto;
}

/* 滚动条样式 */
.ledger-selection::-webkit-scrollbar {
    width: 6px;
}

.ledger-selection::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ledger-selection::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.ledger-selection::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.ledger-selection h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: normal;
    color: #374151;
}

.ledger-checkboxes {
    max-height: 200px;
    overflow-y: auto;
}

.ledger-checkbox-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.ledger-checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #ef4444;
    width: 16px;
    height: 16px;
}

.ledger-checkbox-item label {
    font-size: 16px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1.5;
}

/* 白事模式 - 备份弹窗 */
.main-all-funeral .backup-options {
    background-color: #e5e5e5;
}

.main-all-funeral .backup-options h3,
.main-all-funeral .backup-options h4 {
    color: #333333;
}

.main-all-funeral .backup-option label {
    color: #333333;
}

.main-all-funeral .ledger-checkbox-item label {
    color: #333333;
}

/* 统计弹窗样式 */
.stat-modal .modal-buttons {
    margin-top: 30px;
    justify-content: center;
}

.stat-modal .modal-buttons .cancel-btn {
    flex: 0 0 150px;
}

/* 账本标题弹窗样式 */
#newRemark {
    height: 80px;
    font-size: 18px;
    resize: none;
    margin-top: 15px;
}

/* 导出确认弹窗样式 */
.export-confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.export-confirm-buttons .success-confirm-btn {
    flex: 1;
}

.export-confirm-buttons .success-confirm-btn.cancel {
    background: #f0f0f0;
    color: #333;
}

/* 删除确认弹窗样式 */
.delete-confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.delete-confirm-buttons .success-confirm-btn {
    flex: 1;
}

.delete-confirm-buttons .success-confirm-btn.cancel {
    background: #f0f0f0;
    color: #333;
}

#deleteConfirmMessage {
    text-align: center;
    line-height: 1.8;
}

/* 隐藏文件输入 */
#importFileInput {
    display: none;
}

.reward-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.reward-modal {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.reward-modal-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.reward-qrcode {
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.fullscreen-container {
    width: 100vw;
    height: 100%;
    position: relative;
    padding-top: 0;
}

.menu-container {
    position: fixed;
    top: 10px;
    right: 0;
    z-index: 1000;
}

.menu-btn {
    padding: 10px 15px;
    background: linear-gradient(135deg, #D32F2F, #C62828);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
    border: 1px solid #FFD700;
}

.menu-btn:hover {
    background: linear-gradient(135deg, #C62828, #B71C1C);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
    transform: translateY(-2px);
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    border: 1px solid #FFD700;
}

.menu-container:hover .menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* 奠事风格菜单样式 */
.main-all-funeral .menu-btn {
    background: #444444;
    border: 1px solid #666666;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-all-funeral .menu-btn:hover {
    background: #555555;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.main-all-funeral .menu-dropdown {
    background: #F8F8F8;
    border: 1px solid #666666;
}

.main-all-funeral .menu-dropdown .main-btn {
    background: #F8F8F8;
    color: #444444;
    border: 1px solid #DDDDDD;
}

.main-all-funeral .menu-dropdown .main-btn:hover {
    background: #F0F0F0;
    border-color: #444444;
}

.main-btn {
    height: 40px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 15px;
    background: #1e40af;
    color: #fff;
    border: 1px solid #5c30fa;
}

.main-all-happy .main-btn{
    background: linear-gradient(135deg, #D81F26, #9E0000);
    color: #FFD700;
    border: 1px solid #FFD700;
    box-shadow: 0 2px 0 #FFD700;
}

.main-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 0 #FFD700;
}

.add-btn {
    background-color: #27ae60;
}

.manage-btn {
    background-color: #db1c91;
}

.stat-btn {
    background-color: #f39c12;
}

.header {
    text-align: center;
    margin-bottom: 10px;
    padding-top: 20px;
}

.main-title {
    font-size: 28px;
    color: #2c3e50;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.main-all-happy {
    background: #FFF8F0 url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23D81F26' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: #8B0000;
    font-family: "Microsoft Yahei", "SimHei", sans-serif;
    background-repeat: repeat;
    background-attachment: fixed;
}


.main-all-happy .main-title{
        color: #D81F26;
        text-shadow: 1px 1px 0 #FFD700, 2px 2px 0 rgba(139, 0, 0, 0.2);
        position: relative;
        display: inline-block;
        padding: 0 20px;
}

.main-all-happy .main-title::before,
.main-all-happy .main-title::after{
    content: "★";
    color: #FFD700;
    font-size: 18px;
    margin: 0 10px;
}

.main-all-happy .main-title:hover {
    color: #fc0303;
}

.main-title:hover {
    color: #3498db;
}

.subtitle {
    font-size: 16px;
    color: #7f8c8d;
    letter-spacing: 1px;
    cursor: default;
    font-weight: 900;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.main-all-happy .subtitle {
    color: #7A0000;
}

.record-header {
    display: flex;
    background-color: #2c3e50;
    color: white;
    font-size: 16px;
    font-weight: normal;
}

.main-all-happy .record-header {
    background: linear-gradient(90deg, #FF1744, #C62828);
    border-bottom: 2px solid #FFD700;
    box-shadow: 0 2px 6px rgba(255, 23, 68, 0.3);
}

.record-header>div {
    padding: 12px;
    text-align: center;
}

.col-name {
    width: 40%;
    text-align: left !important;
    padding-left: 15px !important;
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.col-amount {
    width: 35%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left !important;
    padding-left: 15px !important;
}

.col-method {
    width: 25%;
    text-align: right !important;
    padding-right: 15px !important;
}

.record-item {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #34495e;
    transition: background 0.3s ease;
    position: relative;
}

.main-all-happy .record-item {
    background-color: #FFFAFA;
}

.main-all-happy .record-item:nth-child(even) {
    background-color: #FFF5EE;
}

.main-all-happy .record-item:hover {
    background-color: #FFEEEE;
    transform: scale(1.005);
}

.record-item:hover {
    background-color: #f8f9fa;
}

.record-item>div {
    padding: 12px;
    display: flex;
    align-items: center;
}

.name-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    position: relative;
}

.name-text {
    font-size: 24px;
    font-weight: 900;
    color: #2c3e50;
    letter-spacing: 2px;
    display: inline-block;
    min-width: 80px;
    max-width: 100%;
    text-align: left;
    cursor: default;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-all-happy .name-text {
    color: #8B0000;
    font-weight: bold;
}

/* 操作按钮容器 - 全局唯一，hover时动态定位 */
.action-text-group {
    display: flex;
    gap: 5px;
    position: absolute;
    top: 80%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 99;
    display: none;
    transition: opacity 0.3s ease 0.3s,
        visibility 0s linear 0.3s;
}

.remark-btn {
    color: #9b59b6;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #f5f0fa;
    border: 1px solid #e8d9f5;
    margin-right: 3px;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.remark-btn:hover {
    background-color: #e8d9f5;
}

.edit-text {
    color: #3498db;
    cursor: pointer;
    font-size: 12px;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
    display: inline-block;
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
}

.delete-text {
    color: #e74c3c;
    cursor: pointer;
    font-size: 12px;
    font-weight: normal;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
    display: inline-block;
    background-color: #fef2f2;
    border: 1px solid #f8d7da;
}

.edit-text:hover {
    background-color: #bbdefb;
}

.delete-text:hover {
    background-color: #f8d7da;
}

/* 仅name-container hover时显示操作按钮 */
.record-item .name-container:hover .action-text-group {
    display: flex !important;
    transition-delay: 0.8s, 0s;
}


/* 备注弹窗 - 全局唯一 */
.remark-pop {
    position: fixed;
    background: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: none;
    min-width: 150px;
    flex-direction: row;
    padding: 8px;
    z-index: 9999;
}

.remark-input {
    height: 30px;
    font-size: 14px;
    padding: 0 6px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    outline: none;
    max-length: 8;


}

.remark-input:focus {
    border-color: #3498db;
}

.remark-confirm-btn {
    height: 30px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: 5px;
    padding: 0 8px;
}

.remark-confirm-btn:hover {
    background-color: #219653;
}

.remark-text {
    font-size: 14px;
    color: #9b59b6;
    margin: 3px 0 0 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
    display: block;
    position: absolute;
    bottom: -20px;
    left: 0;
}

.amount-wrapper {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.amount-text {
    font-weight: 900;
    text-align: left;
    max-width: calc(100% - 30px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.main-all-happy .amount-wrapper{
    color: #8B0000;
}

.amount-unit {
    font-size: 16px;
    font-weight: 900;
    text-align: right;
}

.uppercase-text {
    font-size: 14px;
    color: #7f8c8d;
    text-align: left;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 4px;
}

.main-all-happy .uppercase-text {
    color: #8B0000;
    font-weight: 900;
}

.main-all-happy .method-text {
    color: #8B0000;
}

.method-text {
    font-size: 14px;
    color: #34495e;
    text-align: right;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wechat-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('wechat.svg') no-repeat center center;
    background-size: contain;
    vertical-align: middle;
    margin-right: 5px;
}

.cash-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('cash.svg') no-repeat center center;
    background-size: contain;
    vertical-align: middle;
    margin-right: 5px;
}

.alipay-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('alipay.svg') no-repeat center center;
    background-size: contain;
    vertical-align: middle;
    margin-right: 5px;
}

.empty-tip {
    text-align: center;
    font-size: 24px;
    color: #bdc3c7;
    padding: 80px 0;
    width: 100%;
}

.col-method span {
    margin-right: 2px;
    font-size: 1em;
}

.modal-overlay {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

/* 标题修改弹窗层级更高 */
#titleModal {
    z-index: 99999;
}

.modal {
    background: #FFF8F8;
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.3);
    margin: 20px auto;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* 云存储码/云恢复弹窗（移动端） */
.modal-content {
    background: #FFF8F8;
    border: 2px solid #FFD700;
    border-radius: 12px;
    padding: 18px;
    width: 92%;
    max-width: 420px;
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.25);
    box-sizing: border-box;
    position: relative;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #D81F26;
    font-weight: 700;
}

.close-btn {
    border: none;
    background: transparent;
    color: #666;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    width: 28px;
    height: 28px;
}

.modal-body {
    margin-bottom: 14px;
}

.modal-body p {
    margin: 8px 0;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.modal-footer {
    display: flex;
    gap: 10px;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    cursor: pointer;
    padding: 10px 20px;
}

.btn-primary {
    background: #D81F26;
    color: #fff;
}

.btn-secondary {
    background: #f3f4f6;
    color: #333;
    border-color: #d1d5db;
}

.cloud-code-info {
    margin: 10px 0 4px;
}

.modal-ledger-link-url {
    font-size: 13px;
    font-weight: 500;
    color: #0369a1;
    background-color: #f0f9ff;
    padding: 10px 12px;
    border-radius: 8px;
    word-break: break-all;
    line-height: 1.45;
    border: 1px solid #bae6fd;
    margin: 0;
}

.modal-ledger-link-inline {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin: 6px 0 12px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #0369a1;
    background-color: #f0f9ff;
    border-radius: 8px;
    border: 1px solid #bae6fd;
    line-height: 1.35;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.modal-ledger-link-url-text {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
}

.modal-ledger-link-inline .ledger-link-modal-copy {
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.2;
}

.modal-footer--single {
    justify-content: flex-end;
}

.modal-footer--single .btn-secondary {
    flex: 0 0 auto;
    min-width: 100px;
}

#modalStorageCode {
    font-family: monospace;
    font-weight: 700;
    color: #059669;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.form-input {
    width: 100%;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.12);
}

.error-message {
    margin-top: 6px;
    font-size: 13px;
}
.cloud-restore-preview {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #f3d2d2;
    background: #fff7f7;
}
.cloud-restore-preview-title {
    font-size: 13px;
    font-weight: 700;
    color: #a30000;
    margin-bottom: 6px;
}
.cloud-restore-preview p {
    margin: 5px 0;
    color: #333;
    font-size: 13px;
}
.cloud-restore-preview-tip {
    margin-top: 6px;
    color: #7a0000;
    font-size: 12px;
}

.mobile-qr-host {
    display: inline-block;
    margin: 8px auto;
    line-height: 0;
    width: 100%;
    text-align: center;
}
.mobile-qr-host table {
    margin: 0 auto;
}
.mobile-qr-host img {
    display: block;
    margin: 0 auto;
}
.mobile-qr-url-text {
    margin: 10px 0 0;
    font-size: 12px;
    color: #333;
    word-break: break-all;
}
.mobile-qr-fallback {
    margin-top: 8px;
    color: #666;
    font-size: 12px;
}

.cloud-collab-method-selector {
    margin-bottom: 10px;
}
.cloud-collab-method-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}
.cloud-collab-method-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.cloud-collab-method-btn {
    width: 100%;
    text-align: left;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cloud-collab-method-btn.is-active {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #166534;
}
.cloud-collab-method-btn.is-active::after {
    content: "已选择";
    font-size: 12px;
    color: #16a34a;
    font-weight: 600;
}
.cloud-collab-panel {
    margin-bottom: 10px;
}
.cloud-collab-tip {
    margin: 0 0 8px;
    color: #555;
    font-size: 12px;
    line-height: 1.45;
}
.collaborate-share-success {
    margin: 0 0 8px;
    color: #16a34a;
    font-size: 12px;
}

.modal-title {
    font-size: 24px;
    color: #D32F2F;
    text-align: center;
    margin-bottom: 20px;
    font-weight: normal;
}

.amount-uppercase-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.amount-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.uppercase-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.modal-form-group {
    width: 100%;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.modal-label {
    font-size: 16px;
    color: #D32F2F;
    font-weight: normal;
    margin-bottom: 15px;
    display: block;
    text-align: left;
}

.underline-input {
    height: 50px;
    font-size: 24px;
    font-weight: 900;
    border: none;
    border-bottom: 2px solid #D32F2F;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: #D32F2F;
    letter-spacing: 1px;
    autocomplete: off;
    autocorrect: off;
    autocapitalize: off;
    spellcheck: false;
    width: 100%;
    box-sizing: border-box;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.fullscreen-name-display {
    font-size: 60px;
    font-weight: 900;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 2px;
    width: 100%;
    min-height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.main-all-happy .fullscreen-name-display{
color: #D32F2F;
}

.main-all-happy .fullscreen-input {
    color: #D32F2F;
    border-bottom: 8px solid #D32F2F;
    caret-color: #D32F2F;
}

.fullscreen-input-tip {
    font-size: 30px;
    color: #D32F2F;
    margin-top: 40px;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

/* 手机端只显示手机提示 */
.mobile-tip {
    display: block;
}

.desktop-tip {
    display: none;
}

/* 电脑端只显示电脑提示 */
@media (min-width: 768px) {
    .mobile-tip {
        display: none;
    }
    
    .desktop-tip {
        display: block;
    }
}

/* 喜事风格 - 全屏输入提示文字 */
.main-all-happy .fullscreen-input-tip {
    color: #D32F2F;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.underline-input:focus {
    border-color: #27ae60;
}

#modalAmount,
#editModalAmount {
    max: 999999.99;
}

.uppercase-display {
    height: 50px;
    line-height: 50px;
    font-size: 24px;
    font-weight: 900;
    color: #D32F2F;
    display: flex;
    align-items: flex-end;
    border-bottom: 2px solid #D32F2F;
    width: 100%;
    box-sizing: border-box;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.modal-payment {
    display: flex;
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 5px;
    flex-wrap: nowrap;
}

.modal-payment-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    outline: none;
    padding: 5px 10px;
    border-radius: 6px;
}

.modal-payment-item:focus-within,
.modal-payment-item.active {
    outline: 2px solid #3498db;
    outline-offset: -2px;
    border-radius: 6px;
}

.modal-payment-item input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.modal-payment-item span {
    font-size: 20px;
    color: #D32F2F;
}

/* 账本风格选择 */
.modal-style-select {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 5px;
    flex-wrap: nowrap;
}

.style-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    outline: none;
    padding: 5px 10px;
    border-radius: 6px;
}

.style-item:focus-within, .style-item.active {
    outline: 2px solid #3498db;
    outline-offset: -2px;
    border-radius: 6px;
}

.style-item input {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.style-item span {
    font-size: 16px;
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 15px;
}

.modal-btn {
    flex: 1;
    height: 50px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-weight: normal;
    outline: none;
}

.modal-btn:focus {
    outline: 2px solid #3498db;
}

.confirm-btn {
    background-color: #27ae60;
}

.cancel-btn {
    background-color: #e74c3c;
}

.manage-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: 20px auto;
    box-sizing: border-box;
    overflow: hidden;
}

.manage-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: normal;
}

.manage-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.cont-scv {
    font-size: 16px;
}

.manage-btn-option {
    flex: 1;
    height: 50px;
    font-size: 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    font-weight: normal;
}

.export-btn {
    background-color: #3498db;
}

.clear-btn {
    background-color: #e74c3c;
}

.stat-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: 20px auto;
    box-sizing: border-box;
    overflow: hidden;
}

.stat-modal-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: normal;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
}

.stat-card:nth-child(1),
.stat-card:nth-child(2) {
    grid-column: span 2;
}

.stat-card:nth-child(3){
    display: none;
}

.stat-card:nth-child(4),
.stat-card:nth-child(5),
.stat-card:nth-child(6) {
    grid-column: span 1;
}

.stat-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    padding: 20px 15px;
    border-radius: 12px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.stat-label {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.stat-value {
    font-size: 18px;
    color: #2c3e50;
    font-weight: normal;
    letter-spacing: 1px;
    width: 100%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-title-modal {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: 20px auto;
    box-sizing: border-box;
    overflow-y: auto;
    max-height: 90vh;
}

/* 搜索框容器：和姓名表头对齐，一体化设计 */
.name-search-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
    width: 120px;
}

/* 搜索输入框核心样式 */
.name-search-input {
    width: 100%;
    height: 28px;
    padding: 0 25px 0 10px;
    border: 1px solid #e0e0e0;
    border-radius: 14px;
    font-size: 12px;
    color: #333;
    background: #f8f9fa;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* 聚焦态：高亮边框+背景+阴影 */
.name-search-input:focus {
    border-color: #409eff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1);
}

/* 空值态：提示文字样式 */
.name-search-input::placeholder {
    color: #999;
    font-size: 11px;
}

/* 清除按钮：默认隐藏，有内容时显示 */
.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    line-height: 12px;
    text-align: center;
    font-size: 12px;
    color: #999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0;
}

/* 有内容时显示清除按钮 */
.search-input:not(:placeholder-shown)+.search-clear-btn {
    opacity: 1;
}

/* 清除按钮 hover 态：变色+放大 */
.search-clear-btn:hover {
    color: #409eff;
    transform: translateY(-50%) scale(1.1);
}

/* 配合表头的整体样式优化 */
.record-header .col-name {
    display: flex;
    align-items: center;
    padding-left: 15px;
    width: 40%;
}

.color-red {
    color: #e74c3c;
}

.tips {
    color: #3498db;
    font-size: 12px;
}

.hide {
    display: none !important;
}

#recordListContent {
    width: 100%;
    background: white;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
    overflow: hidden;
    position: relative;
    overflow-y: auto;
    max-height:calc(100vh - 270px);
}



/* 1. Chrome/Safari/Edge 等 Webkit 内核浏览器 */
.main-all-happy #recordListContent::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

/* 滚动条轨道 */
.main-all-happy #recordListContent::-webkit-scrollbar-track {
    background: #FFFAFA;
    border-radius: 2px;
}

/* 滚动条滑块 */
.main-all-happy #recordListContent::-webkit-scrollbar-thumb {
    background: #D81F26;
    border-radius: 2px;
    transition: background 0.2s ease;
}

/* 滑块hover效果 */
.main-all-happy #recordListContent::-webkit-scrollbar-thumb:hover {
    background: #8B0000;
}

/* 2. Firefox 浏览器（适配方式） */
.main-all-happy #recordListContent {
    scrollbar-width: thin;
    scrollbar-color: #D81F26 #FFFAFA;
}

/* 3. IE/Edge 旧版本（兜底兼容，已基本淘汰） */
.main-all-happy #recordListContent {
    -ms-overflow-style: -ms-autohiding-scrollbar;
    scrollbar-width: 4px;
}

/* 打赏和全屏按钮容器 */
.reward-fullscreen-container {
    display: flex;
    gap: 8px;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 999;
    align-items: center;
    justify-content: flex-start;
}

/* 打赏按钮 */
.reward-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #D81F26;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.reward-btn:hover {
    background-color: #8B0000;
}

/* 全屏按钮 */
.fullscreen-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #D81F26;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.fullscreen-btn:hover {
    background-color: #8B0000;
}

/* 奠事风格按钮颜色 */
.main-all-funeral .reward-btn {
    background-color: #666666;
}

.main-all-funeral .reward-btn:hover {
    background-color: #444444;
}

.main-all-funeral .fullscreen-btn {
    background-color: #888888;
}

.main-all-funeral .fullscreen-btn:hover {
    background-color: #666666;
}

/* Emoji 样式 */
.emoji {
    font-size: 16px;
    line-height: 1;
}

/* 奠事风格核心样式（对应 .main-all-happy） */
.main-all-funeral {
    background: #F5F5F5 url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23333333' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: #333333;
    font-family: "SimHei", "Microsoft Yahei", "STSong", serif;
}

/* 奠事风格 - 全局按钮样式（替代喜庆红） */
.main-all-funeral .main-btn {
    background: linear-gradient(135deg, #666666, #444444);
    color: #FFFFFF;
    border: 1px solid #999999;
    box-shadow: 0 2px 0 #333333;
}

.main-all-funeral .main-btn:hover {
    background: linear-gradient(135deg, #777777, #555555);
    box-shadow: 0 3px 0 #333333;
}

.main-all-funeral .main-btn:active {
    box-shadow: 0 1px 0 #333333;
}



.main-all-funeral .modal-title {
    color: #222222;
}

.main-all-funeral .modal-label {
    color: #444444;
}

.main-all-funeral .underline-input {
    border-bottom: 2px solid #444444;
    color: #444444;
}

.main-all-funeral .uppercase-display {
    color: #444444;
    border-bottom: 2px solid #444444;
}

.main-all-funeral .modal-payment-item span {
    color: #444444;
}

/* 确保奠事风格下支付方式水平排列 */
.main-all-funeral .modal-payment {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 5px;
}

.main-all-funeral .confirm-btn {
    background: #444444;
    color: #FFFFFF;
    border-color: #666666;
}

.main-all-funeral .confirm-btn:hover {
    background: #555555;
}

.main-all-funeral .cancel-btn {
    background: #F8F8F8;
    color: #444444;
    border-color: #999999;
}

.main-all-funeral .cancel-btn:hover {
    background: #F0F0F0;
}

/* 奠事风格 - 支付方式选项（替代喜庆红选中态） */
.main-all-funeral .modal-payment-item {
    border-color: #DDDDDD;
    color: #444444;
}

.main-all-funeral .modal-payment-item.active {
    border-color: #666666;
    background-color: #F8F8F8;
    color: #222222;
}

.main-all-funeral .modal-payment-item:hover {
    border-color: #444444;
    background-color: #F0F0F0;
}

/* 奠事风格 - 账本标题/副标题 */
.main-all-funeral .main-title {
    color: #222222;
    text-shadow: 1px 1px 0 #E0E0E0, 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.main-all-funeral .main-title::before,
.main-all-funeral .main-title::after {
    content: "◆";
    color: #666666;
    font-size: 18px;
    margin: 0 10px;
}

.main-all-funeral .subtitle {
    color: #555555;
}

/* 奠事风格 - 记录列表样式 */
.main-all-funeral .record-header {
    background: linear-gradient(90deg, #444444, #666666);
    color: #FFFFFF;
    border-bottom: 2px solid #999999;
}

.main-all-funeral .record-item {
    border-bottom: 1px solid #DDDDDD;
}

.main-all-funeral .record-item:nth-child(even) {
    background-color: #F8F8F8;
}

.main-all-funeral .record-item:hover {
    background-color: #F0F0F0;
}

/* 奠事风格 - 金额样式（替代喜庆红） */
.main-all-funeral .amount-text {
    color: #222222;
}

.main-all-funeral .amount-unit,
.main-all-funeral .record-row .amount-text,
.main-all-funeral .record-row .amount-unit {
    color: #222222;
}

.main-all-funeral .uppercase-text {
    color: #555555;
}

/* 奠事风格 - 统计卡片样式 */
.main-all-funeral .stat-card {
    background: #FFFFFF;
    border: 1px solid #DDDDDD;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-all-funeral .stat-label {
    color: #555555;
}

.main-all-funeral .stat-label.color-red {
    color: #222222;
}

.main-all-funeral .stat-value {
    color: #333333;
}

.main-all-funeral .name-search-input::placeholder {
    color: #888888;
}

/* 奠事风格 - 备注弹窗样式 */
.main-all-funeral .remark-pop {
    background: #FFFFFF;
    border: 1px solid #666666;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.main-all-funeral .remark-input {
    border-color: #999999;
    color: #333333;
}

.main-all-funeral .remark-confirm-btn {
    background: #444444;
    color: #FFFFFF;
    border-color: #666666;
}

/* 奠事风格 - 导出成功弹窗 */
.main-all-funeral .success-modal-content {
    background: #FFFFFF;
    border: 1px solid #666666;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.main-all-funeral .success-title {
    color: #222222;
}

.main-all-funeral .success-desc {
    color: #555555;
}

.main-all-funeral .success-confirm-btn {
    background: #444444;
    color: #FFFFFF;
    border-color: #666666;
}

/* 奠事风格 - 全屏输入样式 */
.main-all-funeral .fullscreen-input-wrapper {
    background: #000000;
}

.main-all-funeral .fullscreen-input {
    border-color: #666666;
    color: #fff;
    border-bottom: 8px solid #Fff;
    caret-color: #fff;
}

.main-all-funeral .fullscreen-input-label,
.main-all-funeral .fullscreen-name-display,
.main-all-funeral .fullscreen-input-tip {
    color: #FFFFFF;
}




/* 半屏输入界面 */
/* 半屏输入界面遮罩 */
.fullscreen-input-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

/* 底部功能区域 */
.bottom-menu {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #FFF8F8, #FFF0F0);
    display: grid;
    grid-template-columns:repeat(3,1fr);    align-items: center;
    grid-gap: 15px;
    box-sizing: border-box;
    border-top: 3px solid #FFD700;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    margin-top: 20px;
    padding: 15px;
}

.bottom-menu-item {
    margin: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bottom-menu .main-btn {
    width: 100%;
    padding: 14px 10px;
    font-size: 15px;
    font-weight: normal;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #D32F2F, #C62828);
    color: white;
    border: 2px solid #FFD700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    height: auto;
    line-height: 1.2;
    display: block;
    white-space: normal;
    word-wrap: break-word;
}

.bottom-menu .main-btn:hover {
    background: linear-gradient(135deg, #C62828, #B71C1C);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
    border-color: #FFC107;
}

.bottom-menu .main-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    border-color: #FFD700;
}

/* 为不同类型的按钮添加不同的颜色 */
.bottom-menu .main-btn.add-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.bottom-menu .main-btn.add-btn:hover {
    background: linear-gradient(135deg, #45a049, #3d8b40);
}

.bottom-menu .main-btn.manage-btn {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.bottom-menu .main-btn.manage-btn:hover {
    background: linear-gradient(135deg, #1976D2, #1565C0);
}

.bottom-menu .main-btn.stat-btn {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.bottom-menu .main-btn.stat-btn:hover {
    background: linear-gradient(135deg, #F57C00, #E65100);
}

.bottom-menu .main-btn.tips-btn {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.bottom-menu .main-btn.tips-btn:hover {
    background: linear-gradient(135deg, #7B1FA2, #6A1B9A);
}

/* 半屏输入界面 */
.fullscreen-input-wrapper.half-screen {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 90vh;
    background-color: #FFF8F8;
    z-index: 9999;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 20px 60px;
    box-sizing: border-box;
    border-top: 2px solid #FFD700;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

/* 输入界面头部 */
.fullscreen-input-header {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

/* 关闭按钮 */
.fullscreen-input-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #D32F2F;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 奠事风格关闭按钮 */
.main-all-funeral .fullscreen-input-close {
    color: #FFFFFF;
}

/* 按钮容器 */
.fullscreen-input-buttons {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* 取消按钮 */
.fullscreen-input-btn.cancel-btn {
    background: #999999;
    border: 2px solid #666666;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fullscreen-input-btn.cancel-btn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.main-all-funeral .fullscreen-input-btn.cancel-btn {
    background: #666666;
    border: 2px solid #999999;
}

.main-all-funeral .bottom-menu {
    background: #000000;
    border-top: 2px solid #666666;
}

.main-all-funeral .bottom-menu .main-btn {
    background: #444444;
    border: 1px solid #666666;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.main-all-funeral .bottom-menu .main-btn:hover {
    background: #555555;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.main-all-funeral .fullscreen-input-wrapper.half-screen {
    background: #000000;
    border-top: 2px solid #666666;
    border-bottom: 2px solid #666666;
}

.fullscreen-name-display {
    font-size: 40px;
    font-weight: normal;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 2px;
    width: 100%;
    min-height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.fullscreen-input-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
}

.fullscreen-input-label {
    position: absolute;
    left: 0;
    bottom: 15px;
    font-size: 16px;
    color: #D32F2F;
    font-weight: normal;
    letter-spacing: 4px;
    z-index: 10;
}

.fullscreen-input {
    width: 100%;
    height: 15vh;
    font-size: 60px !important;
    font-weight: normal;
    text-align: center;
    border: none;
    outline: none;
    letter-spacing: 8px;
    background: transparent;
    padding: 0 0 0 10px;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.fullscreen-input-tip {
    font-size: 20px;
    color: #D32F2F;
    margin-top: 20px;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.fullscreen-input-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #D32F2F, #C62828);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 18px;
    font-weight: normal;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.4);
    transition: all 0.3s ease;
    border: 2px solid #FFD700;
}

.fullscreen-input-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(211, 47, 47, 0.6);
}

.main-all-funeral .fullscreen-input-btn {
    background: linear-gradient(135deg, #444444, #666666);
    border: 2px solid #999999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.main-all-funeral .fullscreen-input-btn:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}

/* 奠事风格 - 滚动条样式（匹配整体色调） */
.main-all-funeral ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.main-all-funeral ::-webkit-scrollbar-track {
    background: #F8F8F8;
    border-radius: 2px;
}

.main-all-funeral ::-webkit-scrollbar-thumb {
    background: #666666;
    border-radius: 2px;
}

.main-all-funeral ::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

.main-all-funeral {
    scrollbar-width: thin;
    scrollbar-color: #666666 #F8F8F8;
}

#emptyRow {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    color: #bdc3c7;
    min-height: 80px;
    align-items: center;
}

#emptyRow>div {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#emptyRow .col-name {
    width: 40%;
    padding-left: 15px !important;
}

#emptyRow .col-amount {
    width: 35%;
    padding-left: 15px !important;
}

#emptyRow .col-method {
    width: 25%;
}

/* 账本管理弹窗整体样式 */
#ledgerModal .modal {
    width: 90%;
    max-width: 90%;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
}

/* 账本弹窗标题栏 */
#ledgerModal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

#ledgerModal .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: normal;
    color: #1f2937;
}

#ledgerModal .ledger-modal-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f5f5f5;
    display: flex;
    justify-content: flex-end;
}

/* 账本列表容器 */
#ledgerList {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding: 5px;
}

/* 账本项样式（大气版） */
.ledger-item {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
    cursor: pointer;
}

/* 账本内容区域 */
.ledger-content {
    width: 100%;
    margin-bottom: 8px;
}
.ledger-content small{font-size: 10px;}
.ledger-item {
    transition: all 0.3s ease;
}

.ledger-item:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ledger-item.active {
    background: linear-gradient(135deg, #edfff6, #f0fdf4);
    border-color: #43e97b;
    box-shadow: 0 2px 8px rgba(67, 233, 123, 0.2);
    padding-left: 20px;
}

.ledger-item.active::before {
    content: '✓';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    background: #27ae60;
    color: white;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: normal;
    z-index: 1;
}

.ledger-item.active .ledger-name {
    color: #059669;
    font-weight: normal;
}

.ledger-item.active .ledger-switch{
    background: linear-gradient(135deg, #27ae60, #1e854a);
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.4);
    transform: scale(1.05);
}

/* 账本名称区域 */
.ledger-name {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
    font-weight: normal;
    transition: all 0.3s ease;
}

.ledger-name small {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    margin-top: 4px;
    display: block;
}

/* 同步状态区域（人情管理：同一行） */
.ledger-sync-status.ledger-sync-status--compact {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 3px 5px;
    margin: 6px 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ledger-sync-status--compact .sync-status-tag {
    flex-shrink: 0;
}

.ledger-sync-inline-sep {
    color: #94a3b8;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 11px;
}

.ledger-sync-expiry-inline {
    font-size: 10px;
    color: #475569;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.ledger-sync-backup-inline {
    font-size: 10px;
    color: #b45309;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 同步状态标签 */
.sync-status-tag {
    display: inline-block;
    padding: 3px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 500;
}

/* 已同步状态 */
.sync-status-synced {
    background-color: rgba(22, 163, 74, 0.18);
    color: #15803d;
    border: 1px dashed rgba(22, 163, 74, 0.42);
}

/* 未同步状态 */
.sync-status-unsynced {
    background-color: rgba(153, 153, 153, 0.2);
    color: #999;
}

/* 最后同步时间 */
.sync-time {
    font-size: 10px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 50px;
}

.ledger-link-btn {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    margin-left: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #0369a1;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(3, 105, 161, 0.35);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.ledger-link-btn:active {
    opacity: 0.9;
}

.ledger-sync-expiry {
    font-size: 10px;
    color: #64748b;
    display: inline;
    margin-left: 4px;
    line-height: 1.3;
    white-space: normal;
}

.ledger-item.active .ledger-name small {
    color: #059669;
}

/* 账本操作按钮组 */
.ledger-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* 切换账本按钮 */
.ledger-switch {
    padding: 4px;
    background: #333;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 32px;
}

/* 导出账本按钮 */
.ledger-export {
    padding: 4px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 32px;
}

/* 修改账本按钮 */
.ledger-edit {
    padding: 4px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 32px;
}

/* 删除账本按钮 */
.ledger-delete {
    padding: 4px;
    background: #F44336;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 32px;
}

.ledger-item.active .ledger-switch {
    cursor: default;
}

.ledger-switch:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
}

.ledger-export:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

/* 人情管理：协作链接（与导出区分，仅图标） */
.ledger-invite-link-btn {
    padding: 4px 8px;
    min-width: 36px;
    background: linear-gradient(135deg, #0d9488, #0f766e);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.ledger-invite-link-btn:hover {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.35);
}

.ledger-edit:hover {
    background: #388E3C;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.ledger-delete:hover {
    background: #D32F2F;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.ledger-item.active .ledger-delete {
    background: #ef4444;
    cursor: pointer;
    opacity: 1;
}

.ledger-item.active .ledger-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

/* 空账本提示 */
.empty-tip {
    text-align: center;
    color: #9ca3af;
    font-size: 16px;
    padding: 40px 20px;
}

/* 新建账本按钮 */
#createLedgerBtn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #D32F2F, #C62828);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
    border: 1px solid #FFD700;
}

#createLedgerBtn:hover {
    background: linear-gradient(135deg, #C62828, #B71C1C);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(211, 47, 47, 0.4);
    border-color: #FFED4E;
}

#createLedgerBtn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(211, 47, 47, 0.3);
}

/* 账本创建弹窗样式（配套大气版） */
#ledgerInitModal .modal {
    width: 90%;
    max-width: 90%;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #f0f0f0;
}

#ledgerInitModal .modal-header h3 {
    font-size: 18px;
    font-weight: normal;
    color: #1f2937;
    margin-bottom: 15px;
}

#ledgerTitle,
#ledgerRemark {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

/* 导出成功弹窗样式 */
.export-success-modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

.success-modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    border: 2px solid #FFD700;
}

.success-title {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: normal;
}

.success-icon {
    margin-right: 10px;
}

.success-desc {
    font-size: 16px;
    line-height: 2;
    margin-bottom: 30px;
    text-align: left;
}

.success-desc p {
    margin-bottom: 10px;
}

.success-confirm-btn {
    height: 50px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s ease;
    padding: 0 30px;
    font-weight: normal;
}

.success-confirm-btn:hover {
    background-color: #219653;
}

.success-confirm-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 通用提示弹窗（showAlert）——手机端原先未定义样式，叠在人情管理等 z-index:9999 弹窗下会看不见 */
.alert-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100010;
    padding: 16px;
    box-sizing: border-box;
}

.alert-modal {
    background: #fff;
    border-radius: 14px;
    padding: 22px 20px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.25);
}

.alert-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #D81F26;
    margin-bottom: 14px;
}

.alert-modal-content {
    font-size: 15px;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.55;
}

.alert-modal-buttons {
    display: flex;
    justify-content: center;
}

.alert-modal-btn {
    min-width: 120px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #D81F26, #9E0000);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid #ffd700;
}

.main-all-funeral .alert-modal-title {
    color: #333;
}

.main-all-funeral .alert-modal-btn {
    background: linear-gradient(135deg, #555, #333);
    border-color: #999;
}

#ledgerLockModal {
    z-index: 100020;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.ledger-lock-modal {
    max-width: 420px;
    width: 100%;
    padding: 22px 18px;
    text-align: left;
}
.ledger-lock-modal .modal-title {
    text-align: center;
    font-size: 18px;
    margin-bottom: 10px;
}
.ledger-lock-modal-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
    margin: 0 0 12px;
}
.ledger-lock-input {
    letter-spacing: 4px;
    font-size: 18px;
    text-align: center;
    margin-top: 8px;
}
.ledger-pin-block {
    margin-top: 12px;
}
.ledger-pin-block-label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    text-align: left;
}
.ledger-pin-row {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.ledger-pin-box {
    flex: 1;
    min-width: 0;
    max-width: 48px;
    height: 48px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border: 1px solid #e0d6cc;
    border-radius: 8px;
    background: #fafafa;
    color: #222;
    outline: none;
    caret-color: #c41e3a;
}
.ledger-pin-box:focus {
    background: #fff;
    border-color: #c41e3a;
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.16);
}
.ledger-pin-box.is-filled {
    background: #fff;
    border-color: #c41e3a;
}
.main-all-funeral .ledger-pin-box {
    caret-color: #333;
}
.main-all-funeral .ledger-pin-box:focus,
.main-all-funeral .ledger-pin-box.is-filled {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.ledger-lock-create-fields {
    display: none;
    text-align: left;
}
.custom-title-modal .modal-buttons {
    flex-wrap: wrap;
    gap: 10px;
}
.ledger-lock-create-fields .ledger-lock-input {
    margin-top: 10px;
}
.ledger-lock-create-tip {
    text-align: left;
    font-size: 12px;
    line-height: 1.6;
    color: #666;
    background: #fff9f5;
    border-left: 3px solid #c41e3a;
    padding: 8px 10px;
    border-radius: 8px;
    margin: 8px 0 4px;
}
.ledger-lock-create-status {
    min-height: 22px;
    margin: 8px 0 2px;
    line-height: 22px;
    font-size: 13px;
    text-align: left;
}
.ledger-lock-create-status .ledger-lock-error {
    min-width: 0;
}
.ledger-lock-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 22px;
    margin: 10px 0 6px;
    line-height: 22px;
    font-size: 13px;
}
.ledger-lock-error {
    flex: 0 1 auto;
    min-width: 4.5em;
    color: #c41e3a;
    margin: 0;
    visibility: hidden;
}
.ledger-lock-error.is-on {
    visibility: visible;
}
.ledger-lock-error.is-busy {
    color: #888;
}
.ledger-lock-hint-line {
    flex: 1 1 auto;
    margin: 0;
    text-align: right;
    color: #666;
    visibility: hidden;
}
.ledger-lock-hint-line.is-on {
    visibility: visible;
}
.ledger-lock-modal-buttons {
    justify-content: center;
}
.ledger-lock-modal-buttons .confirm-btn[hidden] {
    display: none !important;
}
.ledger-lock-modal-buttons .cancel-btn {
    flex: 1 1 auto;
    height: 44px;
    font-size: 16px;
}
.custom-title-modal {
    max-height: 90vh;
    overflow-y: auto;
}

/* 账本切换提示：与桌面端一致，.show 为 display:flex */
.ledger-switch-tip {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.ledger-switch-tip.show {
    display: flex;
}
.ledger-switch-tip__panel {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: min(360px, 90vw);
    padding: 16px 20px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.ledger-switch-tip--busy .ledger-switch-tip__panel {
    background: linear-gradient(145deg, #1e3a5f 0%, #0f2744 100%);
    color: #e8f4ff;
}
.ledger-switch-tip--done .ledger-switch-tip__panel {
    background: linear-gradient(145deg, #0d9488 0%, #0f766e 100%);
    color: #fff;
}
.ledger-switch-tip__spinner {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2.5px solid rgba(255, 255, 255, 0.28);
    border-top-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    animation: ledger-switch-spin 0.7s linear infinite;
}
.ledger-switch-tip--done .ledger-switch-tip__spinner {
    display: none;
}

@keyframes ledger-switch-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 切换中列表蒙层（与 css.css 一致） */
.record-list-loading {
    pointer-events: none;
    filter: saturate(0.92) brightness(0.96);
    transition: filter 0.25s ease;
}
.record-list-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.42);
    pointer-events: none;
}

/* 存储空间状态条 */
.storage-status-bar {
    position: relative;
    width: 100%;
    background: white;
    padding: 8px 15px;
    z-index: 50;
}

.storage-status-content {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
    height: 36px;
}

.storage-status-text {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.storage-status-progress {
    flex: 1;
    height: 36px;
    background: #f0f0f0;
    overflow: hidden;
    min-width: 120px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 8px;
    justify-content: end;
    border-radius: 18px;
    border: 1px solid #e0e0e0;
}

.storage-status-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    transition: width 0.3s ease;
    z-index: 1;
}

.renqing-shengyu {
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* 存储空间管理弹窗样式 */
.storage-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    align-items: center;
}

.storage-label {
    font-size: 14px;
    color: #666;
}

.storage-value {
    font-size: 14px;
    font-weight: normal;
}

.storage-progress {
    width: 100%;
    height: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    margin: 20px 0;
}

.storage-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.storage-tips {
    margin-top: 20px;
    font-size: 16px;
    line-height:2;
    color: #666;
    text-align: left;
}

.storage-tips .color-red {
    color: #e74c3c;
}


/* APP布局样式 */
/* APP容器 */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: #ffffff;
    /* 安全区底部（不会被手势条挡住） */
    padding-bottom: env(safe-area-inset-bottom);
    padding-bottom: constant(safe-area-inset-bottom);
}

/* 顶部导航栏 */
.app-header {
    background: linear-gradient(135deg, #D81F26, #9E0000);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: 'AlimamaDongFangDaKai', "楷体", KaiTi, "Kaiti SC", serif;
}

.reward-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 101;
}

.reward-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reward-icon {
    height: 16px;
    filter: brightness(0) invert(1);
}

.reward-btn:hover {
    background-color: white;
    color: #D81F26;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.reward-btn:hover .reward-icon {
    filter: brightness(0) saturate(100%) invert(31%) sepia(96%) saturate(7478%) hue-rotate(355deg) brightness(97%) contrast(123%);
}

.app-title {
    font-size: 30px;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.app-subtitle {
    font-size: 14px;
    margin: 5px 0 0 0;
    opacity: 0.9;
}

/* 搜索和存储空间容器 */
.search-storage-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 50;
}

/* 搜索栏 */
.search-bar {
    flex: 1;
    position: relative;
}

.storage-status-bar {
    flex: 1;
    position: relative;
    background: transparent;
    padding: 0;
    z-index: 50;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    font-size: 13px;
    outline: none;
    transition: all 0.3s ease;
    height: 36px;
}

.search-input:focus {
    border-color: #D81F26;
    box-shadow: 0 0 0 2px rgba(216, 31, 38, 0.1);
}

.search-clear-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 100;
    background-color: white;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

/* 有内容时显示清除按钮 */
.search-input:not(:placeholder-shown)+.search-clear-btn {
    opacity: 1;
}

.search-clear-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* 主内容区域 */
.app-main {
    flex: 1;
    margin-top: 2px;
}

/* 记录列表 */
.record-list {
    background-color: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.record-header {
    display: none; /* 隐藏表头 */
}

#recordListContent {
    flex: 1;
    overflow-y: auto;
}

/* 数据行改为块状显示 */
.record-row {
    background-color: #FFFAFA;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;

}

.record-row:nth-child(even) {
    background-color: #FFF5EE;
}

.record-row:hover {
    background-color: #FFEEEE;
    transform: scale(1.005);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.record-row .row-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    padding-bottom: 5px;
}

.record-row .name-section,
.record-row .amount-section {
    flex: 1;
}

.record-row .name-section,
.record-row .method-section,
.record-row .name-container {
    display: flex;
    align-items: center;
}

.record-row .name-section {
    gap: 8px;
    min-width: 120px;
}

.record-row .amount-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 100px;
    align-items: flex-end;
}

.record-row .method-section {
    min-width: 50px;
    font-size: 14px;
    color: #666;
    background-color: #e8f4f8;
    padding: 4px 12px;
    border-radius: 12px;
}

.record-row .name-container {
    gap: 10px;
    width: 100%;
}

.record-row .amount-wrapper {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.record-row .amount-text,
.record-row .amount-unit {
    color: #D81F26;
}

.record-row .amount-text {
    font-size: 28px;
}

/* 空记录行样式 */
.empty-record-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
    text-align: center;
}

.empty-record-row .col-name {
    font-size: 16px;
    margin-bottom: 10px;
}

.empty-record-row .col-amount,
.empty-record-row .col-method {
    display: none;
}

/* 底部导航栏 */
.app-footer {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: white;
    border-top: 1px solid #e0e0e0;
    padding: 15px 0;
    z-index: 100;
    position: relative;
    min-height: 80px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.footer-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.footer-btn:hover {
    color: #D81F26;
}

.footer-icon {
    font-size: 20px;
    margin-bottom: 3px;
}

.footer-text {
    font-size: 12px;
}

/* 仅 m.html：隐藏用于触发弹窗的占位按钮（与 index 同 ID） */
.h5page-screen-reader-triggers {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

.h5page-screen-reader-triggers button {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

/* 底部「更多」半屏菜单（抽屉：根节点常驻 flex，避免 display:none 导致无过渡） */
.mobile-more-root {
    position: fixed;
    inset: 0;
    z-index: 5500;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.mobile-more-root.is-open {
    pointer-events: auto;
}

.mobile-more-backdrop {
    flex: 1 1 auto;
    min-height: 0;
    background: rgba(0, 0, 0, 0.48);
    opacity: 0;
    transition: opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-more-root.is-open .mobile-more-backdrop {
    opacity: 1;
}

.mobile-more-panel {
    flex: 0 0 50vh;
    max-height: 50vh;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 -10px 36px rgba(0, 0, 0, 0.14);
    padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    transform: translate3d(0, 100%, 0);
    transition:
        transform 0.46s cubic-bezier(0.32, 0.72, 0, 1),
        box-shadow 0.46s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.mobile-more-root.is-open .mobile-more-panel {
    transform: translate3d(0, 0, 0);
}

.mobile-more-panel__handle {
    width: 60px;
    height: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, #e8e8e8, #f2f2f2, #e8e8e8);
    margin: 12px auto 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.mobile-more-panel__head {
    display: flex;
    align-items: center;
    justify-content: end;
    padding: 4px 16px 14px;
    border-bottom: 1px solid #eee;
}

.mobile-more-panel__title {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.02em;
}

.mobile-more-panel__close {
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: #888;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    margin-top: -20px;
}

.mobile-more-panel__close:active {
    background: rgba(0, 0, 0, 0.06);
}

.mobile-more-panel__list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}
.mobile-more-panel__list .txts {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.mobile-more-panel__item {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fafafa;
    color: #333;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

a.mobile-more-panel__item {
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.mobile-more-panel__item:active {
    transform: scale(0.985);
}

/* 「更多」内：当前账本同步状态（单行不换行，过长横向滑动） */
.mobile-more-sync-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    margin: 0 15px 10px;
    padding: 10px 12px;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.3;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
}

.mobile-more-sync-row__label {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.02em;
}

.mobile-more-sync-row__body {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: baseline;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.mobile-more-sync-row__status {
    flex-shrink: 0;
    font-weight: 700;
}

.mobile-more-sync-row__time {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
}

.mobile-more-sync-row--synced .mobile-more-sync-row__status {
    color: #15803d;
}

.main-all-funeral .mobile-more-sync-row--synced .mobile-more-sync-row__status {
    color: #166534;
}

.mobile-more-sync-row--muted .mobile-more-sync-row__status,
.mobile-more-sync-row--muted .mobile-more-sync-row__time {
    color: #64748b;
    font-weight: 500;
}

.main-all-happy .mobile-more-sync-row {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(216, 31, 38, 0.2);
}

.main-all-funeral .mobile-more-sync-row {
    background: #f4f4f4;
    border-color: #ddd;
    color: #333;
}

.main-all-funeral .mobile-more-sync-row__label {
    color: #666;
}

/* 菜单项左侧图标（与文案同一按钮，易读） */
#mobileMoreBackup::before {
    content: '🔄';
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

#mobileMoreCollaborate::before {
    content: '👨‍👩‍👧';
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

#mobileMoreTips::before {
    content: '📖';
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

/* 喜事：抽屉与菜单 */
.main-all-happy .mobile-more-backdrop {
    background: rgba(80, 20, 20, 0.42);
}

.main-all-happy .mobile-more-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fff9f5 38%, #fff4ee 100%);
    box-shadow:
        0 -14px 48px rgba(158, 0, 0, 0.12),
        0 -2px 0 rgba(216, 31, 38, 0.12) inset;
    border-top: 1px solid rgba(216, 31, 38, 0.18);
}

.main-all-happy .mobile-more-panel__handle {
    background: linear-gradient(90deg, #f5d0c8, #ffe8e0, #f5d0c8);
}

.main-all-happy .mobile-more-panel__head {
    border-bottom-color: rgba(216, 31, 38, 0.14);
}

.main-all-happy .mobile-more-panel__title {
    color: #9e0000;
}

.main-all-happy .mobile-more-panel__close {
    color: #a94442;
}

.main-all-happy .mobile-more-panel__close:active {
    background: rgba(216, 31, 38, 0.1);
}

.main-all-happy .mobile-more-panel__item {
    background: linear-gradient(135deg, #fffefd 0%, #fff5f0 55%, #ffefe8 100%);
    border: 1px solid rgba(216, 31, 38, 0.28);
    color: #5c1a1a;
    box-shadow: 0 3px 12px rgba(216, 31, 38, 0.1);
}

.main-all-happy .mobile-more-panel__item:active {
    background: linear-gradient(135deg, #ffece6 0%, #ffdcd4 100%);
    box-shadow: 0 2px 8px rgba(216, 31, 38, 0.14);
}

.main-all-happy #mobileMoreBackup {
    border-left: 4px solid #d81f26;
}

.main-all-happy #mobileMoreCollaborate {
    border-left: 4px solid #c41e3a;
}

.main-all-happy #mobileMoreTips {
    border-left: 4px solid #b8860b;
}

/* 白事：抽屉与菜单 */
.main-all-funeral .mobile-more-backdrop {
    background: rgba(0, 0, 0, 0.52);
}

.main-all-funeral .mobile-more-panel {
    background: linear-gradient(180deg, #fafafa 0%, #f2f2f2 55%, #ebebeb 100%);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
    border-top: 1px solid #b0b0b0;
}

.main-all-funeral .mobile-more-panel__handle {
    background: linear-gradient(90deg, #d0d0d0, #e8e8e8, #d0d0d0);
}


.main-all-funeral .mobile-more-panel__title {
    color: #2d2d2d;
    font-weight: 800;
}

.main-all-funeral .mobile-more-panel__close {
    color: #555;
}

.main-all-funeral .mobile-more-panel__close:active {
    background: rgba(0, 0, 0, 0.08);
}

.main-all-funeral .mobile-more-panel__item {
    background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);
    border: 1px solid #c8c8c8;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.main-all-funeral .mobile-more-panel__item:active {
    background: linear-gradient(135deg, #ececec 0%, #e2e2e2 100%);
}

.main-all-funeral #mobileMoreBackup {
    border-left: 4px solid #666;
}

.main-all-funeral #mobileMoreCollaborate {
    border-left: 4px solid #555;
}

.main-all-funeral #mobileMoreTips {
    border-left: 4px solid #777;
}

/* 中间的添加按钮 */
.add-item {
    position: relative;
    top: -20px;
}

.add-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D81F26, #9E0000);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(216, 31, 38, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(216, 31, 38, 0.5);
}

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

.add-icon {
    font-size: 24px;
    font-weight: normal;
}

/* 隐藏旧的固定添加按钮 */

/* 设备适配 */
/* 强制在m.html页面隐藏操作按钮 */
.h5page .action-text-group {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .desktop-only {
        display: block !important;
    }
}

/* 操作窗口 */
.action-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.action-modal.show {
    display: flex;
}

/* H5 / iOS：勿纵向居中整块，便于键盘缩小可视区域时上推或滚动 */
.h5page .action-modal.show {
    align-items: flex-start;
    justify-content: center;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.h5page .action-modal-content {
    margin-top: min(8vh, 48px);
    margin-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
    transition: transform 0.22s ease-out;
}

.action-modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-modal-title {
    font-size: 20px;
    font-weight: normal;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.action-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-buttons-row {
    display: flex;
    gap: 10px;
}

.action-buttons-row .action-btn {
    flex: 1;
}

.action-btn {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.action-btn:hover {
    background-color: #f5f5f5;
}

.action-btn.edit-action {
    color: #4CAF50;
    border-color: #4CAF50;
}

.action-btn.delete-action {
    color: #F44336;
    border-color: #F44336;
}

.action-btn.confirm-action {
    color: #2196F3;
    border-color: #2196F3;
}

.action-btn.confirm-action:hover {
    background-color: #2196F3;
    color: white;
}

.action-btn.cancel-action {
    color: #999;
    border-color: #e0e0e0;
}

/* 备注输入区域 */
.action-modal-remark {
    margin-top: 10px;
    margin-bottom: 10px;
}

.remark-input-group {
    margin-bottom: 10px;
}

.remark-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.remark-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    resize: none;
    min-height: 80px;
    box-sizing: border-box;
}

.remark-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.action-btn.cancel-action {
    color: #666;
    border-color: #e0e0e0;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .action-modal-content {
        background-color: #2d2d2d;
        border-color: #555555;
    }
    
    .action-modal-title {
        color: #e0e0e0;
    }
    
    .action-btn {
        background-color: #333333;
        border-color: #555555;
        color: #e0e0e0;
    }
    
    .action-btn:hover {
        background-color: #444444;
    }
    
    .action-btn.remark-action {
        color: #64B5F6;
        border-color: #64B5F6;
    }
    
    .action-btn.edit-action {
        color: #81C784;
        border-color: #81C784;
    }
    
    .action-btn.delete-action {
        color: #E57373;
        border-color: #E57373;
    }
    
    .action-btn.cancel-action {
        color: #b0b0b0;
        border-color: #555555;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .app-container {
        background-color: #1a1a1a;
    }
    
    .app-header {
        background: linear-gradient(135deg, #8B0000, #6B0000);
    }
    
    .search-bar {
        background-color: #2d2d2d;
    }
    
    .search-input {
        background-color: #333333;
        border-color: #444444;
        color: #e0e0e0;
        border: 1px solid #e0e0e0;
    }
    
    .search-input:focus {
        border-color: #D81F26;
        box-shadow: 0 0 0 2px rgba(216, 31, 38, 0.2);
    }
    
    .app-main {
        background-color: #1a1a1a;
    }
    
    .record-list {
        background: #2d2d2d;
    }
    
    .record-header {
        background-color: #333333;
        color: #e0e0e0;
    }
    
    .record-item {
        color: #e0e0e0;
        border-bottom: 1px solid #444444;
    }
    
    .record-item:hover {
        background-color: #333333;
    }
    
    .name-text {
        color: #e0e0e0;
    }
    
    .amount-text {
        color: #e0e0e0;
    }
    
    .method-text {
        color: #e0e0e0;
    }
    
    .app-footer {
        background-color: #2d2d2d;
        border-top: 1px solid #444444;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .footer-btn {
        color: #b0b0b0;
    }
    
    .footer-btn:hover {
        color: #D81F26;
    }
    
    .modal {
        background: #2d2d2d;
        border-color: #555555;
    }
    
    .modal-title {
        color: #e0e0e0;
    }
    
    .modal-label {
        color: #e0e0e0;
    }
    
    .underline-input {
        color: #e0e0e0;
        border-bottom-color: #555555;
    }
    
    .uppercase-display {
        color: #e0e0e0;
        border-bottom-color: #555555;
    }
    
    .modal-payment-item span {
        color: #e0e0e0;
    }
    
    .success-modal-content {
        background: #2d2d2d;
        border-color: #555555;
    }
    
    .success-title {
        color: #e0e0e0;
    }
    
    .success-desc {
        color: #b0b0b0;
    }
    
    .storage-status-bar {
        background: #2d2d2d;
        border-top-color: #444444;
    }
    
    .storage-status-text {
        color: #b0b0b0;
    }
    
    .renqing-shengyu {
        color: #b0b0b0;
    }
    
    .storage-status-progress {
        background: #444444;
    }
    
    .search-storage-container {
        background: #2d2d2d;
        border-bottom: 1px solid #444444;
    }
    
    /* Modal backgrounds */
    #ledgerModal .modal,
    #ledgerInitModal .modal,
    .success-modal-content {
        background: #2d2d2d;
        border-color: #555555;
    }
    
    /* Modal headers */
    #ledgerModal .modal-header h3,
    #ledgerInitModal .modal-header h3 {
        color: #e0e0e0;
    }
    
    #ledgerModal .modal-header {
        border-bottom: 1px solid #444444;
    }
    
    /* Input fields */
    #ledgerTitle,
    #ledgerRemark {
        background: #333333;
        border-color: #444444;
        color: #e0e0e0;
    }
    
    #ledgerModal .ledger-modal-footer {
        border-top-color: #444444;
    }
    
    /* Empty row */
    #emptyRow {
        border-bottom: 1px solid #444444;
        color: #888888;
    }
    
    /* Search input focus */
    .name-search-input:focus {
        background: #333333;
        color: #e0e0e0;
    }
    
    /* Search placeholder */
    .name-search-input::placeholder {
        color: #888888;
    }
    
    /* Search clear button */
    .search-clear-btn {
        color: #888888;
    }
    
    .search-clear-btn:hover {
        color: #409eff;
    }
    
    /* White backgrounds in modal */
    .modal {
        background: #2d2d2d;
        border-color: #555555;
    }
    
    /* Title modal */
    #titleModal .modal {
        background: #2d2d2d;
        border-color: #555555;
    }
    
    #titleModal .modal-title {
        color: #e0e0e0;
    }
    
    #titleModal .modal-label {
        color: #e0e0e0;
    }
    
    #titleModal .modal-buttons .confirm-btn {
        background: #333333;
        color: #e0e0e0;
        border-color: #555555;
    }
    
    #titleModal .modal-buttons .cancel-btn {
        background: #444444;
        color: #e0e0e0;
        border-color: #555555;
    }
    
    /* Custom title modal */
    .custom-title-modal {
        background: #2d2d2d;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    
    .custom-title-modal h3 {
        color: #e0e0e0;
    }
    
    .custom-title-modal .modal-label {
        color: #e0e0e0;
    }
    
    .custom-title-modal input[type="text"] {
        background: #333333;
        border-color: #444444;
        color: #e0e0e0;
    }
    
    .custom-title-modal .modal-buttons .confirm-btn {
        background: #333333;
        color: #e0e0e0;
        border-color: #555555;
    }
    
    .custom-title-modal .modal-buttons .cancel-btn {
        background: #444444;
        color: #e0e0e0;
        border-color: #555555;
    }
    
    /* Style selection */
    .style-item span {
        color: #e0e0e0;
    }
    
    .style-item:focus-within, .style-item.active {
        outline: 2px solid #64B5F6;
    }
}  

/* 白事模式样式 */
.main-all-funeral {
    /* 基础背景：浅灰白+暗纹，替代喜庆的红金底 */
    background: #F5F5F5 url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23333333' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: #333333;
}

/* 白事模式 - 顶部导航栏 */
.main-all-funeral .app-header {
    background: linear-gradient(135deg, #666666, #444444);
}

.main-all-funeral .reward-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
}

.main-all-funeral .reward-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.main-all-funeral .reward-btn:hover {
    background-color: white;
    color: #666666;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.main-all-funeral .reward-btn:hover .reward-icon {
    filter: brightness(0) saturate(100%) invert(31%) sepia(96%) saturate(7478%) hue-rotate(355deg) brightness(97%) contrast(123%);
}

/* 白事模式 - 搜索和存储空间容器 */
.main-all-funeral .search-storage-container {
    background-color: #f5f5f5;
}

.main-all-funeral .search-input {
    background-color: #ffffff;
    border: 2px solid #999999;
    color: #333333;
}

.main-all-funeral .search-input:focus {
    border-color: #666666;
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.2);
}

.main-all-funeral .search-clear-btn {
    color: #666666;
}

.main-all-funeral .storage-status-text {
    color: #666666;
}

.main-all-funeral .storage-status-progress {
    height: 24px;
    border: 2px solid #999999;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    min-width: 120px;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.main-all-funeral .storage-status-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #666666, #444444);
    border-radius: 12px;
    transition: width 0.3s ease;
    z-index: 1;
}

.main-all-funeral .renqing-shengyu {
    font-size: 12px;
    color: #333333;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* 白事模式 - 记录列表 */
.main-all-funeral .record-header {
    background-color: #e0e0e0;
    border-bottom: 2px solid #999999;
}

.main-all-funeral .record-header .col-name,
.main-all-funeral .record-header .col-amount,
.main-all-funeral .record-header .col-method {
    color: #333333;
}

.main-all-funeral .record-row {
    background-color: #d7d7d726;
}

.main-all-funeral .record-row:nth-child(even) {
    background-color: #f0f0f0;
}

.main-all-funeral .record-name {
    color: #333333;
}

.main-all-funeral .record-amount {
    color: #666666;
}

.main-all-funeral .record-amount .amount-text {
    color: #666666;
}

.main-all-funeral .record-amount .amount-unit {
    color: #666666;
}

.main-all-funeral .record-method {
    color: #666666;
}

/* 白事模式 - 底部导航栏 */
.main-all-funeral .app-footer {
    background-color: #f5f5f5;
}

.main-all-funeral .footer-btn {
    color: #666666;
}

.main-all-funeral .footer-btn:hover {
    color: #666666;
    background-color: #e0e0e0;
}

.main-all-funeral .add-btn {
    background: linear-gradient(135deg, #666666, #444444);

}

.main-all-funeral .add-btn:hover {
    background: linear-gradient(135deg, #777777, #555555);
    box-shadow: 0 6px 0 #333333;
}

/* 白事模式 - 弹窗样式 */
.main-all-funeral .modal {
    background-color: #ffffff;
    border: 4px solid #999999;
}

.main-all-funeral .modal-title {
    color: #222222;
    border-bottom: 2px solid #999999;
}

.main-all-funeral .underline-input {
    border-bottom: 4px solid #444444;
    color: #444444;
}

.main-all-funeral .underline-input:focus {
    border-color: #666666;
}

.main-all-funeral .uppercase-display {
    color: #444444;
    border-bottom: 4px solid #444444;
}

.main-all-funeral .modal-payment-item.active {
    background-color: #e0e0e0;
    border: 2px solid #666666;
}

.main-all-funeral .modal-payment-item:hover {
    background-color: #f0f0f0;
}

.main-all-funeral .confirm-btn,
.main-all-funeral .fullscreen-input-btn,
.main-all-funeral .action-btn,
.main-all-funeral .success-confirm-btn {
    background: linear-gradient(135deg, #666666, #444444);
    border: 2px solid #999999;
}

.main-all-funeral .confirm-btn:hover,
.main-all-funeral .fullscreen-input-btn:hover,
.main-all-funeral .action-btn:hover,
.main-all-funeral .success-confirm-btn:hover {
    background: linear-gradient(135deg, #777777, #555555);
    box-shadow: 0 6px 0 #333333;
}

.main-all-funeral .cancel-btn,
.main-all-funeral .fullscreen-input-btn.cancel-btn,
.main-all-funeral .action-btn.cancel-action {
    background: #f0f0f0;
    color: #333333;
    border: 2px solid #999999;
}

.main-all-funeral .cancel-btn:hover,
.main-all-funeral .fullscreen-input-btn.cancel-btn:hover,
.main-all-funeral .action-btn.cancel-action:hover {
    background: #e0e0e0;
    box-shadow: 0 6px 0 #cccccc;
}

/* 白事模式 - 半屏输入界面 */
.main-all-funeral .fullscreen-input-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

.main-all-funeral .fullscreen-input-wrapper {
    background-color: #ffffff;
    border-top: 4px solid #999999;
}

.main-all-funeral .fullscreen-input-buttons {
    border-top: 2px solid #999999;
}

/* 白事模式 - 操作窗口 */
.main-all-funeral .action-modal-content {
    color: #333333;
}

.main-all-funeral .action-btn {
    color: white;
}

.main-all-funeral .action-btn.edit-action {
    color: white;
    border-color: #4CAF50;
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    box-shadow: 0 4px 0 #2E7D32;
}

.main-all-funeral .action-btn.edit-action:hover {
    background: linear-gradient(135deg, #66BB6A, #43A047);
    box-shadow: 0 6px 0 #2E7D32;
}

.main-all-funeral .action-btn.delete-action {
    color: white;
    border-color: #F44336;
    background: linear-gradient(135deg, #F44336, #D32F2F);
    box-shadow: 0 4px 0 #B71C1C;
}

.main-all-funeral .action-btn.delete-action:hover {
    background: linear-gradient(135deg, #EF5350, #C62828);
    box-shadow: 0 6px 0 #B71C1C;
}

.main-all-funeral .action-btn.confirm-action {
    color: white;
    border-color: #2196F3;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    box-shadow: 0 4px 0 #1565C0;
}

.main-all-funeral .action-btn.confirm-action:hover {
    background: linear-gradient(135deg, #42A5F5, #1E88E5);
    box-shadow: 0 6px 0 #1565C0;
}

.main-all-funeral .action-btn.cancel-action {
    box-shadow: 0 4px 0 #cccccc;
}

/* 白事模式 - 备注输入区域 */
.main-all-funeral .remark-input-group label {
    color: #444444;
}

.main-all-funeral .remark-input {
    border: 2px solid #999999;
    color: #333333;
}

.main-all-funeral .remark-input:focus {
    border-color: #666666;
}

/* 白事模式 - 统计弹窗 */
.main-all-funeral .stat-item {
    border-bottom: 2px solid #e0e0e0;
}

.main-all-funeral .stat-label {
    color: #444444;
}

.main-all-funeral .stat-total {
    border-top: 4px solid #999999;
}

.main-all-funeral .stat-total-label {
    color: #222222;
}

.main-all-funeral .stat-total-value {
    color: #333333;
}

/* 白事模式 - 成功弹窗 */
.main-all-funeral .action-modal-content,
.main-all-funeral .stat-modal-content,
.main-all-funeral .success-modal-content,
.main-all-funeral .ledger-modal-content,
.main-all-funeral .export-modal-content,
.main-all-funeral .backup-modal-content,
.main-all-funeral .storage-modal-content {
    background-color: #ffffff;
    border: 4px solid #999999;
}

.main-all-funeral .success-desc {
    color: #444444;
}

/* 白事模式 - 账本管理弹窗 */
.main-all-funeral .action-modal-title,
.main-all-funeral .stat-title,
.main-all-funeral .ledger-modal-title,
.main-all-funeral .export-modal-title,
.main-all-funeral .backup-modal-title,
.main-all-funeral .storage-modal-title {
    color: #222222;
    border-bottom: 2px solid #999999;
}

.main-all-funeral .ledger-item {
    border-bottom: 2px solid #e0e0e0;
}

.main-all-funeral .ledger-item.active {
    background-color: #e0e0e0;
    border: 2px solid #666666;
}

.main-all-funeral .ledger-name {
    color: #333333;
}

.main-all-funeral .ledger-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.main-all-funeral .ledger-switch {
    padding: 4px;
    background: #666666;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 32px;
}

.main-all-funeral .ledger-export,
.main-all-funeral .ledger-edit,
.main-all-funeral .ledger-delete {
    padding: 4px;
    background: #444444;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 32px;
}

.main-all-funeral .ledger-export {
    font-size: 10px;
}

.main-all-funeral .ledger-edit {
    font-size: 12px;
}

.main-all-funeral .ledger-delete {
    font-size: 12px;
}

.main-all-funeral .ledger-export:hover,
.main-all-funeral .ledger-edit:hover,
.main-all-funeral .ledger-delete:hover {
    background: #555555;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-all-funeral .ledger-invite-link-btn {
    background: #5b6b8a;
}

.main-all-funeral .ledger-invite-link-btn:hover {
    background: #6b7c9c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.main-all-funeral .ledger-item.active .ledger-delete {
    background: #ef4444;
    cursor: pointer;
    opacity: 1;
}

.main-all-funeral .ledger-item.active .ledger-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.main-all-funeral .ledger-link-btn {
    color: #444;
    background: #f0f0f0;
    border: 1px solid #9a9a9a;
}

/* 白事模式 - 导出弹窗 */
.main-all-funeral .export-option input[type="radio"]:checked + label {
    color: #666666;
}

/* 白事模式 - 备份弹窗 */
.main-all-funeral .backup-option input[type="radio"]:checked + label {
    color: #666666;
}

/* 白事模式 - 存储空间弹窗 */
.main-all-funeral .export-option,
.main-all-funeral .backup-option,
.main-all-funeral .storage-info-item {
    border-bottom: 2px solid #e0e0e0;
}

.main-all-funeral .export-option label,
.main-all-funeral .backup-option label,
.main-all-funeral .storage-label {
    color: #444444;
}

.main-all-funeral .storage-value {
    color: #333333;
}

.main-all-funeral .storage-progress {
    border: 2px solid #999999;
}

.main-all-funeral .storage-progress-bar {
    background: linear-gradient(90deg, #666666, #444444);
}

.main-all-funeral .storage-tips {
    color: #666666;
}

/* 无账本提示（添加 / 云恢复） */
#noLedgerTip.no-ledger-tip-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    width: min(340px, 88vw);
    padding: 22px 20px 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
    border: 1px solid #e8e8e8;
    text-align: center;
    box-sizing: border-box;
}
#noLedgerTip .no-ledger-tip-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
#noLedgerTip .no-ledger-tip-desc {
    margin: 0 0 18px;
    font-size: 14px;
    color: #888;
    line-height: 1.45;
}
#noLedgerTip .no-ledger-tip-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#noLedgerTip .no-ledger-tip-btn {
    display: block;
    width: 100%;
    padding: 13px 14px;
    font-size: 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}
#noLedgerTip .no-ledger-tip-btn-primary {
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
}
#noLedgerTip .no-ledger-tip-btn-secondary {
    background: #f5f5f5;
    color: #444;
    border: 1px solid #ddd;
}
#noLedgerTip .no-ledger-tip-btn-accent {
    background: #fff;
    color: #c62828;
    border: 2px solid #e53935;
}
#noLedgerTip .no-ledger-tip-btn-accent:hover {
    background: #fff5f5;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    #noLedgerTip.no-ledger-tip-panel {
        background: #2d2d2d;
        border-color: #444;
        box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    }
    #noLedgerTip .no-ledger-tip-title {
        color: #e8e8e8;
    }
    #noLedgerTip .no-ledger-tip-desc {
        color: #aaa;
    }
    #noLedgerTip .no-ledger-tip-btn-secondary {
        background: #3a3a3a;
        color: #ddd;
        border-color: #555;
    }
    #noLedgerTip .no-ledger-tip-btn-accent {
        background: #2d2d2d;
        color: #ff8a80;
        border-color: #e57373;
    }
    #noLedgerTip .no-ledger-tip-btn-accent:hover {
        background: #3a2a2a;
    }
}

/* 云同步成功提示 */
.sync-success-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    display: none;
    animation: fadeInOut 3s ease-in-out;
}

/* 手机端账本链接入口（含存储码）：单行不换行，过长横向滑动 */
.cloud-ledger-link-mobile {
    margin: 8px 15px 14px;
    font-size: 13px;
    color: #0c4a6e;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    font-family: inherit;
    user-select: none;
}

.cloud-ledger-link-mobile__inner {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cloud-ledger-link-mobile .cloud-ledger-link__label {
    flex-shrink: 0;
    white-space: nowrap;
}

.cloud-ledger-link-mobile .cloud-ledger-link__code {
    font-size: 12px;
    white-space: nowrap;
    word-break: keep-all;
    flex-shrink: 0;
}

.cloud-ledger-link-mobile:active {
    opacity: 0.92;
}

.cloud-collab-link-label {
    margin: 10px 0 4px;
}

.syn11c-success-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sync-success-icon {
    font-size: 18px;
}

.sync-success-text {
    font-size: 14px;
    font-weight: 500;
}

/* 排序（m.html 与 index 共用逻辑，样式放在手机版表） */
.action-btn.sort-action {
    color: #1a7f5a;
    border-color: #8fd4b8;
    background: #f0fdf7;
}

.reorder-pop {
    position: absolute;
    background: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    min-width: 240px;
    z-index: 10000;
}

.reorder-pop.reorder-pop--mobile {
    box-sizing: border-box;
    /* 勿对整层 overflow:hidden/auto，否则 .reorder-target-dropdown 绝对定位会被裁切 */
    overflow: visible;
    max-height: none;
}

.reorder-pop.reorder-pop--mobile .reorder-target-wrap {
    position: relative;
    z-index: 30;
}

.reorder-pop.reorder-pop--mobile .reorder-pop-actions {
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

.reorder-pop-title {
    font-weight: 700;
    font-size: 18px;
    color: #1a7f5a;
    margin-bottom: 6px;
}

.reorder-pop-tip {
    margin: 0 0 10px;
    font-size: 15px;
    color: #444;
    line-height: 1.4;
}

.reorder-pop-pos {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 15px;
}

.reorder-target-wrap {
    position: relative;
    margin-bottom: 12px;
    z-index: 2;
}

.reorder-target-trigger {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 28px 10px 10px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center;
    text-align: left;
    cursor: pointer;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reorder-target-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    max-height: 260px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 50;
}

.reorder-target-hint {
    display: none;
    font-size: 13px;
    line-height: 1.4;
    color: #b71c1c;
    background: #ffebee;
    padding: 8px 10px;
    border-bottom: 1px solid #ffcdd2;
    flex-shrink: 0;
}

.reorder-target-hint.reorder-target-hint--show {
    display: block;
}

.reorder-target-search {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin: 0;
    font-size: 16px;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.reorder-target-search:focus {
    outline: none;
    background: #f9fffc;
}

.reorder-target-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 200px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.reorder-target-item {
    padding: 10px 12px;
    font-size: 16px;
    cursor: pointer;
    color: #222;
    line-height: 1.35;
}

.reorder-target-item:active {
    background: #e8f7f0;
}

.reorder-target-item.reorder-target-item--active {
    background: #d4f0e4;
    font-weight: 700;
}

.reorder-target-item.reorder-target-item--empty {
    cursor: default;
    color: #888;
}

.reorder-radio {
    cursor: pointer;
    user-select: none;
}

.reorder-radio input {
    margin-right: 4px;
    vertical-align: middle;
}

.reorder-pop-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.reorder-pop-cancel {
    background: #888 !important;
    border-color: #666 !important;
    color: #fff !important;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(20px);
    }
    10% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0);
    }
    90% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-10px);
    }
}