:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC",sans-serif;color:#292521;background:#faf8f4;font-synthesis:none}*{box-sizing:border-box}html,body{max-width:100%;overflow-x:hidden}body{margin:0;-webkit-text-size-adjust:100%;touch-action:pan-y}.hidden{display:none!important}button,input,textarea,select{font:inherit}button{cursor:pointer}header{height:52px;padding:0 max(14px,calc((100vw - 980px)/2));display:flex;align-items:center;justify-content:space-between;background:#fffdf9;border-bottom:1px solid #e8e2d9;position:sticky;top:0;z-index:4}h1,h2,p{margin:0}h1{font-size:20px;line-height:1}h2{font-size:18px}.eyebrow{font-size:9px;letter-spacing:.06em;color:#8b837b;font-weight:750;margin-bottom:3px}.muted{color:#80776f;margin-top:8px;font-size:13px}.header-actions{display:flex;align-items:center;gap:6px}.total-pill,.primary{border:0;background:#5f4fc5;color:white;font-weight:750;border-radius:10px;padding:10px 13px}.total-pill{background:#292521;color:#ffd27d}.compact{padding:8px 11px}.icon-button{border:1px solid #ded8d0;background:#fff;border-radius:9px;padding:7px;color:#706860}main{max-width:980px;margin:auto;padding:10px 20px 60px}nav{display:flex;gap:4px;background:#ebe6df;width:max-content;padding:3px;border-radius:10px}nav button,.auth-tabs button{border:0;background:transparent;padding:7px 15px;border-radius:8px;color:#746c64}nav button.active,.auth-tabs button.active{background:#fff;color:#302b27;box-shadow:0 2px 8px #332a2412;font-weight:750}.top-nav{margin:0}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.channel-tools{display:flex;align-items:center;gap:10px;margin-bottom:9px}.channel-tools #add-expense{flex:0 0 auto;min-height:34px}.member-filter{display:flex;flex:1;gap:6px;overflow-x:auto;padding:0}.member-filter button{flex:0 0 auto;border:1px solid #ded8d0;background:#fff;border-radius:999px;padding:5px 10px;color:#625b54;font-size:11px}.member-filter button.active{background:#5f4fc5;border-color:#5f4fc5;color:#fff}.member-filter button:disabled{color:#bbb4ad;background:#f4f1ec}.feed{display:grid;gap:10px}.card{background:#fff;border:1px solid #e8e2d9;border-radius:15px;padding:14px;box-shadow:0 3px 12px #392f2510}.author-row,.amount-row,.meta-row,.member-row{display:flex;align-items:center}.avatar{width:35px;height:35px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#5f4fc5;font-weight:800;margin-right:10px}.author-copy{flex:1;min-width:0}.author{font-size:14px;font-weight:800}.time,.meta,.comment-time{font-size:11px;color:#948b83}.record-actions{display:flex;gap:9px}.amount-row{align-items:center;margin-top:11px;gap:12px}.amount-copy{flex:1}.tag{display:inline-block;background:#edf6f1;color:#187762;padding:3px 7px;border-radius:7px;font-size:10px;font-weight:800}.expense-title{font-weight:850;font-size:16px;margin-top:5px}.amount{font-size:19px;font-weight:900}.note{color:#68615a;font-size:13px;line-height:1.45;margin-top:8px}.attachments{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:7px;margin-top:10px}.image-thumb{display:block;border:0;padding:0;background:transparent;min-width:0}.attachments img{display:block;width:100%;height:88px;object-fit:cover;border-radius:9px;border:1px solid #e6e0d8}.meta-row{justify-content:space-between;border-top:1px solid #eee9e2;margin-top:11px;padding-top:10px}.link-button,.delete,.void,.export{border:0;background:none;padding:0;color:#5f4fc5;text-decoration:none;font-size:12px;font-weight:750}.delete{color:#b4554f}.void{color:#8c7560}.comments{margin-top:8px;display:grid;gap:6px}.comment{background:#f4f1ec;border-radius:9px;padding:8px;font-size:12px}.comment strong{margin-right:5px}.voided{background:#f0f0f0;border-color:#d0d0d0;color:#929292;box-shadow:none}.voided :is(.author,.time,.tag,.expense-title,.amount,.note,.meta,.link-button,.comment,.comment strong){color:#929292!important}.voided .tag{background:#e2e2e2}.voided .author-row,.voided .amount-row,.voided .note,.voided .attachments,.voided .meta-row,.voided .comments{text-decoration:line-through}.voided img{filter:grayscale(1);opacity:.55}.summary-hero{background:#292521;color:white;border-radius:18px;padding:25px;margin-bottom:24px}.summary-hero p,.summary-hero span{color:#bdb5ad;font-size:12px}.summary-hero strong{display:block;font-size:34px;margin:8px 0;color:#fff}.member-row{background:#fff;border:1px solid #e8e2d9;border-radius:14px;padding:15px;margin-bottom:9px}.member-copy{flex:1}.member-amount{font-weight:850}.export-head{gap:10px}.export-head .export{color:#fff;white-space:nowrap}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:20px}.auth-card{width:min(410px,100%);background:#fff;border:1px solid #e7e0d8;border-radius:22px;padding:28px;box-shadow:0 20px 70px #3a2f2430}.brand-mark{width:50px;height:50px;border-radius:15px;background:#5f4fc5;color:white;display:grid;place-items:center;font-size:22px;font-weight:900;margin-bottom:20px}.auth-tabs{display:flex;background:#eee9e2;padding:4px;border-radius:12px;margin:22px 0 14px}.auth-tabs button{flex:1}label{display:grid;gap:7px;font-size:12px;font-weight:750;color:#625b54;margin:13px 0}input,textarea,select{width:100%;border:1px solid #dad3cb;background:white;border-radius:11px;padding:12px;color:#292521}textarea{min-height:82px;resize:vertical}.dialog-form input:not([type=hidden]),.dialog-form select,.date-picker{min-height:58px;font-size:17px;padding:14px}.dialog-form textarea{min-height:118px;font-size:16px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-row label{min-width:0}.date-field{width:52%}.date-picker{text-align:left;font-weight:700}.auth-card .primary,.dialog-form>.primary{width:100%;margin-top:10px}.error{color:#b7443e;min-height:18px;font-size:12px;margin-top:10px}dialog{border:0;border-radius:20px;padding:0;width:min(520px,calc(100% - 24px));max-height:calc(100dvh - 24px);box-shadow:0 20px 90px #211b1666}dialog::backdrop{background:#211d1a99}.dialog-form{padding:23px;max-height:calc(100dvh - 24px);overflow-y:auto}.dialog-head{display:flex;justify-content:space-between;align-items:start}.close{border:0;background:#eee9e2;width:42px;height:42px;border-radius:50%;font-size:30px;color:#635c55}.upload{border:1px dashed #c9c0b6;padding:13px;border-radius:12px}.upload input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.upload span{color:#8d857d;font-weight:400}.pick-button{display:inline-block!important;width:max-content;background:#eee9e2;border-radius:9px;padding:10px 14px;color:#3d3731!important;font-weight:750!important}.file-preview{display:flex;gap:7px;flex-wrap:nowrap;overflow-x:auto;padding:4px 2px 6px;margin-top:5px}.preview-chip{position:relative;flex:0 0 54px;height:54px}.file-preview img{display:block;width:54px;height:54px;object-fit:cover;border-radius:8px;border:1px solid #e1d9d0}.remove-preview{position:absolute;right:-6px;top:-6px;z-index:1;width:20px;height:20px;border:1px solid #fff;border-radius:50%;background:#403a35;color:#fff;font-size:17px;line-height:16px;padding:0}.add-preview{flex:0 0 54px;height:54px;border:1px dashed #bdb5ad;border-radius:8px;background:#faf8f4;color:#5f4fc5;font-size:28px;line-height:1}.date-dialog{width:min(380px,calc(100% - 32px));background:#fff}.date-form{padding:20px}.date-selects{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}.date-selects label{font-size:12px}.date-selects select{padding:11px 8px;font-size:14px}.date-form .primary{width:100%;margin-top:16px}.image-dialog{width:auto;max-width:calc(100vw - 40px);height:auto;max-height:calc(100dvh - 90px);padding:12px;border-radius:16px;background:#181614;overflow:visible}.image-dialog::backdrop{background:#181614cc}.image-dialog img{display:block;max-width:calc(100vw - 64px);max-height:calc(100dvh - 126px);width:auto;height:auto;object-fit:contain;border-radius:9px}.image-close{position:absolute;right:-10px;top:-10px;width:34px;height:34px;border:2px solid #fff;border-radius:50%;background:#292521;color:#fff;font-size:24px;line-height:28px;z-index:1}.empty{text-align:center;color:#8a8178;padding:70px 20px;background:#fff;border:1px dashed #d8d0c7;border-radius:17px}#toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(30px);background:#292521;color:#fff;padding:10px 15px;border-radius:10px;opacity:0;pointer-events:none;transition:.2s;z-index:20;font-size:12px}#toast.show{opacity:1;transform:translateX(-50%) translateY(0)}@media(max-width:620px){header{padding:0 12px;height:48px}.total-pill{padding:7px 9px;font-size:11px}main{padding:8px 12px 60px}.card{padding:12px}.amount{font-size:17px}.attachments{grid-template-columns:repeat(3,1fr)}.attachments img{height:76px}.summary-hero strong{font-size:28px}.dialog-form{padding:20px}.date-field{width:58%}.image-dialog{max-width:calc(100vw - 28px);padding:10px}.image-dialog img{max-width:calc(100vw - 48px);max-height:calc(100dvh - 110px)}}
/* Theme control and dark appearance. */
.theme-toggle{width:39px;height:34px;border:1px solid #ded8d0;border-radius:9px;background:#292521;color:#ffd27d;font-size:21px;line-height:1;padding:0}.dark{background:#181716;color:#f1eee9}.dark header{background:#211f1d;border-color:#403c37}.dark nav{background:#35312d}.dark nav button{color:#b9b1aa}.dark nav button.active{background:#4a4540;color:#fff;box-shadow:none}.dark .icon-button,.dark .member-filter button,.dark input,.dark textarea,.dark select,.dark .date-picker{background:#292725;color:#f1eee9;border-color:#4a4641}.dark .card,.dark .member-row,.dark .auth-card{background:#242220;border-color:#413d38;box-shadow:none}.dark .note,.dark .muted{color:#c4bdb5}.dark .time,.dark .meta,.dark .eyebrow{color:#aaa29a}.dark .comment{background:#312e2a}.dark .upload{border-color:#625c56}.dark .summary-hero{background:#0f0e0d}.dark .theme-toggle{background:#f4c96b;color:#292521;border-color:#f4c96b}.dark .member-filter button:disabled{background:#292725;color:#77716b}
html:has(body.dark),body.dark{background:#181716}body{min-height:100dvh}
.dark dialog:not(.image-dialog),.dark .dialog-form{background:#242220;color:#f1eee9}.dark .dialog-form label{color:#d6d0c9}.dark .dialog-form .close{background:#3a3632;color:#f1eee9}.dark .dialog-form .upload{background:#292725;border-color:#625c56}.dark dialog::backdrop{background:#0d0c0bea}
.image-nav{position:absolute;top:50%;z-index:2;width:38px;height:54px;transform:translateY(-50%);border:0;border-radius:10px;background:#0009;color:#fff;font-size:42px;line-height:42px}.image-prev{left:14px}.image-next{right:14px}.image-counter{position:absolute;left:50%;bottom:20px;transform:translateX(-50%);z-index:2;background:#0009;color:#fff;border-radius:999px;padding:4px 10px;font-size:12px}
.image-dialog::backdrop{background:#f4f1ecdf}.dark .image-dialog::backdrop{background:#0d0c0bea}
.attachments img,.image-dialog img{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.month-filter{flex:1;min-width:0;max-width:145px;height:34px;margin:0 7px;padding:0 8px;border:1px solid #ded8d0;border-radius:9px;background:#fff;color:#625b54;font-size:12px;font-weight:700}.dark .month-filter{background:#292725;color:#f1eee9;border-color:#4a4641}@media(max-width:620px){header{gap:4px;padding:0 8px}.top-nav button{padding:7px 11px}.header-actions{gap:3px}.header-actions .icon-button{padding:7px 8px}.month-filter{margin:0 2px;max-width:none;font-size:11px}.theme-toggle{width:35px;height:34px}}
.analytics-card{margin-top:18px;padding:16px;border:1px solid #e8e2d9;border-radius:16px;background:#fff}.analytics-head,.analytics-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.period-buttons{display:flex;gap:4px;padding:3px;border-radius:9px;background:#eee9e2}.period-buttons button{border:0;border-radius:7px;background:transparent;padding:6px 10px;color:#746c64;font-size:12px;font-weight:750}.period-buttons button.active{background:#5f4fc5;color:#fff}.analytics-card canvas{display:block;width:100%;height:190px;margin:12px 0 6px}.analytics-filters{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:10px}.analytics-filters label{margin:0;font-size:11px}.analytics-filters input,.analytics-filters select{padding:9px;min-height:40px;font-size:13px}.analytics-actions{margin-top:14px;font-size:13px;font-weight:800}.dark .analytics-card{background:#242220;border-color:#413d38}.dark .period-buttons{background:#35312d}.dark .period-buttons button{color:#c8c0b9}.dark .analytics-filters input,.dark .analytics-filters select{background:#292725;color:#f1eee9;border-color:#4a4641}@media(max-width:620px){.analytics-card{padding:13px}.analytics-filters{grid-template-columns:1fr 1fr}.analytics-filters label:first-child{grid-column:1/-1}.analytics-actions{align-items:flex-start;flex-direction:column}.analytics-actions .primary{width:100%}}

/* Member identity is the coloured one-character avatar; names stay out of the feed. */
.avatar{background:var(--member-color,#5f4fc5)}
.avatar-small{width:25px;height:25px;margin:0;font-size:11px}
.member-filter-avatar{padding:3px!important;display:grid;place-items:center}
.member-filter-avatar.active .avatar{outline:2px solid #5f4fc5;outline-offset:2px}
.comment .avatar{display:inline-grid;vertical-align:middle;margin-right:5px}
.income-hero{background:#244b42;margin-top:24px}
.small-empty{padding:18px;margin-bottom:10px}
.brand-mark{background:linear-gradient(145deg,#ffb44c,#ed704e)}
.restore{border:0;background:none;padding:0;color:#2a9878;text-decoration:none;font-size:12px;font-weight:750}
.export-head .export{display:inline-flex;align-items:center;justify-content:center;background:#5f4fc5!important;color:#fff!important;border:1px solid #5f4fc5!important;box-shadow:0 2px 7px #5f4fc544}
.export-head .export:hover{background:#4f40b1!important}
.dark .export-head .export{background:#7667dd!important;border-color:#8c80ee!important;color:#fff!important;box-shadow:none}
/* Contrast safety: avoid faded controls on either theme. */
body:not(.dark) .icon-button,body:not(.dark) .month-filter{color:#3f3934;border-color:#bcb4aa;background:#fff}
.dark .icon-button,.dark .month-filter{color:#f4f0eb;border-color:#635d57}
.dark .analytics-filters label,.dark .analytics-actions,.dark .section-head h2{color:#f4f0eb}
.entry-type-buttons{display:flex;width:max-content;margin:8px 0 0;padding:3px;border-radius:9px;background:#eee9e2}.entry-type-buttons button{border:0;border-radius:7px;background:transparent;padding:6px 18px;color:#625b54;font-size:12px;font-weight:800}.entry-type-buttons button.active{background:#5f4fc5;color:#fff}.dark .entry-type-buttons{background:#35312d}.dark .entry-type-buttons button{color:#d8d0c9}.dark .entry-type-buttons button.active{background:#7667dd;color:#fff}

/* Android / ColorOS: compact, single-line command bar on narrow screens. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
header,.top-nav,.header-actions,.month-filter,.top-nav button,.header-actions button{white-space:nowrap}
@media(max-width:430px){
  header{height:54px;justify-content:flex-start;gap:4px;padding:0 8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}
  header::-webkit-scrollbar{display:none}
  .top-nav{flex:0 0 auto;gap:2px;padding:3px}
  .top-nav button{padding:7px 9px;font-size:13px;line-height:16px}
  .month-filter{flex:0 0 82px;width:82px;max-width:82px;height:34px;margin:0;padding:0 5px;font-size:11px}
  .header-actions{flex:0 0 auto;gap:3px}
  .header-actions .icon-button{min-width:39px;padding:7px;font-size:13px;line-height:18px}
  .theme-toggle{flex:0 0 35px}
}
.account-form{max-width:390px}.account-form .danger{width:100%;border:1px solid #c44a45;border-radius:10px;background:transparent;color:#b63e3a;padding:12px;font-weight:800}.account-form .account-warning{margin:0;font-size:12px;line-height:1.55;color:#9a625c}.dark .account-form .danger{border-color:#dc7770;color:#f09a91}.dark .account-form .account-warning{color:#d09a93}
.image-dialog{touch-action:none}.image-dialog img{transform-origin:center center;transition:transform .16s ease;cursor:zoom-in}.image-dialog img.zoomed{cursor:zoom-out}.image-download{position:absolute;left:-8px;top:-10px;z-index:2;border:1px solid #fff;border-radius:18px;background:#292521;color:#fff;padding:6px 10px;font-size:12px;font-weight:750}

/* Shop registration entry points and editable record table. */
.shop-entries{margin-top:16px;padding:15px;border:1px solid #e8e2d9;border-radius:16px;background:#fff}.shop-entries>div{display:grid;grid-template-columns:1fr 1fr;gap:10px}.shop-entry{border:0;border-radius:12px;padding:13px 14px;color:#fff;font-weight:850;font-size:16px;box-shadow:0 3px 9px #30271d1c}.doudian-entry{background:#237a62}.weidian-entry{background:#7460ce}.shop-page-head{display:flex;align-items:center;gap:10px;margin:3px 0 8px}.shop-page-head h2{flex:1;text-align:center}.back-button{border:1px solid #d7d0c8;border-radius:9px;background:#fff;color:#49423b;padding:8px 10px;font-size:12px;font-weight:750}.shop-page-head .primary{white-space:nowrap}.shop-hint{margin:0 0 12px}.shop-table-wrap{overflow:auto;border:1px solid #e2dbd2;border-radius:14px;background:#fff;box-shadow:0 3px 12px #392f2510}.shop-table{width:100%;min-width:700px;border-collapse:collapse;text-align:left}.shop-table th,.shop-table td{padding:13px 14px;border-right:1px solid #e8e2d9;border-bottom:1px solid #e8e2d9;font-size:13px;line-height:1.35;vertical-align:middle}.shop-table th{background:#e6f2df;color:#355638;font-size:12px;font-weight:850;white-space:nowrap}.shop-table th:last-child,.shop-table td:last-child{border-right:0}.shop-table tbody tr:last-child td{border-bottom:0}.shop-table tbody tr{cursor:pointer}.shop-table tbody tr:hover,.shop-table tbody tr:focus{background:#faf6ed;outline:none}.cell-placeholder{color:#a19890}.shop-table+*{margin-top:10px}.dark .shop-entries,.dark .shop-table-wrap{background:#242220;border-color:#413d38;box-shadow:none}.dark .back-button{background:#292725;color:#f4f0eb;border-color:#625c56}.dark .shop-table th,.dark .shop-table td{border-color:#47423d}.dark .shop-table th{background:#304a39;color:#e4f2e7}.dark .shop-table tbody tr:hover,.dark .shop-table tbody tr:focus{background:#302d29}.dark .cell-placeholder{color:#928b84}@media(max-width:620px){.shop-page-head{align-items:flex-start;flex-wrap:wrap}.shop-page-head h2{order:-1;flex:1;text-align:left;font-size:19px}.shop-page-head .primary{margin-left:auto}.shop-entry{padding:12px;font-size:15px}}
.shop-attachment-list{display:flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:154px}.shop-attachment{width:42px;height:42px;border:1px solid #ddd5cb;border-radius:6px;overflow:hidden;padding:0;background:#fff}.shop-attachment img{display:block;width:100%;height:100%;object-fit:cover}.shop-download,.shop-delete{border:0;background:transparent;padding:3px 0;color:#5f4fc5;font-size:11px;font-weight:800;text-decoration:none}.shop-delete{color:#b4554f;white-space:nowrap}.dark .shop-attachment{background:#292725;border-color:#625c56}.dark .shop-download{color:#9b8fff}.dark .shop-delete{color:#ed8b84}

/* Live commerce figures stay below the income feed until platform connectors are authorised. */
.store-live-dashboard{margin-top:18px;padding:16px;border:1px solid #e1d9d0;border-radius:17px;background:#fff;box-shadow:0 3px 12px #392f2510}.store-live-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.store-refresh{border:1px solid #d5cdc4;background:#fff;color:#4a433c;border-radius:9px;padding:7px 11px;font-size:12px;font-weight:800}.store-live-status{margin:8px 0 13px}.store-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.store-kpis>div{min-width:0;padding:11px 10px;border-radius:12px;background:#f5f2ed}.store-kpis span{display:block;color:#766e66;font-size:11px;font-weight:700}.store-kpis strong{display:block;margin-top:5px;color:#28231f;font-size:17px;white-space:nowrap}.store-live-list{display:grid;gap:7px;margin-top:12px}.store-live-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid #ebe5dd;border-radius:11px}.store-live-row>div:first-child{display:grid;gap:4px;min-width:0}.store-live-row strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.store-live-row span{font-size:11px;color:#817970}.sync-badge{display:inline-block;border-radius:999px;padding:2px 6px;font-size:10px;font-weight:800}.sync-badge.connected{background:#e5f3ec;color:#167156}.sync-badge.pending{background:#f1ece4;color:#856e56}.sync-badge.error{background:#fbe9e8;color:#aa4e49}.store-live-row-data{max-width:48%;font-size:11px;color:#706860;text-align:right;line-height:1.45}.store-live-empty{padding:14px;text-align:center;color:#8a8178;border:1px dashed #d8d0c7;border-radius:11px;font-size:12px}.dark .store-live-dashboard{background:#242220;border-color:#413d38;box-shadow:none}.dark .store-refresh{background:#292725;color:#f4f0eb;border-color:#625c56}.dark .store-kpis>div{background:#302d29}.dark .store-kpis span,.dark .store-live-row span,.dark .store-live-row-data{color:#bbb3ab}.dark .store-kpis strong{color:#f7f3ee}.dark .store-live-row{border-color:#47423d}.dark .sync-badge.pending{background:#423a31;color:#e5cda9}.dark .sync-badge.connected{background:#193e32;color:#9de1c2}.dark .sync-badge.error{background:#472b2a;color:#f0a19b}.dark .store-live-empty{border-color:#625c56;color:#aaa29a}@media(max-width:620px){.store-live-dashboard{padding:13px}.store-kpis{gap:6px}.store-kpis>div{padding:10px 8px}.store-kpis strong{font-size:15px}.store-live-row{align-items:flex-start;flex-direction:column}.store-live-row-data{max-width:none;text-align:left}}
