:root{
  --bg:#f5fbf8;
  --bg-2:#eef8ff;
  --panel:rgba(255,255,255,.94);
  --text:#20373b;
  --muted:#7d979b;
  --line:#dfeee9;
  --accent:#67c8a8;
  --accent-deep:#379b7b;
  --accent-soft:#e5f7f0;
  --sky:#9fd8f5;
  --sky-soft:#eaf6fd;
  --peach:#ffb49c;
  --peach-soft:#fff0ea;
  --lav:#c9baf3;
  --lav-soft:#f1edff;
  --sand:#f2d8a7;
  --sand-soft:#fff8e9;
  --good:#299a73;
  --bad:#d96858;
  --warn:#c48a32;
  --radius:22px;
  --shadow:0 12px 35px rgba(51,110,91,.08);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;color:var(--text);min-height:100vh;background:
  radial-gradient(circle at 8% 0%,rgba(141,220,190,.22),transparent 28%),
  radial-gradient(circle at 92% 4%,rgba(159,216,245,.23),transparent 26%),
  linear-gradient(180deg,#f8fcfa 0%,#f4fbf8 50%,#f7fbff 100%);background-attachment:fixed}
body:before,body:after{content:"";position:fixed;pointer-events:none;z-index:-1;border-radius:999px;filter:blur(2px)}
body:before{width:280px;height:280px;left:-100px;top:18%;background:rgba(126,208,178,.08)}
body:after{width:320px;height:320px;right:-130px;bottom:14%;background:rgba(158,211,242,.08)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid rgba(103,200,168,.2);outline-offset:2px}
.app-shell{max-width:1120px;margin:0 auto;padding:0 20px 110px}
.topbar{position:sticky;top:0;z-index:20;display:flex;justify-content:space-between;align-items:center;padding:20px 0 15px;background:linear-gradient(180deg,rgba(245,251,248,.97) 0%,rgba(245,251,248,.88) 72%,rgba(245,251,248,0) 100%);backdrop-filter:blur(14px)}
.topbar h1{font-size:30px;line-height:1.1;margin:5px 0 0;letter-spacing:-.03em}.eyebrow{font-size:12px;color:var(--muted);letter-spacing:.02em}
.top-actions{display:flex;gap:9px;align-items:center}
.icon-btn{border:1px solid rgba(111,177,155,.12);background:rgba(255,255,255,.9);width:44px;height:44px;border-radius:15px;font-size:23px;color:var(--text);box-shadow:0 8px 22px rgba(51,110,91,.07);display:grid;place-items:center}.icon-btn.primary{background:linear-gradient(135deg,#71d0ae,#56bb98);color:#fff;border-color:transparent;box-shadow:0 12px 26px rgba(76,174,140,.25)}
.view{display:none}.view.active{display:block}
.segmented{display:flex;gap:5px;background:rgba(222,240,234,.78);border:1px solid rgba(103,200,168,.08);border-radius:16px;padding:4px;margin-bottom:15px;width:max-content;max-width:100%;box-shadow:inset 0 1px 0 rgba(255,255,255,.8)}
.segmented.compact{margin-bottom:14px}.segmented button{border:0;background:transparent;padding:9px 16px;border-radius:12px;color:#6f8d92;transition:.18s ease}.segmented button:hover{color:var(--accent-deep)}.segmented button.active{background:#fff;color:var(--accent-deep);font-weight:700;box-shadow:0 5px 16px rgba(51,110,91,.08)}
.date-range{display:flex;align-items:center;gap:8px;margin:-2px 0 14px}.hidden{display:none!important}
.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin:13px 0 16px}.metric-card{position:relative;overflow:hidden;background:var(--panel);border:1px solid rgba(103,200,168,.08);border-radius:24px;padding:19px;box-shadow:var(--shadow);min-height:140px}.metric-card:after{content:"";position:absolute;width:88px;height:88px;border-radius:50%;right:-28px;bottom:-38px;opacity:.5}.metric-0:after{background:var(--accent-soft)}.metric-1:after{background:var(--peach-soft)}.metric-2:after{background:var(--sky-soft)}.metric-3:after{background:var(--lav-soft)}.metric-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.metric-card .label{color:#6d888d;font-size:13px;font-weight:600}.metric-icon{width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:#f5faf8;color:var(--accent-deep);font-weight:800}.metric-card .value{font-size:29px;font-weight:780;letter-spacing:-.03em;margin-top:16px;position:relative;z-index:1}.metric-card .sub{font-size:11px;color:#90a4a7;margin-top:7px;position:relative;z-index:1}.metric-0 .value{color:#2f9d78}.metric-1 .value{color:#d97c66}.metric-2 .value{color:#4d7887}.metric-3 .value{color:#7866a9}
.panel{background:var(--panel);border:1px solid rgba(103,200,168,.08);border-radius:24px;padding:20px;margin:15px 0;box-shadow:var(--shadow);backdrop-filter:blur(10px)}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:15px}.panel h2{font-size:19px;letter-spacing:-.02em;margin:0}.panel h3{font-size:14px;margin:5px 0 10px}.panel p{margin:5px 0 0;color:var(--muted);font-size:12px}.section-kicker{font-size:10px;letter-spacing:.16em;text-transform:uppercase;color:var(--accent-deep);font-weight:800;margin-bottom:5px}
.focus-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:11px}.focus-card{border:0;border-radius:19px;padding:16px;text-align:left;min-height:142px;transition:.18s ease;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}.focus-card:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(51,110,91,.08)}.focus-0{background:linear-gradient(145deg,#e9f7f1,#f5fbf8)}.focus-1{background:linear-gradient(145deg,#eaf6fd,#f7fbfe)}.focus-2{background:linear-gradient(145deg,#fff5e7,#fffaf2)}.focus-3{background:linear-gradient(145deg,#fff0f2,#fff8f8)}.focus-icon{width:38px;height:38px;border-radius:14px;background:rgba(255,255,255,.75);display:grid;place-items:center;font-size:18px;color:#5f8d7e;margin-bottom:14px}.focus-card span{display:block;font-size:12px;color:#789195;font-weight:600}.focus-card strong{display:block;font-size:22px;margin-top:6px;letter-spacing:-.02em}.focus-card small{display:block;font-size:10px;color:#9aabad;margin-top:9px}
.bar-list{display:flex;flex-direction:column;gap:13px}.bar-row{display:grid;grid-template-columns:120px 1fr 95px;align-items:center;gap:12px}.bar-track{height:9px;background:#edf5f1;border-radius:99px;overflow:hidden}.bar-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#71cfad,#8edec2)}.fill-1{background:linear-gradient(90deg,#8ecbec,#acdff6)}.fill-2{background:linear-gradient(90deg,#f2c57d,#f7d9a6)}.fill-3{background:linear-gradient(90deg,#e9a9b6,#f4c6ce)}.fill-4{background:linear-gradient(90deg,#b7a6e9,#d2c8f5)}.fill-5{background:linear-gradient(90deg,#96c9c4,#b9e2de)}.bar-label{font-size:13px;display:flex;align-items:center;gap:8px}.category-dot{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;background:#eaf7f1;color:#4f9d80;font-size:12px}.dot-1{background:#eaf6fd;color:#4d94ba}.dot-2{background:#fff5e5;color:#b7802c}.dot-3{background:#fff0f2;color:#c86f7f}.dot-4{background:#f2eeff;color:#806cb2}.dot-5{background:#eaf7f6;color:#4f918c}.bar-value{text-align:right;font-variant-numeric:tabular-nums;font-size:13px;font-weight:650;color:#557177}
.analytics-panel{overflow:hidden;background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(249,253,251,.98))}.analytics-head{margin-bottom:12px}.analysis-controls{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;margin:8px 0 14px}.analysis-controls label,.filter-grid label,.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#789195;font-weight:600}.analysis-summary{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;margin:10px 0 12px;padding:13px 15px;border-radius:17px;background:linear-gradient(135deg,#edf9f4,#f0f8fd)}.analysis-summary>div{display:flex;flex-direction:column;gap:3px}.analysis-summary>div:last-child{text-align:right}.analysis-summary strong{font-size:12px;color:#57797b}.analysis-summary span,.analysis-summary small{font-size:11px;color:#8aa0a3}.analysis-summary b{font-size:22px;color:#2b5f55;letter-spacing:-.02em}.analysis-chart-shell{position:relative;border:1px solid #e5f0ec;background:linear-gradient(180deg,#fbfefd,#f8fcfa);border-radius:20px;padding:8px 8px 2px;overflow:hidden}.analysis-chart-shell:before{content:"";position:absolute;inset:20px 8px 28px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 43px,rgba(116,168,151,.08) 44px);pointer-events:none}.analysis-chart{position:relative;z-index:1;height:250px;display:flex;gap:9px;align-items:flex-end;overflow-x:auto;padding:12px 4px 24px;scrollbar-width:thin}.analysis-bar-group{height:100%;min-width:48px;flex:1;max-width:75px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center}.analysis-bar-value{font-size:10px;color:#748e91;margin-bottom:6px;white-space:nowrap}.analysis-bar{width:62%;min-height:5px;border:0;border-radius:10px 10px 4px 4px;background:linear-gradient(180deg,#70cfad,#52b893);box-shadow:0 8px 16px rgba(82,184,147,.16);transition:.16s ease}.analysis-bar:hover{transform:translateY(-3px);filter:saturate(1.05)}.analysis-bar.bar-1{background:linear-gradient(180deg,#a8ddf5,#78c4e7)}.analysis-bar.bar-2{background:linear-gradient(180deg,#f7d69b,#efbd68)}.analysis-bar.bar-3{background:linear-gradient(180deg,#f2bcc5,#df92a2)}.analysis-bar.bar-4{background:linear-gradient(180deg,#d3c8f6,#aa98e2)}.analysis-bar.bar-5{background:linear-gradient(180deg,#b9e2dc,#86c8bf)}.analysis-bar-label{font-size:10px;color:#8aa0a3;margin-top:7px;white-space:nowrap}.analysis-foot{font-size:10px;color:#96a8aa;margin-top:9px;text-align:right}
.pending-card{width:100%;border:1px solid rgba(234,178,112,.18);border-radius:20px;background:linear-gradient(135deg,#fff8ea,#fffdf7);color:#99672f;padding:17px 18px;text-align:left;font-weight:650;margin:15px 0;box-shadow:0 8px 20px rgba(176,128,56,.05)}
.filter-panel{position:sticky;top:88px;z-index:10}.filter-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.filter-actions{display:flex;gap:8px;margin-top:12px}.inline-summary{padding:11px 5px;color:#6f898d;font-size:12px;font-weight:600}
input,select,textarea{border:1px solid #dbeae5;background:rgba(255,255,255,.92);border-radius:12px;padding:10px 11px;color:var(--text);min-width:0;transition:.16s ease}input:hover,select:hover,textarea:hover{border-color:#c6e2d8}textarea{resize:vertical}
.btn,.file-btn{border:0;border-radius:12px;background:linear-gradient(135deg,#6ccbac,#55b995);color:white;padding:10px 14px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 8px 18px rgba(76,174,140,.14)}.btn.small{padding:7px 10px;font-size:11px}.btn.ghost,.file-btn.secondary{background:#eef7f3;color:#557b70;box-shadow:none}.btn.ghost:hover,.file-btn.secondary:hover{background:#e5f2ed}.btn.danger{color:var(--bad)}.btn.danger.ghost{background:#fff1ef}
.transaction-list{display:flex;flex-direction:column;gap:10px}.tx-card{background:rgba(255,255,255,.95);border-radius:19px;padding:15px;border:1px solid #e4efeb;display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:flex-start;box-shadow:0 8px 24px rgba(51,110,91,.05);transition:.16s ease}.tx-card:hover{border-color:#cae4da;transform:translateY(-1px);box-shadow:0 12px 28px rgba(51,110,91,.08)}.tx-cat-icon{width:42px;height:42px;border-radius:14px;background:linear-gradient(145deg,#e7f7f0,#f3fbf8);display:grid;place-items:center;color:#4c957b;font-size:17px}.tx-main{min-width:0}.tx-card .tx-title{font-weight:760;font-size:14px}.tx-card .tx-meta,.tx-card .tx-note{color:#82979a;font-size:11px;margin-top:5px;line-height:1.45}.tx-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.tx-tags span{font-size:10px;color:#668e83;background:#edf8f3;padding:3px 7px;border-radius:999px}.tx-side{text-align:right}.tx-card .tx-amount{font-size:18px;font-weight:780;text-align:right;letter-spacing:-.02em}.tx-card .tx-amount.income{color:#309a75}.tx-card .tx-amount.expense{color:#d97762}.tx-card .tx-amount.neutral{color:#6d858a}.tx-card .tx-impact{font-size:10px;color:#94a5a8;text-align:right;margin-top:5px;line-height:1.45}.pill{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#f0f7f4;font-size:10px;color:#61847a;margin-left:4px;font-weight:600}
.pending-tabs{display:flex;gap:8px;overflow-x:auto;margin:4px 0 14px}.pending-tabs button{border:1px solid #dceae5;background:rgba(255,255,255,.9);border-radius:999px;padding:9px 13px;white-space:nowrap;color:#6e878b}.pending-tabs button.active{background:var(--accent-soft);color:var(--accent-deep);border-color:#bee4d6;font-weight:700}.pending-list{display:flex;flex-direction:column;gap:10px}.pending-item{background:rgba(255,255,255,.96);border-radius:20px;padding:17px;border:1px solid #e0ece8;box-shadow:0 10px 26px rgba(51,110,91,.05)}.pending-item h3{margin:0 0 5px;font-size:16px}.pending-item p{margin:3px 0;color:var(--muted);font-size:12px}.quick-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.quick-actions button{border:1px solid #dceae5;background:#f7fbf9;color:#5f7e76;border-radius:11px;padding:8px 11px}.quick-actions button:first-child{background:#eaf8f2;color:#35846a;border-color:#ceeade}.confidence{font-size:11px;font-weight:700}.confidence.high{color:var(--good)}.confidence.medium{color:var(--warn)}
.settings-actions{display:flex;flex-wrap:wrap;gap:8px}.settings-list{display:flex;flex-direction:column;gap:8px}.setting-row{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:11px 0;border-bottom:1px solid #edf3f1}.setting-row:last-child{border-bottom:0}.setting-row strong{display:block}.setting-row small{display:block;color:var(--muted);margin-top:3px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:22px}.chip-list{display:flex;flex-wrap:wrap;gap:7px}.chip{border:1px solid #dceae5;border-radius:999px;padding:6px 10px;background:#f8fbfa;font-size:11px;color:#638079}.notice{margin-top:12px;padding:12px;border-radius:14px;background:#eefbf6;color:#0d6848;font-size:13px;white-space:pre-line}.status-pill{padding:9px 12px;border-radius:999px;background:#eef7f3;color:#5d7b73;font-size:11px;margin:8px 0}
.bottom-nav{position:fixed;left:50%;bottom:14px;transform:translateX(-50%);width:min(720px,calc(100% - 26px));height:74px;border-radius:25px;background:rgba(255,255,255,.94);border:1px solid rgba(103,200,168,.13);display:grid;grid-template-columns:1fr 1fr 82px 1fr 1fr;padding:7px 10px;box-shadow:0 18px 44px rgba(46,103,85,.16);z-index:40;backdrop-filter:blur(18px)}.nav-item{position:relative;border:0;background:transparent;color:#92a5a8;border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}.nav-item.active{background:#e9f7f1;color:#358b6d}.nav-item span{font-size:18px;font-weight:800}.nav-item em{font-style:normal;font-size:10px;font-weight:650}.nav-add{align-self:center;justify-self:center;width:58px;height:58px;border-radius:20px;border:0;background:linear-gradient(145deg,#74d1af,#51b792);color:#fff;box-shadow:0 12px 24px rgba(77,175,141,.3);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;transform:translateY(-14px)}.nav-add span{font-size:27px;line-height:24px}.nav-add em{font-style:normal;font-size:9px;margin-top:3px}.badge{position:absolute;top:5px;right:22%;background:#df7d67;color:white;border-radius:999px;min-width:18px;height:18px;padding:0 5px;font-style:normal;font-size:10px;display:flex;align-items:center;justify-content:center}
.modal{border:0;border-radius:24px;width:min(760px,calc(100% - 26px));max-height:90vh;overflow:auto;padding:0;background:#fbfefd;box-shadow:0 24px 70px rgba(34,72,60,.25)}.modal::backdrop{background:rgba(40,67,60,.48);backdrop-filter:blur(4px)}.small-modal{width:min(470px,calc(100% - 26px))}.modal form{padding:21px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.modal-head h2{margin:0;font-size:21px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid.one-col{grid-template-columns:1fr}.span-2{grid-column:span 2}.checkbox{flex-direction:row!important;align-items:center}.checkbox input{width:auto}.modal-actions{display:flex;gap:8px;align-items:center;margin-top:18px}.spacer{flex:1}.tag-picker{display:flex;flex-wrap:wrap;gap:7px}.tag-choice{border:1px solid #dceae5;background:#f8fbfa;border-radius:999px;padding:6px 9px;font-size:11px;color:#658279}.tag-choice.selected{background:#e4f6ef;color:#37866d;border-color:#bce4d6}.raw-info{margin-top:14px;background:#f7fbf9;border:1px solid #dfece8;padding:12px;border-radius:13px;font-size:12px;white-space:pre-wrap;color:#607c76}
.toast{position:fixed;left:50%;bottom:102px;transform:translateX(-50%) translateY(20px);background:#2f5e52;color:white;padding:10px 14px;border-radius:999px;opacity:0;pointer-events:none;transition:.2s;z-index:100;font-size:12px;box-shadow:0 10px 28px rgba(47,94,82,.22)}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.empty{padding:31px 10px;text-align:center;color:#91a5a7;font-size:12px}
/* Privacy & encrypted sync */
.security-box,.sync-form{margin-bottom:12px}.fine-print{margin:10px 0 0;color:#82999b;font-size:11px;line-height:1.6}.inline-field{display:flex;gap:8px}.inline-field input{flex:1}.lock-overlay{position:fixed;inset:0;z-index:9999;background:linear-gradient(160deg,rgba(39,78,67,.97),rgba(55,101,87,.96));display:grid;place-items:center;padding:24px}.lock-overlay.hidden{display:none}.lock-card{width:min(360px,100%);background:#fbfefd;border-radius:24px;padding:29px;box-shadow:0 24px 80px rgba(0,0,0,.25);text-align:center}.lock-card h2{margin:8px 0}.lock-card p{color:#789092;margin:0 0 18px}.lock-card input{width:100%;font-size:22px;letter-spacing:.2em;text-align:center;padding:12px;margin-bottom:8px}.lock-card .btn{width:100%;margin-top:10px}.lock-mark{font-size:38px}.error-text{min-height:20px;color:#c45e52;font-size:13px}
@media (max-width:940px){.analysis-controls{grid-template-columns:repeat(4,1fr)}.filter-grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:780px){.metric-grid{grid-template-columns:1fr 1fr}.focus-grid{grid-template-columns:1fr 1fr}.analysis-controls{grid-template-columns:1fr 1fr 1fr}.filter-grid{grid-template-columns:1fr 1fr}.two-col{grid-template-columns:1fr}.filter-panel{position:static}.topbar h1{font-size:25px}.metric-card .value{font-size:25px}.bar-row{grid-template-columns:110px 1fr 82px}}
@media (max-width:520px){.app-shell{padding:0 12px 104px}.topbar{padding-top:13px}.panel{padding:16px;border-radius:21px}.metric-grid{gap:8px}.metric-card{padding:15px;min-height:128px;border-radius:20px}.metric-card .value{font-size:22px}.focus-grid{gap:8px}.focus-card{padding:14px;min-height:132px}.analysis-controls{grid-template-columns:1fr 1fr}.filter-grid{grid-template-columns:1fr 1fr}.bar-row{grid-template-columns:104px 1fr 74px;gap:8px}.bar-label{font-size:12px}.form-grid{grid-template-columns:1fr}.span-2{grid-column:span 1}.date-range{flex-wrap:wrap}.bottom-nav{bottom:8px;height:70px;padding:6px 7px;grid-template-columns:1fr 1fr 70px 1fr 1fr}.nav-add{width:54px;height:54px;border-radius:18px}.segmented{width:100%}.segmented button{flex:1;padding:8px 5px;font-size:11px}.analysis-summary{align-items:flex-start}.analysis-summary b{font-size:19px}.analysis-chart{height:235px}.tx-card{grid-template-columns:auto 1fr}.tx-side{grid-column:2;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:8px}.tx-card .tx-amount{text-align:left}.tx-card .tx-impact{text-align:right}.tx-cat-icon{width:38px;height:38px}.filter-panel{margin-top:0}}

/* V1.4 search, image entry, and ledger notes */
.ledger-search-wrap{display:flex;gap:9px;align-items:center;margin:3px 0 7px}.search-box{flex:1;display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.94);border:1px solid #dcebe6;border-radius:16px;padding:0 12px;box-shadow:0 7px 20px rgba(51,110,91,.04)}.search-box>span{color:#7f999b;font-size:18px}.search-box input{border:0;background:transparent;box-shadow:none;outline:0;flex:1;padding:11px 2px}.search-clear{border:0;background:#eef6f3;color:#7a9294;width:27px;height:27px;border-radius:9px;font-size:16px}.recent-searches{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0 2px 9px;color:#92a5a7;font-size:10px}.recent-searches button{border:1px solid #dceae5;background:#f8fbfa;color:#6c8584;border-radius:999px;padding:4px 8px;font-size:10px}

.quick-add-sheet,.image-dialog-body{padding:22px}.quick-add-dialog{width:min(560px,calc(100% - 26px))}.quick-add-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}.quick-add-choice{border:1px solid #e0ece8;background:#fff;border-radius:20px;padding:18px 14px;text-align:left;box-shadow:0 9px 24px rgba(51,110,91,.05);transition:.16s}.quick-add-choice:hover{transform:translateY(-2px);border-color:#cce4db}.quick-add-choice strong,.quick-add-choice small{display:block}.quick-add-choice strong{font-size:14px;margin-top:12px}.quick-add-choice small{font-size:10px;color:#91a4a6;margin-top:4px;line-height:1.5}.quick-choice-icon{width:42px;height:42px;border-radius:15px;display:grid;place-items:center;font-size:20px}.quick-choice-icon.mint{background:#e4f7ef;color:#3b9677}.quick-choice-icon.blue{background:#eaf6fd;color:#4b98bd}.quick-choice-icon.peach{background:#fff1ea;color:#c97960}

.image-modal{width:min(820px,calc(100% - 26px))}.privacy-note{padding:12px 14px;border-radius:15px;background:linear-gradient(135deg,#edf9f4,#f1f8fd);color:#607e7b;font-size:11px;line-height:1.65;margin-bottom:14px}.image-drop{min-height:150px;border:1.5px dashed #badfd2;border-radius:20px;background:linear-gradient(145deg,#f7fcfa,#f4faff);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;color:#65857e;cursor:pointer}.image-drop:hover{border-color:#78c9ab;background:#f1faf6}.image-drop-icon{width:48px;height:48px;border-radius:17px;background:#e5f7f0;color:#3e9276;display:grid;place-items:center;font-size:23px;margin-bottom:9px}.image-drop strong{font-size:14px;color:#486b64}.image-drop small{font-size:10px;margin-top:5px;color:#90a4a5}.image-preview-wrap{display:grid;grid-template-columns:160px 1fr;gap:14px;align-items:center;margin:14px 0;padding:12px;border:1px solid #e1ece8;border-radius:18px;background:#fff}.image-preview-wrap img{width:160px;height:120px;object-fit:contain;background:#f4f8f7;border-radius:13px}.ocr-progress{margin:12px 0}.ocr-progress>div:first-child{display:flex;justify-content:space-between;color:#718d8c;font-size:10px;margin-bottom:6px}.progress-track{height:8px;background:#edf5f1;border-radius:999px;overflow:hidden}.progress-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#68c9a8,#8fdcc0);border-radius:999px;transition:width .2s}.duplicate-warning{padding:13px 14px;border-radius:16px;background:#fff8e9;border:1px solid #f1dfb9;color:#826635;margin:12px 0;display:flex;flex-direction:column;gap:4px}.duplicate-warning strong{font-size:12px}.duplicate-warning span{font-size:11px}.duplicate-warning small{font-size:10px;color:#9a835b}.compact-head{margin:14px 0 10px}.compact-head h3{margin:0}.ocr-fields{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}.ocr-fields>div{padding:10px 11px;border-radius:14px;background:#f7fbf9;border:1px solid #e3efea;min-width:0}.ocr-fields span,.ocr-fields strong{display:block}.ocr-fields span{font-size:9px;color:#91a4a5;margin-bottom:4px}.ocr-fields strong{font-size:11px;color:#4e7069;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.image-actions{flex-wrap:wrap}

.notes-preview-panel{background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(247,252,250,.96))}.notes-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.note-preview-card,.empty-note-cta{border:1px solid #e2ede9;background:#fff;border-radius:17px;padding:13px;text-align:left;display:flex;gap:10px;align-items:flex-start;color:var(--text)}.note-preview-card:hover,.empty-note-cta:hover{border-color:#c9e3da}.note-pin{width:31px;height:31px;border-radius:11px;background:#fff2ea;color:#c77860;display:grid;place-items:center;flex:0 0 auto}.note-preview-card strong,.note-preview-card span,.note-preview-card p,.empty-note-cta strong,.empty-note-cta small{display:block}.note-preview-card strong{font-size:12px}.note-preview-card span{font-size:9px;color:#91a5a7;margin-top:3px}.note-preview-card p{font-size:10px;color:#768f91;margin:6px 0 0;line-height:1.5}.empty-note-cta{grid-column:1/-1;align-items:center}.empty-note-cta>span{font-size:24px;color:#5ba98d}.empty-note-cta small{color:#92a5a7;margin-top:3px}.notes-toolbar{display:flex;align-items:center;gap:9px;margin:2px 0 12px}.notes-search-box{max-width:520px}.notes-hero{background:linear-gradient(135deg,#ecf9f4,#eef8fd)}.notes-list{display:flex;flex-direction:column;gap:11px}.note-card{display:grid;grid-template-columns:72px 1fr;gap:14px;background:rgba(255,255,255,.95);border:1px solid #e1ede8;border-radius:20px;padding:15px;box-shadow:0 8px 24px rgba(51,110,91,.05);cursor:pointer}.note-card:hover{border-color:#cae4da}.note-card-date{background:linear-gradient(145deg,#e8f7f1,#f3fbf8);border-radius:15px;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#4f8f7a}.note-card-date span{font-size:15px;font-weight:800}.note-card-date small{font-size:9px;margin-top:4px}.note-card-main h3{font-size:15px;margin:0}.note-title-row{display:flex;align-items:center;gap:7px}.note-range{font-size:10px;color:#91a5a7;margin-top:4px}.note-card-main p{font-size:11px;line-height:1.65;color:#67817f;margin:8px 0 0;white-space:pre-wrap}.note-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.field-label{font-size:11px;color:#789195;font-weight:600;margin-bottom:7px}.note-tx-choices{max-height:210px;overflow:auto;border:1px solid #e1ece8;border-radius:14px;background:#f9fcfb;padding:5px}.note-tx-choice{display:flex!important;flex-direction:row!important;align-items:center!important;gap:9px!important;padding:8px;border-bottom:1px solid #edf3f1;color:var(--text)!important}.note-tx-choice:last-child{border-bottom:0}.note-tx-choice input{width:auto}.note-tx-choice span{min-width:0}.note-tx-choice strong,.note-tx-choice small{display:block}.note-tx-choice strong{font-size:11px}.note-tx-choice small{font-size:9px;color:#93a6a7;margin-top:2px}.analysis-note-markers{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin-top:10px}.analysis-note-label{font-size:10px;color:#8ba0a2}.analysis-note-markers button{border:1px solid #e8dfc9;background:#fff9ec;color:#876b37;border-radius:999px;padding:5px 8px;font-size:9px}

@media (max-width:780px){.quick-add-grid{grid-template-columns:1fr 1fr}.ocr-fields{grid-template-columns:1fr 1fr}.notes-preview{grid-template-columns:1fr 1fr}.notes-toolbar{flex-wrap:wrap}.notes-search-box{order:3;flex-basis:100%;max-width:none}}
@media (max-width:520px){.ledger-search-wrap{align-items:stretch}.ledger-search-wrap .btn{padding-left:11px;padding-right:11px}.quick-add-grid{grid-template-columns:1fr}.quick-add-choice{display:grid;grid-template-columns:auto 1fr;column-gap:11px;align-items:center;padding:14px}.quick-add-choice .quick-choice-icon{grid-row:1/3}.quick-add-choice strong{margin-top:0}.image-preview-wrap{grid-template-columns:100px 1fr}.image-preview-wrap img{width:100px;height:90px}.ocr-fields{grid-template-columns:1fr 1fr}.notes-preview{grid-template-columns:1fr}.note-card{grid-template-columns:58px 1fr;padding:12px}.note-card-date{min-height:60px}.note-date-grid{grid-template-columns:1fr}.notes-toolbar .btn{white-space:nowrap}}
.modal-head-actions{display:flex;align-items:center;gap:8px}
@media(max-width:520px){.modal-head-actions .btn{font-size:10px;padding:7px 9px}}

/* ===== V2 experience layer ===== */
:root{--ui-scale:1;--ui-font:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;--theme-primary:#74cbb0;--theme-soft:#effaf6;--theme-accent:#9ed7f1;--theme-warm:#f7b58b;--theme-ink:#213338;--theme-card:#fff;--theme-bg:#f6fbf9}
html{font-size:calc(16px * var(--ui-scale));font-family:var(--ui-font)}
body{background:var(--theme-bg);color:var(--theme-ink)}
.btn,.nav-assistant span,.focus-card strong,.metric-card .value{transition:.2s ease}
.profile-hero{position:relative;overflow:hidden;display:flex;align-items:center;gap:16px;padding:24px;margin:4px 0 18px;border-radius:28px;background:linear-gradient(135deg,var(--theme-primary),var(--theme-accent));color:#fff;box-shadow:0 16px 44px rgba(35,90,78,.16)}
.profile-hero:after{content:"";position:absolute;width:190px;height:190px;border-radius:50%;background:rgba(255,255,255,.16);right:-45px;top:-88px}
.profile-avatar{width:62px;height:62px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.9);color:var(--theme-primary);font-weight:800;font-size:24px;box-shadow:0 10px 25px rgba(0,0,0,.1)}
.profile-copy{display:flex;flex-direction:column;gap:4px;flex:1}.profile-copy strong{font-size:1.25rem}.profile-copy span{opacity:.9}.profile-hero .btn{position:relative;z-index:1;color:#fff;border-color:rgba(255,255,255,.55)}
.settings-grid-menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.settings-grid-menu button{border:0;background:var(--theme-soft);border-radius:18px;padding:16px 12px;text-align:left;color:var(--theme-ink);cursor:pointer}.settings-grid-menu button span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#fff;margin-bottom:10px;font-size:20px}.settings-grid-menu button strong,.settings-grid-menu button small{display:block}.settings-grid-menu button small{margin-top:4px;color:#789099;font-size:.78rem}
.theme-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:14px 0 18px}.theme-card{position:relative;border:1px solid rgba(96,130,125,.12);background:#fff;border-radius:18px;padding:12px;cursor:pointer;text-align:left}.theme-card.active{outline:3px solid color-mix(in srgb,var(--theme-primary) 40%, transparent)}.theme-preview{height:72px;border-radius:14px;margin-bottom:10px;display:flex;gap:6px;padding:9px;align-items:flex-end}.theme-preview i{display:block;border-radius:8px;background:rgba(255,255,255,.85)}.theme-preview i:nth-child(1){width:38%;height:80%}.theme-preview i:nth-child(2){width:25%;height:58%}.theme-preview i:nth-child(3){flex:1;height:40%}.theme-card strong,.theme-card small{display:block}.theme-card small{color:#7e9398;margin-top:3px}
.preference-list{display:grid;gap:12px}.notice-list{display:grid;gap:10px;margin-top:14px}.growth-suggestion{padding:14px;border-radius:16px;background:#fff7dc;border:1px solid #f2df9b}.growth-suggestion .actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}
.milestone-card{padding:0!important;overflow:hidden}.milestone-cover{min-height:150px;padding:26px;display:flex;justify-content:space-between;align-items:flex-end;background:linear-gradient(135deg,var(--theme-soft),#fff 68%);position:relative}.milestone-cover:before{content:"";position:absolute;inset:auto -30px -55px auto;width:170px;height:170px;border-radius:50%;background:color-mix(in srgb,var(--theme-primary) 20%, transparent)}.milestone-cover h2{margin:4px 0 6px}.milestone-cover p{margin:0;color:#6d858a}.milestone-badge{position:relative;z-index:1;min-width:76px;height:76px;border-radius:50%;display:grid;place-items:center;text-align:center;background:var(--theme-primary);color:#fff;font-weight:800;box-shadow:0 12px 30px rgba(30,120,96,.22)}
.compare-chart{display:grid;gap:12px}.compare-row{display:grid;grid-template-columns:72px 1fr auto;gap:12px;align-items:center}.compare-bars{display:grid;gap:5px}.compare-bar{height:10px;border-radius:999px;background:#edf3f2;overflow:hidden}.compare-bar i{display:block;height:100%;border-radius:inherit}.compare-bar.income i{background:#52c28e}.compare-bar.expense i{background:#f49a75}.compare-values{font-size:.78rem;color:#74888d;text-align:right}.compare-net{font-weight:700;font-size:.82rem}
.goal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.goal-card{border:0;text-align:left;background:linear-gradient(135deg,#fff,var(--theme-soft));border-radius:20px;padding:16px;cursor:pointer}.goal-card .goal-top{display:flex;justify-content:space-between;gap:12px}.goal-card strong{font-size:1rem}.goal-card small{color:#71888d}.goal-progress{height:9px;border-radius:999px;background:#e8efed;overflow:hidden;margin:14px 0 8px}.goal-progress i{height:100%;display:block;background:var(--theme-primary);border-radius:inherit}.goal-empty{padding:18px;text-align:center;color:#789096;background:var(--theme-soft);border-radius:18px}
.calendar-toolbar{display:flex;align-items:center;justify-content:center;gap:18px;margin-bottom:12px}.calendar-toolbar>div{text-align:center}.calendar-toolbar h2{margin:2px 0}.calendar-summary{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0 18px}.calendar-summary span{background:#fff;padding:10px 14px;border-radius:14px;box-shadow:0 6px 18px rgba(42,82,72,.06)}.calendar-week,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.calendar-week{font-size:.78rem;color:#82979b;text-align:center;margin-bottom:8px}.calendar-day{min-height:92px;border:0;background:#fff;border-radius:16px;padding:9px;text-align:left;cursor:pointer;box-shadow:0 6px 20px rgba(52,94,84,.055);position:relative}.calendar-day.muted{opacity:.35}.calendar-day.today{outline:2px solid var(--theme-primary)}.calendar-day.selected{background:var(--theme-soft);outline:2px solid var(--theme-primary)}.calendar-day .day-num{font-weight:700}.calendar-day .day-expense{margin-top:18px;font-size:.79rem;font-weight:700;color:#e67854}.calendar-day .day-income{font-size:.7rem;color:#2f9c70;margin-top:3px}.calendar-day.heat-1{background:color-mix(in srgb,var(--theme-soft) 75%,#fff)}.calendar-day.heat-2{background:color-mix(in srgb,var(--theme-primary) 14%,#fff)}.calendar-day.heat-3{background:color-mix(in srgb,var(--theme-primary) 24%,#fff)}.calendar-day.heat-4{background:color-mix(in srgb,var(--theme-warm) 25%,#fff)}.day-detail-panel{margin-top:18px}.day-category-breakdown{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.day-category-breakdown button{border:0;background:var(--theme-soft);padding:9px 12px;border-radius:999px;color:var(--theme-ink)}
.assistant-hero{display:flex;justify-content:space-between;align-items:center;background:linear-gradient(135deg,var(--theme-soft),#fff)}.assistant-input-card{background:#fff;border-radius:24px;padding:16px;box-shadow:0 10px 32px rgba(44,88,77,.07);margin-bottom:16px}.assistant-input-card textarea{width:100%;border:0;resize:vertical;outline:0;font:inherit;color:inherit;min-height:80px;background:transparent}.assistant-actions{display:flex;justify-content:flex-end;gap:10px}.assistant-suggestion{background:linear-gradient(135deg,#fff,var(--theme-soft));border-radius:22px;padding:18px;margin-bottom:16px;border:1px solid rgba(80,130,118,.12)}.assistant-suggestion .suggestion-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.assistant-suggestion .suggestion-grid span{background:#fff;padding:9px 10px;border-radius:12px}.history-fill-grid{display:flex;gap:10px;flex-wrap:wrap}.history-fill-card{border:0;background:var(--theme-soft);border-radius:16px;padding:12px 14px;text-align:left;cursor:pointer}.history-fill-card strong,.history-fill-card small{display:block}.history-fill-card small{color:#7a8d91;margin-top:3px}
.smart-fill{padding:12px 14px;border-radius:14px;background:#eef8ff;border:1px solid #cfe7f5}.smart-fill button{margin-left:8px}
.highlight{background:#fff1a8;color:#725a00;border-radius:4px;padding:0 2px}.match-source{display:inline-block;margin-top:5px;font-size:.7rem;color:#7b9094;background:#eef4f3;border-radius:999px;padding:3px 7px}
.nav-assistant span{background:var(--theme-primary)!important;color:#fff!important;border-radius:50%;width:44px;height:44px;display:grid!important;place-items:center;margin:-18px auto 2px;box-shadow:0 10px 24px color-mix(in srgb,var(--theme-primary) 30%,transparent)}
body.density-compact .panel{padding:15px}body.density-compact .tx-card{padding:10px}body.density-comfortable .panel{padding:26px}body.density-comfortable .tx-card{padding:18px}
@media(max-width:760px){.settings-grid-menu{grid-template-columns:repeat(2,minmax(0,1fr))}.calendar-grid{gap:5px}.calendar-day{min-height:74px;padding:7px}.calendar-day .day-expense{margin-top:10px;font-size:.72rem}.assistant-hero{align-items:flex-start;gap:12px}.goal-grid{grid-template-columns:1fr}.compare-row{grid-template-columns:54px 1fr}.compare-values{display:none}}
.sankey-shell{min-height:250px;overflow:auto}.sankey-svg{width:100%;min-width:680px;height:260px}.sankey-node rect{rx:9;ry:9}.sankey-node text{font-size:12px;fill:var(--theme-ink)}.sankey-link{fill:none;stroke:var(--theme-primary);stroke-opacity:.16;stroke-linecap:round}.sankey-column-label{font-size:11px;fill:#7e9398;text-transform:uppercase;letter-spacing:.08em}
.sankey-shell{min-height:250px;overflow:auto}.sankey-svg{width:100%;min-width:680px;height:260px}.sankey-node rect{rx:9;ry:9}.sankey-node text{font-size:12px;fill:var(--theme-ink)}.sankey-link{fill:none;stroke:var(--theme-primary);stroke-opacity:.18;stroke-linecap:round}.sankey-column-label{font-size:11px;fill:#7e9398;letter-spacing:.06em}
.report-modal{max-width:640px}.report-sheet-hint{font-size:.82rem;line-height:1.6;color:#748b8f;background:var(--theme-soft);border-radius:14px;padding:12px 14px}.report-check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:8px}.report-check-grid .checkbox{background:#fff;border:1px solid #e1ece8;border-radius:13px;padding:10px 12px}.report-modal .privacy-note{margin-top:4px}@media(max-width:620px){.report-check-grid{grid-template-columns:1fr}}


/* V2.2 transaction smart-entry enhancements */
.transaction-modal{width:min(820px,calc(100% - 26px))}
.tx-smart-notice{margin:-2px 0 14px;padding:11px 13px;border-radius:14px;background:linear-gradient(135deg,#edf9f4,#eef7fd);border:1px solid #d4ebe3;color:#5e7f79;font-size:11px;line-height:1.55}
.tx-quick-types{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:0 0 14px;padding:10px 12px;border-radius:16px;background:#f7fbf9;border:1px solid #e3efea}
.tx-quick-types>span{font-size:10px;color:#819699;font-weight:700;margin-right:2px}
.tx-quick-types button{border:1px solid #dcebe5;background:#fff;color:#66837d;border-radius:999px;padding:6px 10px;font-size:10px}
.tx-quick-types button:hover,.tx-quick-types button.active{background:var(--theme-soft);border-color:color-mix(in srgb,var(--theme-primary) 45%,#dcebe5);color:var(--accent-deep);font-weight:700}
.smart-select-field{position:relative}
/* 原生 select 只作为取值容器，视觉上收起来，避免和搜索框并排出现两个一样的字段 */
.smart-select-field>select{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none;margin:0;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%)}
.smart-select-input{background-color:#fbfefd!important;border-color:#d9ebe5!important;padding-right:32px!important;
  background-image:linear-gradient(45deg,transparent 50%,#96b3ab 50%),linear-gradient(135deg,#96b3ab 50%,transparent 50%)!important;
  background-position:calc(100% - 17px) calc(50% + 2px),calc(100% - 12px) calc(50% + 2px)!important;
  background-size:5px 5px,5px 5px!important;background-repeat:no-repeat!important}
.smart-select-input:focus{border-color:var(--theme-primary)!important;background-color:#fff!important}
.smart-select-menu{position:absolute;left:0;right:0;top:54px;z-index:80;background:#fff;border:1px solid #dcebe6;border-radius:15px;box-shadow:0 16px 36px rgba(36,82,70,.16);padding:7px;max-height:260px;overflow:auto;color:var(--theme-ink)}
.smart-select-field:has(.smart-select-input + .smart-select-menu)>select+.smart-select-menu{top:auto}
.smart-select-menu .smart-group-title{padding:5px 7px 3px;color:#91a3a5;font-size:9px;font-weight:800;letter-spacing:.08em}
.smart-select-menu button{width:100%;border:0;background:transparent;border-radius:10px;padding:9px 10px;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:10px;color:#536f69;font-size:11px}
.smart-select-menu button:hover,.smart-select-menu button.best{background:var(--theme-soft);color:#347c68}
.smart-select-menu button.best strong:before{content:"最佳匹配 · ";font-size:9px;color:#74a293;font-weight:600}
.smart-select-menu button small{color:#92a4a5;font-size:9px;white-space:nowrap}
.smart-select-menu .smart-create{border-top:1px solid #edf3f1;margin-top:4px;border-radius:0 0 10px 10px;color:#3f8b73;font-weight:700}
.smart-select-menu .smart-group-title.is-best{color:#3f8b73;background:var(--theme-soft);border-radius:8px 8px 0 0}
.smart-select-menu .smart-group-hint{padding:3px 10px 7px;color:#aab8b8;font-size:10px}
.smart-select-menu .smart-menu-scroll{max-height:148px;overflow:auto;border-top:1px dashed #edf3f1;margin-top:3px;padding-top:3px}
.smart-select-menu .smart-menu-scroll::-webkit-scrollbar{width:4px}
.smart-select-menu .smart-menu-scroll::-webkit-scrollbar-thumb{background:#dcebe6;border-radius:4px}
#txPartySuggest{top:54px}
#txTagSuggest{top:54px}
#txDuplicateSuggest{margin:0}
#txDuplicateSuggest .dup-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
#txDuplicateSuggest button{border:1px solid #efd59f;background:#fffaf0;border-radius:999px;padding:6px 9px;font-size:10px;color:#88662d}
#txHistorySuggest .history-actions{display:inline-flex;gap:6px;flex-wrap:wrap;margin-left:8px}
#txHistorySuggest .history-actions button{margin-left:0}
.transaction-modal .tag-picker{margin-top:3px}
.transaction-modal .form-grid{align-items:start}
.transaction-modal .form-grid label{min-width:0}
@media(max-width:620px){
  .transaction-modal .form-grid{grid-template-columns:1fr}
  .transaction-modal .span-2{grid-column:span 1}
  .transaction-modal .modal-head{align-items:flex-start}
  .transaction-modal .modal-head-actions{flex-wrap:wrap;justify-content:flex-end}
  .transaction-modal .modal-actions{flex-wrap:wrap}
  #saveAndNextTxBtn{order:3;width:100%}
  .smart-select-menu{position:static;margin-top:2px}
}

/* ===== Phase B：完整视觉主题系统（图案背景 / 人物 Hero / 主题圆角 / 空状态插画） ===== */
html{--theme-pattern:none;--theme-pattern-opacity:0;--theme-empty:none;--theme-radius:24px}
body::after{content:"";position:fixed;inset:0;background:var(--theme-pattern);background-size:64px 64px;opacity:var(--theme-pattern-opacity);pointer-events:none;z-index:60}
.panel,.profile-hero{border-radius:var(--theme-radius)}
.theme-hero-art{position:absolute;right:10px;bottom:-4px;width:112px;height:112px;background-repeat:no-repeat;background-size:contain;background-position:center bottom;z-index:0;pointer-events:none}
.profile-copy,.profile-hero .btn{z-index:1}
.empty{background:var(--theme-empty) center 14px/132px no-repeat;padding-top:158px}
.theme-group-chips{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 2px}
.theme-group-chips button{border:1px solid rgba(96,130,125,.2);background:#fff;border-radius:999px;padding:7px 14px;font-size:12px;cursor:pointer;color:#57706f}
.theme-group-chips button.active{background:var(--theme-primary);border-color:var(--theme-primary);color:#fff;font-weight:700}

/* ===== Phase C：真实 UI 整合（首页 Hero / 主题中心预览 / 我的分区 / 深色可读性） ===== */

/* 首页主题 Hero：人物图案融入首页顶部，但不遮挡下方金额、收支、结余等数据 */
.home-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:14px;background:linear-gradient(135deg,var(--theme-soft),#fff 70%);border:1px solid rgba(96,130,125,.1)}
.home-hero .theme-hero-art{position:relative;right:auto;bottom:auto;width:104px;height:104px;flex:0 0 auto;opacity:.95}
.home-hero-text{min-width:0}
.home-hero-text h2{font-size:clamp(20px,5.4vw,26px);letter-spacing:-.02em;margin:2px 0 6px}
.home-hero-text p{margin:0;color:#6d858a;font-size:12px;font-weight:600}
.home-hero #homeHeroKicker{margin-bottom:4px}

/* 主题中心：更真实的预览卡（背景缩略 / 配色 / 类型 / 使用状态） */
.theme-card{position:relative;overflow:hidden;transition:transform .16s ease,box-shadow .16s ease}
.theme-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(51,110,91,.1)}
.theme-card .theme-preview{transition:background .2s ease}
.theme-card-type{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:999px;background:var(--theme-soft);color:var(--theme-primary);font-size:10px;font-weight:700;letter-spacing:.02em}
.theme-card-badge{position:absolute;top:9px;right:9px;background:var(--theme-primary);color:#fff;font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px;box-shadow:0 4px 10px rgba(30,120,96,.25)}
.theme-card.active{border-color:color-mix(in srgb,var(--theme-primary) 55%,transparent)}

/* 我的：数据与隐私分区标题 */
.settings-section-title{margin:22px 4px 4px;font-size:12px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-deep)}

/* 通用加载 / 提示态（统一空状态已用 .empty；此处补充骨架与提示） */
.skeleton{background:linear-gradient(90deg,rgba(125,151,155,.12),rgba(125,151,155,.22),rgba(125,151,155,.12));background-size:200% 100%;animation:sk 1.2s infinite;border-radius:10px}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}
.app-spinner{width:18px;height:18px;border:2.5px solid rgba(103,200,168,.25);border-top-color:var(--theme-primary);border-radius:50%;animation:spin .7s linear infinite;display:inline-block}
@keyframes spin{to{transform:rotate(360deg)}}

/* 深色主题可读性：覆盖浅色硬编码，保证文字、卡片、输入在深色主题下清晰 */
body.theme-dark{--text:#eef4ff;--muted:#9fb0c8;--line:#2c3550;--panel:rgba(34,40,62,.92);--bg:#10131f;--bg-2:#161b2c}
body.theme-dark .panel,body.theme-dark .profile-hero{background:rgba(34,40,62,.92);color:#eef4ff;border-color:rgba(255,255,255,.06)}
body.theme-dark .panel h2,body.theme-dark .panel h3,body.theme-dark .panel p,body.theme-dark .section-kicker{color:inherit}
body.theme-dark .section-kicker{color:var(--theme-accent)}
body.theme-dark .metric-card{background:rgba(44,52,78,.85);color:#eef4ff}
body.theme-dark .metric-card .label,body.theme-dark .metric-card .sub{color:#9fb0c8}
body.theme-dark .tx-card{background:rgba(44,52,78,.8);border-color:rgba(255,255,255,.08);color:#eef4ff}
body.theme-dark .tx-card .tx-meta,body.theme-dark .tx-card .tx-note{color:#9fb0c8}
body.theme-dark .tx-tags span{background:rgba(255,255,255,.1);color:#cfe0d8}
body.theme-dark input,body.theme-dark select,body.theme-dark textarea{background:rgba(255,255,255,.06);color:#eef4ff;border-color:#33405e}
body.theme-dark input::placeholder,body.theme-dark textarea::placeholder{color:#7e8aa3}
body.theme-dark .segmented{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.08)}
body.theme-dark .segmented button{color:#9fb0c8}
body.theme-dark .btn.ghost,body.theme-dark .file-btn.secondary{background:rgba(255,255,255,.08);color:#cfe0d8}
body.theme-dark .chip,body.theme-dark .chip-list .chip{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12);color:#cfe0d8}
body.theme-dark .empty{color:#9fb0c8}
body.theme-dark .theme-group-chips button{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.14);color:#cfe0d8}
body.theme-dark .theme-card{background:rgba(44,52,78,.8);border-color:rgba(255,255,255,.1);color:#eef4ff}
body.theme-dark .theme-card small{color:#9fb0c8}
body.theme-dark .bottom-nav{background:rgba(28,34,52,.94);border-color:rgba(255,255,255,.1)}
body.theme-dark .nav-item{color:#8a99b4}
body.theme-dark .topbar{background:linear-gradient(180deg,rgba(16,19,31,.97),rgba(16,19,31,.8) 72%,rgba(16,19,31,0))}
body.theme-dark .icon-btn{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.12);color:#eef4ff}
body.theme-dark .pending-card{background:linear-gradient(135deg,rgba(255,200,140,.16),rgba(255,255,255,.04));color:#f0d8b8;border-color:rgba(255,200,140,.25)}

@media (max-width:520px){
  .home-hero{padding:16px}
  .home-hero .theme-hero-art{width:84px;height:84px}
  .theme-library{grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:10px}
}

