:root{--gift-red:#a61f24;--gift-red2:#7e1519;--gift-gold:#c99642;--gift-gold2:#e8c77b;--gift-ink:#3f2d24;--gift-muted:#806f65;--gift-paper:#fffaf0;--gift-bg:#f6efe4;--gift-line:#e4cfaa;--gift-green:#237347}
.gift-page{background:var(--gift-bg);color:var(--gift-ink)}
.gift-hero{background:linear-gradient(130deg,#8e171d,#b9252a 58%,#8f171c);color:#fff8e8;border-bottom:4px solid #d1a24d;position:relative;overflow:hidden}.gift-hero:before,.gift-hero:after{content:"";position:absolute;width:240px;height:240px;border:1px solid rgba(255,224,161,.18);border-radius:50%;top:-120px}.gift-hero:before{left:-70px}.gift-hero:after{right:-70px}.gift-hero-inner{min-height:220px;display:flex;align-items:center;justify-content:space-between;gap:30px;padding-top:28px;padding-bottom:28px;position:relative;z-index:1}.gift-title{display:flex;align-items:center;gap:20px}.gift-seal{width:82px;height:82px;border-radius:50%;border:2px solid #f0c86d;box-shadow:inset 0 0 0 6px rgba(255,245,217,.08);display:grid;place-items:center;font-family:"STKaiti","KaiTi",serif;font-size:43px;color:#ffd980;flex:0 0 auto}.gift-title span{font-size:13px;color:#f1dba8;letter-spacing:.18em}.gift-title h1{font-family:"STKaiti","KaiTi",serif;font-size:46px;margin:5px 0 5px;letter-spacing:.08em}.gift-title p{margin:0;color:#f6dfc3;line-height:1.8;max-width:670px}.local-safe{min-width:260px;padding:15px 18px;border:1px solid rgba(255,237,197,.28);background:rgba(255,255,255,.08);border-radius:15px;display:flex;flex-direction:column;gap:4px;backdrop-filter:blur(8px)}.local-safe b{color:#ffe096}.local-safe span{font-size:12px;color:#f8e7cb}
.gift-shell{padding-top:26px;padding-bottom:70px}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.summary-card{position:relative;overflow:hidden;background:#fffdf8;border:1px solid var(--gift-line);border-radius:16px;padding:19px 20px;box-shadow:0 9px 28px rgba(101,67,29,.055)}.summary-card:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--gift-gold)}.summary-card.received:before{background:var(--gift-red)}.summary-card.given:before{background:#b97a33}.summary-card.balance:before{background:#6c8e58}.summary-card.people:before{background:#7666a9}.summary-card span,.summary-card small{display:block;color:#8b7768;font-size:12px}.summary-card strong{display:block;font-size:27px;margin:5px 0 3px;color:#512d20;font-variant-numeric:tabular-nums}.summary-card.received strong{color:var(--gift-red)}
.gift-main-grid{display:grid;grid-template-columns:390px minmax(0,1fr);gap:16px;align-items:start}.ledger-panel{background:#fffdf8;border:1px solid var(--gift-line);border-radius:18px;box-shadow:0 12px 38px rgba(92,58,25,.06)}.entry-panel{padding:20px;position:sticky;top:82px}.book-panel{padding:20px;min-height:680px}.panel-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}.panel-title>div:first-child{display:flex;align-items:center;gap:11px}.panel-title h2{margin:0;font-family:"STKaiti","KaiTi",serif;font-size:25px}.panel-title p{margin:3px 0 0;color:#917f72;font-size:11px}.mini-seal{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#a61f24;color:#ffe5a5;border:2px solid #d5ad58;box-shadow:inset 0 0 0 3px #a61f24;font-family:"STKaiti","KaiTi",serif;font-size:19px;font-weight:900}.text-btn{border:0;background:transparent;color:#a66343;font-weight:800;cursor:pointer;padding:7px}
.direction-switch{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:18px}.direction-btn{border:1px solid #dfc8a4;background:#fffaf0;border-radius:13px;padding:12px 10px;cursor:pointer;text-align:left;color:#725847}.direction-btn b,.direction-btn span{display:block}.direction-btn b{font-size:15px}.direction-btn span{font-size:10px;margin-top:3px;color:#9b8879}.direction-btn.active{border-color:#b92a2d;background:linear-gradient(135deg,#b82529,#941b1f);color:#fff7e8;box-shadow:0 8px 20px rgba(166,31,36,.18)}.direction-btn.active span{color:#f1d8c5}
.scene-label{font-weight:900;font-size:12px;margin-bottom:8px}.scene-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:17px}.scene-btn{min-width:0;border:1px solid #e1cfb2;background:#fffaf2;border-radius:10px;padding:8px 3px 7px;color:#6e5545;font-size:10px;font-weight:800;cursor:pointer}.scene-btn span{display:block;width:24px;height:24px;margin:0 auto 4px;border-radius:50%;display:grid;place-items:center;background:#f7ead4;color:#a52627;font-family:"STKaiti","KaiTi",serif;font-size:13px}.scene-btn.active{border-color:#c59343;background:#fff0cf;box-shadow:inset 0 0 0 1px #dfbd79}.scene-btn.active span{background:#a61f24;color:#ffe5a5}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field{display:flex;flex-direction:column;gap:5px}.field.span-2{grid-column:1/-1}.field>span{font-size:11px;font-weight:850;color:#675347}.field em{font-style:normal;color:#b9272b}.field input,.field select,.field textarea{width:100%;border:1px solid #deccb0;background:#fffefa;border-radius:10px;color:#4f3c30;outline:none;font:inherit;font-size:12px}.field input,.field select{height:40px;padding:0 10px}.field textarea{height:70px;resize:vertical;padding:10px;line-height:1.6}.field input:focus,.field select:focus,.field textarea:focus{border-color:#c18d3d;box-shadow:0 0 0 3px rgba(193,141,61,.10)}.amount-field>div{position:relative}.amount-field i{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-style:normal;color:#a72a2c;font-weight:900}.amount-field input{padding-left:28px;font-size:16px;font-weight:900;color:#922126}.save-entry{width:100%;height:47px;margin-top:14px;border:0;border-radius:12px;background:linear-gradient(135deg,#b2262a,#8b181d);color:#fff8e9;font-size:14px;font-weight:900;cursor:pointer;box-shadow:0 10px 22px rgba(153,27,31,.18)}.save-entry span{font-size:19px;vertical-align:-1px;margin-right:3px}.save-entry:hover{filter:brightness(1.05)}
.book-title{align-items:center}.view-tabs{display:flex;border:1px solid #dfcbae;border-radius:10px;overflow:hidden}.view-tabs button{height:34px;padding:0 13px;border:0;border-right:1px solid #e3cfb0;background:#fffaf1;color:#806958;font-size:11px;font-weight:900;cursor:pointer}.view-tabs button:last-child{border-right:0}.view-tabs button.active{background:#a61f24;color:#fff5df}.book-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) 120px 110px 105px;gap:8px;margin-bottom:13px}.ledger-search{height:40px;border:1px solid #ddc9aa;border-radius:10px;background:#fffefa;display:flex;align-items:center;padding:0 10px;gap:6px}.ledger-search span{font-size:20px;color:#a6815e}.ledger-search input{border:0;outline:none;background:transparent;width:100%;font:inherit;font-size:12px}.book-toolbar select{height:40px;border:1px solid #ddc9aa;border-radius:10px;background:#fffefa;color:#6d594b;padding:0 8px;font-size:11px}.desktop-table-wrap{overflow:auto;border:1px solid #eadbc4;border-radius:12px}.ledger-table{width:100%;border-collapse:collapse;min-width:840px;background:#fff}.ledger-table th{position:sticky;top:0;background:#f8ead3;color:#735441;font-size:10px;text-align:left;padding:10px 9px;border-bottom:1px solid #dfc7a4;white-space:nowrap}.ledger-table td{font-size:11px;padding:11px 9px;border-bottom:1px solid #eee1cf;color:#5d4c41;vertical-align:top}.ledger-table tbody tr:hover{background:#fffbf4}.ledger-table .person-cell b{display:block;color:#3f2e25;font-size:12px}.ledger-table .person-cell small{display:block;color:#a08d7c;margin-top:2px}.money-col{text-align:right!important}.ledger-table td.money-col{font-weight:900;font-size:13px;font-variant-numeric:tabular-nums;color:#9a2528}.flow-tag,.status-tag{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:900}.flow-tag.received{background:#fae5e1;color:#a52227}.flow-tag.given{background:#f3ead7;color:#916221}.status-tag.pending{background:#fff0c8;color:#8a6113}.status-tag.done{background:#e8f5eb;color:#277146}.status-tag.none{background:#eee;color:#777}.row-actions{white-space:nowrap}.row-actions button{border:0;background:transparent;font-size:10px;font-weight:900;color:#9a6949;cursor:pointer;padding:3px 4px}.row-actions button.delete{color:#b54242}.mobile-records{display:none}.empty-book{text-align:center;padding:90px 20px;color:#9b8779}.empty-book span{width:66px;height:66px;border:1px solid #d8bc8d;border-radius:50%;display:grid;place-items:center;margin:0 auto 12px;font-family:"STKaiti","KaiTi",serif;font-size:30px;color:#b58743}.empty-book b{display:block;font-size:16px;color:#654d3e}.empty-book p{font-size:11px;max-width:320px;margin:7px auto}.hidden{display:none!important}
.people-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.person-summary{border:1px solid #e3cfaf;background:#fffaf2;border-radius:13px;padding:14px}.person-summary-head{display:flex;align-items:center;justify-content:space-between;gap:9px}.person-summary-head>div{display:flex;align-items:center;gap:9px}.avatar-seal{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#a61f24;color:#ffe8ad;font-family:"STKaiti","KaiTi",serif;font-size:17px}.person-summary h3{margin:0;font-size:13px}.person-summary small{color:#9a8777}.person-summary .balance-num{font-weight:900;font-size:13px;color:#8d2829}.person-money{display:grid;grid-template-columns:1fr 1fr 1fr;margin-top:12px;border-top:1px dashed #dcc5a2;padding-top:10px}.person-money span{font-size:9px;color:#9a8776}.person-money b{display:block;font-size:12px;margin-top:2px}.person-money>div:nth-child(2){text-align:center}.person-money>div:nth-child(3){text-align:right}.person-scenes{margin-top:9px;font-size:10px;color:#866f5f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.data-panel{padding:20px;margin-top:16px}.data-title{margin-bottom:13px}.data-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.data-btn{min-height:104px;border:1px solid #dec8a7;background:#fffaf1;border-radius:13px;padding:15px 14px;text-align:left;cursor:pointer;color:#634e40;display:grid;grid-template-columns:44px 1fr;grid-template-rows:auto auto;column-gap:12px;align-content:center;text-decoration:none}.data-btn>span{grid-row:1/3;width:44px;height:44px;border-radius:12px;background:#f1dfc3;color:#a12628;display:grid;place-items:center;font-weight:900;font-size:12px}.data-btn b{font-size:16px;line-height:1.3}.data-btn small{font-size:12px;color:#9a8777;margin-top:4px;line-height:1.5}.data-btn.primary{background:linear-gradient(135deg,#ad2226,#8a171c);border-color:#a31d22;color:#fff4df}.data-btn.primary>span{background:#f3cf72;color:#731216}.data-btn.primary small{color:#efd9c5}.import-btn{position:relative}.storage-note{margin-top:12px;padding:12px 14px;border-radius:10px;background:#fff7df;border:1px solid #ead5a2;color:#806a4d;font-size:12px;line-height:1.75}
.gift-help{padding:38px 0 10px}.gift-help h2{text-align:center;font-family:"STKaiti","KaiTi",serif;font-size:28px}.help-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.help-grid>div{background:#fffdf8;border:1px solid var(--gift-line);border-radius:15px;padding:18px}.help-grid b{display:inline-block;color:#b1262a;font-size:11px;letter-spacing:.08em}.help-grid strong{display:block;margin:6px 0;font-size:14px}.help-grid p{margin:0;color:#8f7d70;font-size:11px;line-height:1.7}
.gift-toast{position:fixed;z-index:1500;left:50%;bottom:28px;transform:translate(-50%,16px);background:#3f2d24;color:#fff8e9;border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:10px 16px;font-size:11px;opacity:0;visibility:hidden;transition:.18s;box-shadow:0 10px 35px rgba(0,0,0,.2)}.gift-toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}.gift-modal{position:fixed;z-index:1600;inset:0;background:rgba(49,33,25,.45);display:grid;place-items:center;padding:18px}.gift-modal-card{width:min(420px,94vw);background:#fffaf0;border:1px solid #d6b97f;border-radius:18px;text-align:center;padding:25px;box-shadow:0 25px 70px rgba(46,27,15,.28)}.gift-modal-card .mini-seal{margin:0 auto}.gift-modal-card h3{font-family:"STKaiti","KaiTi",serif;font-size:23px;margin:12px 0 5px}.gift-modal-card p{color:#8e796b;font-size:11px}.gift-modal-card>div:last-child{display:flex;justify-content:center;gap:8px;margin-top:16px}.gift-modal-card button{height:38px;border:1px solid #d9c4a6;background:#fff;border-radius:10px;padding:0 18px;color:#765d4d;font-weight:900;cursor:pointer}.gift-modal-card button.danger{background:#a51f24;color:#fff;border-color:#a51f24}
@media(max-width:1020px){.gift-main-grid{grid-template-columns:1fr}.entry-panel{position:static}.summary-grid{grid-template-columns:1fr 1fr}.book-toolbar{grid-template-columns:1fr 1fr}.data-actions{grid-template-columns:1fr 1fr}.people-list{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.gift-hero-inner{align-items:flex-start;flex-direction:column;min-height:0;padding-top:34px;padding-bottom:34px}.gift-title{align-items:flex-start}.gift-seal{width:62px;height:62px;font-size:32px}.gift-title h1{font-size:36px}.local-safe{width:100%;min-width:0}.summary-grid{gap:8px}.summary-card{padding:15px}.summary-card strong{font-size:22px}.desktop-table-wrap{display:none}.mobile-records{display:grid;gap:8px}.mobile-record{border:1px solid #e2ceb0;background:#fffaf2;border-radius:13px;padding:12px}.mobile-record-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.mobile-record-head h3{margin:0;font-size:13px}.mobile-record-head strong{font-size:16px;color:#9c2629}.mobile-record-meta{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}.mobile-record p{margin:8px 0 0;color:#8e7969;font-size:10px}.mobile-record-foot{display:flex;align-items:center;justify-content:space-between;margin-top:10px;padding-top:8px;border-top:1px dashed #dfc7a4}.mobile-record-foot span{font-size:10px;color:#8e7969}.mobile-record-foot div{display:flex;gap:8px}.mobile-record-foot button{border:0;background:transparent;color:#996446;font-size:10px;font-weight:900}.people-list{grid-template-columns:1fr}.help-grid{grid-template-columns:1fr}.data-actions{grid-template-columns:1fr 1fr}.data-btn{min-height:96px}.data-btn b{font-size:15px}.data-btn small{font-size:11px}.book-panel{min-height:500px}}
@media(max-width:520px){.gift-shell{width:min(100% - 20px,1120px)}.gift-title{gap:11px}.gift-seal{width:50px;height:50px;font-size:27px}.gift-title h1{font-size:30px}.gift-title p{font-size:12px}.summary-grid{grid-template-columns:1fr 1fr}.summary-card span,.summary-card small{font-size:10px}.summary-card strong{font-size:19px}.entry-panel,.book-panel,.data-panel{padding:14px;border-radius:14px}.scene-grid{grid-template-columns:repeat(5,1fr)}.scene-btn{font-size:9px}.form-grid{grid-template-columns:1fr}.field.span-2{grid-column:auto}.book-toolbar{grid-template-columns:1fr 1fr}.ledger-search{grid-column:1/-1}.data-actions{grid-template-columns:1fr}.data-btn{min-height:90px}.data-btn b{font-size:15px}.data-btn small{font-size:11px}.view-tabs button{padding:0 9px}.panel-title p{display:none}}

/* V2.15 人情账本：场景主题与紧凑账簿 */
.gift-page{--scene-main:#a61f24;--scene-deep:#7e1519;--scene-accent:#c99642;--scene-soft:#fff0cf;--scene-paper:#fffaf0;--scene-page:#f6efe4;--scene-text:#3f2d24;--scene-muted:#806f65;--scene-line:#e4cfaa;background:var(--scene-page);color:var(--scene-text);transition:background .22s,color .22s}
.gift-page.theme-condolence{--scene-main:#486c63;--scene-deep:#31534d;--scene-accent:#9a8b65;--scene-soft:#e8f0eb;--scene-paper:#fbfcf8;--scene-page:#eef2ee;--scene-text:#35413e;--scene-muted:#6f7d78;--scene-line:#cdd9d2}
.gift-page.theme-funeral{--scene-main:#54534e;--scene-deep:#383a37;--scene-accent:#9b8b6f;--scene-soft:#ece9e0;--scene-paper:#faf9f4;--scene-page:#eeece6;--scene-text:#34332f;--scene-muted:#74716a;--scene-line:#d5d0c4}
.gift-page .gift-hero{background:linear-gradient(130deg,var(--scene-deep),var(--scene-main) 58%,var(--scene-deep));border-bottom-color:var(--scene-accent);transition:background .22s,border-color .22s}
.gift-page .gift-seal{border-color:color-mix(in srgb,var(--scene-accent) 90%,#fff);color:#f7df9d}
.gift-page.theme-condolence .gift-seal,.gift-page.theme-funeral .gift-seal{color:#f1ead9;box-shadow:inset 0 0 0 6px rgba(255,255,255,.05)}
.gift-page .gift-title span{color:#f0dfbc}.gift-page.theme-condolence .gift-title span,.gift-page.theme-funeral .gift-title span{color:#e4e0d4}
.gift-page .gift-title p{color:#f6e5d0}.gift-page.theme-condolence .gift-title p,.gift-page.theme-funeral .gift-title p{color:#e8e6de}
.gift-page .ledger-panel,.gift-page .summary-card,.gift-page .help-grid>div{background:var(--scene-paper);border-color:var(--scene-line)}
.gift-page .mini-seal{background:var(--scene-main);box-shadow:inset 0 0 0 3px var(--scene-main);border-color:var(--scene-accent);color:#fff1c9}
.gift-page .direction-btn.active{border-color:var(--scene-main);background:linear-gradient(135deg,var(--scene-main),var(--scene-deep));box-shadow:0 8px 20px color-mix(in srgb,var(--scene-main) 18%,transparent)}
.gift-page .scene-btn.active{border-color:var(--scene-accent);background:var(--scene-soft);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--scene-accent) 55%,transparent)}
.gift-page .scene-btn.active span{background:var(--scene-main);color:#fff2c9}
.gift-page .save-entry{background:linear-gradient(135deg,var(--scene-main),var(--scene-deep));box-shadow:0 10px 22px color-mix(in srgb,var(--scene-main) 18%,transparent)}
.gift-page .view-tabs button.active{background:var(--scene-main);color:#fff}
.gift-page .summary-card.received:before{background:var(--scene-main)}
.gift-page .summary-card.given:before{background:var(--scene-accent)}
.gift-page .summary-card.pending-money:before{background:#c38a2c}
.gift-page.theme-condolence .summary-card.pending-money:before{background:#719183}
.gift-page.theme-funeral .summary-card.pending-money:before{background:#807a6c}
.gift-page .summary-card.received strong,.gift-page .ledger-table td.money-col{color:var(--scene-main)}
.gift-page .avatar-seal{background:var(--scene-main);color:#fff0c7}
.gift-page .person-summary .balance-num{color:var(--scene-main)}
.gift-page .data-btn.primary{background:linear-gradient(135deg,var(--scene-main),var(--scene-deep));border-color:var(--scene-main)}
.gift-page .data-btn.primary>span{background:color-mix(in srgb,var(--scene-accent) 80%,#fff);color:var(--scene-deep)}
.gift-page .help-grid b{color:var(--scene-main)}
.gift-page.theme-condolence .flow-tag.received,.gift-page.theme-funeral .flow-tag.received{background:#e4ece8;color:var(--scene-deep)}
.gift-page.theme-condolence .flow-tag.given,.gift-page.theme-funeral .flow-tag.given{background:#ebe7dc;color:#665d4c}
.gift-page.theme-condolence .amount-field i,.gift-page.theme-funeral .amount-field i,.gift-page.theme-condolence .amount-field input,.gift-page.theme-funeral .amount-field input{color:var(--scene-main)}
.gift-page.theme-condolence .funeral-scene,.gift-page.theme-funeral .condolence-scene{opacity:.78}

/* 白事与探病的场景按钮本身也避免喜庆红 */
.scene-btn.condolence-scene span{background:#e8f1ec;color:#496c63}.scene-btn.funeral-scene span{background:#ebe8e0;color:#57544d}
.scene-btn.condolence-scene.active span,.theme-condolence .scene-btn.condolence-scene.active span{background:#486c63;color:#f7f5ef}
.scene-btn.funeral-scene.active span,.theme-funeral .scene-btn.funeral-scene.active span{background:#54534e;color:#f5f0e5}

/* 账簿在桌面端完整落在一个界面，不横向拖动 */
.gift-main-grid{grid-template-columns:360px minmax(0,1fr);gap:14px}
.entry-panel{padding:18px}.book-panel{padding:18px;min-width:0}
.book-toolbar{grid-template-columns:minmax(150px,1fr) 105px 96px 94px;gap:6px}
.desktop-table-wrap{overflow-x:hidden;overflow-y:auto}
.ledger-table{width:100%;min-width:0;table-layout:fixed}
.ledger-table .c-date{width:88px}.ledger-table .c-person{width:105px}.ledger-table .c-scene{width:82px}.ledger-table .c-flow{width:64px}.ledger-table .c-money{width:82px}.ledger-table .c-status{width:72px}.ledger-table .c-action{width:72px}.ledger-table .c-detail{width:auto}
.ledger-table th{padding:9px 6px;font-size:10px}.ledger-table td{padding:9px 6px;font-size:10.5px;line-height:1.45;overflow:hidden}
.ledger-table td:not(.detail-cell):not(.person-cell){white-space:nowrap;text-overflow:ellipsis}
.ledger-table .person-cell b{font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ledger-table .person-cell small{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.detail-cell b,.detail-cell small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.detail-cell b{font-size:10px;color:#59483d}.detail-cell small{font-size:9px;color:#9b8878;margin-top:2px}
.row-actions{white-space:normal;text-align:right}.row-actions button{display:block;margin-left:auto;padding:2px 0;font-size:9.5px}

@media(max-width:1100px){.gift-main-grid{grid-template-columns:330px minmax(0,1fr)}.ledger-table .c-date{width:82px}.ledger-table .c-person{width:96px}.ledger-table .c-scene{width:76px}.ledger-table .c-flow{width:58px}.ledger-table .c-money{width:76px}.ledger-table .c-status{width:68px}.ledger-table .c-action{width:58px}}
@media(max-width:1020px){.gift-main-grid{grid-template-columns:1fr}.entry-panel{position:static}.book-panel{min-width:0}.desktop-table-wrap{overflow-x:auto}.ledger-table{min-width:720px}.book-toolbar{grid-template-columns:1fr 1fr}}

/* V2.16 自定义场合 */
.scene-btn.custom-scene-trigger{border-style:dashed;background:color-mix(in srgb,var(--scene-paper) 82%,var(--scene-soft));color:var(--scene-main)}
.scene-btn.custom-scene-trigger span{font-family:system-ui,sans-serif;font-size:18px;font-weight:600;background:transparent;border:1px dashed color-mix(in srgb,var(--scene-main) 55%,transparent);color:var(--scene-main)}
.scene-btn.custom-scene{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.custom-scene-editor{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;align-items:center;margin:-7px 0 16px;padding:10px;border:1px solid var(--scene-line);border-radius:11px;background:color-mix(in srgb,var(--scene-soft) 35%,var(--scene-paper))}
.custom-scene-editor.hidden{display:none!important}.custom-scene-editor input{height:38px;min-width:0;border:1px solid var(--scene-line);border-radius:9px;background:#fff;padding:0 11px;color:var(--scene-text);outline:none}.custom-scene-editor input:focus{border-color:var(--scene-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--scene-accent) 15%,transparent)}
.custom-scene-editor button{height:38px;border:1px solid var(--scene-line);border-radius:9px;background:var(--scene-paper);padding:0 12px;font-weight:800;color:var(--scene-text);cursor:pointer}.custom-scene-editor #customSceneAddBtn{background:var(--scene-main);border-color:var(--scene-main);color:#fff}.custom-scene-editor small{grid-column:1/-1;color:var(--scene-muted);font-size:10px}
@media(max-width:520px){.custom-scene-editor{grid-template-columns:1fr auto}.custom-scene-editor #customSceneCancelBtn{display:none}}


/* V2.17 场合管理 */
.scene-btn{position:relative}
.scene-btn.scene-admin-trigger{border-style:dashed;background:color-mix(in srgb,var(--scene-paper) 86%,#f3ece2);color:#8b5f53}
.scene-btn.scene-admin-trigger span{font-family:system-ui,sans-serif;font-size:18px;font-weight:700;background:transparent;border:1px dashed rgba(130,78,66,.35);color:#9c4f45}
.scene-btn.scene-admin-trigger.active-admin{background:#fff0ed;border-color:#bd6258;color:#9f2d27}
.scene-delete-x{display:none;position:absolute;right:-5px;top:-6px;width:19px;height:19px;border-radius:50%;align-items:center;justify-content:center;background:#b52b2d;color:#fff;border:2px solid var(--scene-paper);box-shadow:0 2px 8px rgba(96,30,30,.22);font:900 13px/1 system-ui,sans-serif;z-index:4;cursor:pointer}
.scene-grid.scene-delete-mode .scene-btn[data-scene] .scene-delete-x{display:flex}
.scene-grid.scene-delete-mode .scene-btn[data-scene]{animation:sceneManagePulse .18s ease}
.scene-grid.scene-delete-mode .scene-btn[data-scene]:hover{border-color:#bd6258;background:#fff7f5}
@keyframes sceneManagePulse{from{transform:scale(.97);opacity:.75}to{transform:none;opacity:1}}
@media(max-width:520px){.scene-delete-x{right:-3px;top:-5px;width:18px;height:18px;font-size:12px}}

/* V2.18 可读性与删除模式收尾 */
/* 顶部横幅更紧凑，把首屏空间留给实际记账 */
.gift-hero-inner{min-height:168px;padding-top:18px;padding-bottom:18px}
.gift-seal{width:68px;height:68px;font-size:36px}
.gift-title{gap:16px}
.gift-title span{font-size:14px}
.gift-title h1{font-size:40px;margin:3px 0 3px}
.gift-title p{font-size:14px;line-height:1.65}
.gift-shell{padding-top:18px}

/* 汇总卡片压低高度，但核心数字仍清晰 */
.summary-grid{gap:12px;margin-bottom:14px}
.summary-card{padding:13px 16px;border-radius:14px}
.summary-card span,.summary-card small{font-size:11.5px}
.summary-card strong{font-size:24px;margin:3px 0 2px}

/* 操作区说明和按钮文字放大，优先保证可读性 */
.panel-title{margin-bottom:13px}
.panel-title h2{font-size:26px}
.panel-title p{font-size:13px;line-height:1.45;margin-top:4px}
.direction-switch{margin-bottom:15px}
.direction-btn{padding:11px 10px}
.direction-btn b{font-size:16px}
.direction-btn span{font-size:12px;line-height:1.35;margin-top:4px}
.scene-label{font-size:14px;margin-bottom:9px}
.scene-grid{gap:6px;margin-bottom:15px}
.scene-btn{font-size:12px;line-height:1.2;padding:7px 3px 7px}
.scene-btn span{width:25px;height:25px;margin-bottom:4px;font-size:14px}
.field>span{font-size:12px}
.field input,.field select,.field textarea{font-size:12.5px}

/* 右侧账簿的小字适度放大，同时保持单屏紧凑 */
.book-toolbar{margin-bottom:10px}
.ledger-search input{font-size:12.5px}
.book-toolbar select{font-size:11.5px}
.ledger-table th{font-size:11px;padding:8px 6px}
.ledger-table td{font-size:11.5px;padding:8px 6px;line-height:1.35}
.ledger-table .person-cell b{font-size:12.5px}
.ledger-table .person-cell small{font-size:10.5px;margin-top:2px}
.detail-cell b{font-size:11px}
.detail-cell small{font-size:10.5px;margin-top:2px}
.flow-tag,.status-tag{font-size:9.5px;padding:3px 6px}
.row-actions button{font-size:10px}

/* 修正：默认绝不显示删除 ×；只有点“删除”进入管理模式后才出现 */
.scene-btn .scene-delete-x{display:none!important}
.scene-grid.scene-delete-mode .scene-btn[data-scene] .scene-delete-x{display:flex!important}

@media(max-width:760px){
  .gift-hero-inner{padding-top:24px;padding-bottom:24px}
  .gift-seal{width:58px;height:58px;font-size:30px}
  .gift-title h1{font-size:34px}
  .gift-title p{font-size:13px}
  .summary-card{padding:12px 13px}
  .summary-card strong{font-size:21px}
  .panel-title p{font-size:12px}
  .direction-btn span{font-size:11.5px}
  .scene-btn{font-size:11px}
}
@media(max-width:520px){
  .gift-title h1{font-size:29px}
  .summary-card span,.summary-card small{font-size:10.5px}
  .summary-card strong{font-size:18px}
  .scene-btn{font-size:10.5px}
  .panel-title p{display:block;font-size:11.5px}
}


/* V2.19 SEO入口 + 顶部下载按钮 */
.book-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.jump-download-btn{height:38px;padding:0 18px;border:0;border-radius:11px;background:linear-gradient(135deg,var(--scene-main),var(--scene-deep));color:#fff;font-weight:800;letter-spacing:.5px;cursor:pointer;box-shadow:0 8px 18px color-mix(in srgb,var(--scene-main) 18%,transparent)}
.jump-download-btn:hover{transform:translateY(-1px)}
#downloadPanel{scroll-margin-top:88px}
@media(max-width:760px){.book-actions{width:100%;justify-content:space-between}.jump-download-btn{height:36px;padding:0 16px}}
