@media screen and (max-width:800px){
 body.mcb-open{background:#f3f7fd;color:#142d50}
 body.mcb-open .topbar,body.mcb-open .mobile-quick-nav{display:none!important}
 body.mcb-open .content>.actions{padding:10px 16px;margin:0!important;background:#fff}
 body.mcb-open .content{padding:0 0 calc(134px + env(safe-area-inset-bottom))!important;max-width:100%;background:#f3f7fd}
 .mcb{--accent:#1039f4;--panel:#fff;--line:#dce5f0;color:#142d50;font-family:inherit;min-width:0}
 .mcb-sticky-top{position:sticky;top:0;z-index:5;background:#fff}
 .mcb-head{display:flex;align-items:center;gap:8px;padding:6px 12px;background:#fff;border-bottom:1px solid #dce5f0}
 .mcb-head>div{min-width:0;flex:1}.mcb-head h1{font-size:21px;margin:0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;line-height:1.4}.mcb-head small{font-size:11px;color:#506580}
 .mcb-button{border:1px solid #ccd9ec;background:transparent;color:#1039f4;min-height:46px;padding:10px 15px;border-radius:12px;font-family:inherit;font-size:16px;font-weight:600;line-height:1.35;cursor:pointer;touch-action:manipulation}
 .mcb-head .mcb-button{border:0;padding:8px;min-width:38px;font-size:18px}.mcb-head .mcb-button:first-child{font-size:32px;color:#142d50}
 .mcb-button.green{background:#159a54;color:#fff;border-color:#159a54}.mcb-button.red{background:#c83a3e;color:#fff;border-color:#c83a3e}.mcb-button.primary{background:#1039f4;color:#fff;border-color:#1039f4}.mcb-button:disabled{opacity:.5;cursor:wait}
 .mcb-search{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#fff;border-bottom:1px solid #dce5f0}.mcb-search span{font-size:30px;color:#1039f4}.mcb-search input{border:0!important;background:transparent!important;color:#142d50!important;-webkit-text-fill-color:#142d50;caret-color:#1039f4;color-scheme:light;font-size:17px!important;min-width:0;width:100%;padding:10px 0!important;box-shadow:none!important}
 .mcb-filters{display:flex;flex-wrap:wrap;gap:9px;padding:16px;scrollbar-width:none}.mcb-filters .mcb-button{border-radius:28px;background:#fff;flex-shrink:0;max-width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#142d50;font-size:14px;min-height:42px}
 .mcb-summary{margin:0 16px 22px;border-radius:16px;background:#fff;overflow:hidden}.mcb-summary>div{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;font-size:15px}.mcb-summary>div:first-child{border-bottom:1px solid #dce5f0;padding-block:17px;margin-bottom:6px}.mcb-summary strong{font-size:17px;white-space:nowrap}.mcb-summary b{white-space:nowrap}.mcb-summary>.mcb-button{display:block;width:100%;border:0;border-top:1px solid #dce5f0;border-radius:0;margin-top:6px}
 .mcb-in{color:#087f48!important}.mcb-out{color:#c73542!important}.mcb-count{text-align:center;font-size:13px;color:#506580;margin:24px 16px 16px}.mcb-date{font-size:14px;font-weight:500;margin:18px 16px 12px;color:#506580}
 .mcb-entry{display:block;text-align:left;width:100%;border:0;border-radius:0;background:#fff;color:#142d50;padding:18px 16px;margin:0 0 9px;cursor:pointer;box-shadow:none;font-family:inherit}.mcb-entry-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}.mcb-tags{display:flex;flex-wrap:wrap;gap:7px;align-content:start;align-items:start;min-width:0}.mcb-tag{background:#eaf0ff;color:#1039f4;border-radius:16px;padding:5px 10px;font-size:12px;line-height:1.4;overflow-wrap:anywhere}.mcb-tag.mode{background:#e7f4ff;color:#1665ad}.mcb-amount{text-align:right;min-width:0}.mcb-amount b{display:block;font-size:17px;white-space:nowrap}.mcb-amount small{font-size:10px;display:block;margin-top:7px;white-space:nowrap;color:#506580}.mcb-entry p{font-size:15px;line-height:1.5;overflow-wrap:anywhere;margin:16px 0 8px}.mcb-entry>small{font-size:13px;color:#506580}.mcb-entry footer{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #dce5f0;margin-top:15px;padding-top:11px;font-size:12px;color:#1665ad}.mcb-entry footer span:last-child{color:#506580;white-space:nowrap}.mcb-empty{padding:35px 20px;text-align:center;color:#506580}
 .mcb-bottom{position:fixed;z-index:15;left:0;right:0;bottom:0;display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:12px 16px calc(36px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #dce5f0}.mcb-bottom .mcb-button{font-size:20px;min-height:56px}
 #overlay .modal.mcb-full,#overlay .modal.mcb-sheet{background:#fff!important;color:#142d50;border:0!important;border-radius:18px 18px 0 0!important;width:100%!important;max-width:800px!important;box-shadow:none;display:flex;flex-direction:column;overflow:hidden;margin:0!important}
 #overlay .modal-cover:has(.mcb-full),#overlay .modal-cover:has(.mcb-sheet){padding:0!important;align-items:flex-end!important;background:#0009}
 #overlay .modal.mcb-full{height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
 #overlay .modal.mcb-sheet{max-height:90dvh!important}
 #overlay .mcb-full .modal-head,#overlay .mcb-sheet .modal-head{flex-shrink:0;padding:16px;border-bottom:1px solid #dce5f0;background:#fff}.mcb-full .modal-head h2,.mcb-sheet .modal-head h2{font-size:19px!important;color:#142d50!important}
 #overlay .mcb-full .modal-body,#overlay .mcb-sheet .modal-body{padding:18px 16px!important;overflow:auto!important;flex:1;min-height:0;overscroll-behavior:contain}
 #overlay .mcb-full .modal-footer,#overlay .mcb-sheet .modal-footer{position:static!important;flex-shrink:0;display:flex;flex-wrap:wrap;gap:12px;padding:12px 16px calc(36px + env(safe-area-inset-bottom))!important;border-top:1px solid #dce5f0;background:#fff}.mcb-full .modal-footer>* ,.mcb-sheet .modal-footer>*{flex:1;min-height:50px}
 .mcb-dialog{font-size:16px;line-height:1.5}.mcb-dialog .mcb-button{font-family:inherit;font-size:16px}.mcb-dialog input,.mcb-dialog textarea,.mcb-dialog select{font:inherit!important;color:#142d50!important;background:#fff!important;border:1px solid #ccd9ec!important;border-radius:9px;padding:12px!important;max-width:100%;min-width:0;box-sizing:border-box;color-scheme:light}.mcb-dialog textarea{resize:vertical;min-height:75px}.mcb-dialog input:focus,.mcb-dialog select:focus,.mcb-dialog textarea:focus{outline:2px solid #1039f4;outline-offset:2px}
 .mcb-field{display:flex;flex-direction:column;gap:8px;margin:22px 0;color:#506580;font-size:14px}.mcb-field[hidden]{display:none}.mcb-field input[name=amount]{font-size:26px!important;color:#087f48!important;min-height:65px}.mcb-datetime{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:22px 0}.mcb-datetime label{font-size:13px;color:#506580;min-width:0;display:flex;flex-direction:column;gap:6px}.mcb-dialog .mcb-datetime input{display:block;width:100%;max-width:100%;min-width:0;min-inline-size:0;box-sizing:border-box;appearance:none;-webkit-appearance:none;min-height:48px;padding:10px 8px!important}.mcb-datetime input::-webkit-date-and-time-value{min-width:0;text-align:left}.mcb-datetime input::-webkit-datetime-edit{padding:0}.mcb-type{display:flex;gap:12px}.mcb-type .mcb-button{border-radius:28px;flex:1;color:#142d50;background:#e9f0fa}.mcb-type .green{background:#159a54}.mcb-type .red{background:#c83a3e}
 .mcb-upload{display:block;width:fit-content;color:#1039f4;border:1px solid #b8cdef;border-radius:10px;padding:12px 15px;margin:20px 0;cursor:pointer;font-weight:600}.mcb-upload input{display:block;font-size:12px!important;max-width:260px;margin-top:8px;border:0!important;padding:0!important}
 .mcb-dialog fieldset{border:0;padding:0;margin:26px 0}.mcb-dialog legend{font-size:15px;color:#506580;margin-bottom:10px}.mcb-modes{display:flex;gap:10px}.mcb-modes label{flex:1;position:relative}.mcb-modes input{position:absolute;opacity:0;width:1px;height:1px}.mcb-modes span{display:block;text-align:center;background:#e9f0fa;padding:10px;border-radius:28px}.mcb-modes input:checked+span{background:#1039f4;color:#fff}.mcb-modes input:focus-visible+span{outline:2px solid #fff}
 .mcb-custom-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 40px;gap:8px;margin:10px 0}.mcb-custom-row .mcb-button{padding:4px}.mcb-attachment{display:flex;gap:8px;align-items:center;margin:8px 0;overflow-wrap:anywhere}.mcb-attachment>span{flex:1;min-width:0}.mcb-attachment a{max-width:100%;overflow-wrap:anywhere}.mcb-attachment .mcb-button{margin-left:auto;padding:5px;min-width:40px}.mcb-periods label{display:flex;align-items:center;gap:16px;padding:14px 12px;border-radius:10px;font-size:18px}.mcb-periods label:has(:checked){background:#39394f}.mcb-periods input{accent-color:#1039f4;width:23px;height:23px}
 .mcb-detail{border-radius:15px;background:#f3f7fd;border-top:5px solid #d2484d;padding:16px;overflow:hidden}.mcb-detail.in{border-top-color:#26bc75}.mcb-detail-date{display:flex;justify-content:space-between;gap:10px;font-size:14px}.mcb-detail-date small{text-align:right;font-size:11px}.mcb-detail-amount{display:block;font-size:28px;padding:14px 0 24px;white-space:nowrap}.mcb-detail p{border-top:1px solid #dce5f0;padding-top:18px;overflow-wrap:anywhere}.mcb-proofs{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}.mcb-proofs .receipt-link{display:inline-flex;flex-direction:column}.mcb-proofs img{width:64px;height:72px;object-fit:cover;border-radius:7px}.mcb-detail>.mcb-button{display:block;width:100%;margin-top:20px;border-width:1px 0 0;border-radius:0}.mcb-meta{margin:20px 0;background:#f3f7fd;padding:16px;border-radius:12px}.mcb-meta>div{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #dce5f0;font-size:14px}.mcb-meta b{text-align:right}.mcb-meta small{display:block;font-size:11px;font-weight:400;color:#506580;margin-top:4px}.mcb-meta .mcb-button{width:100%;border:0;margin-top:12px}.mcb-extra{padding:15px 0;border-bottom:1px solid #dce5f0;overflow-wrap:anywhere}.mcb-extra p{margin:7px 0}.mcb-dialog> .mcb-button{display:block;width:100%;text-align:left;margin:10px 0}.mcb-dialog>p{color:#506580;font-size:14px}.mcb-dialog #mcb-error{color:#b42332;white-space:pre-wrap}.mcb-dialog .cash-report-preview{min-width:600px}.mcb-dialog:has(.cash-report-preview){overflow:auto}
 @media(max-width:360px){.mcb-summary>div{padding:12px;font-size:13px}.mcb-summary strong{font-size:15px}.mcb-entry-top{grid-template-columns:1fr}.mcb-amount{text-align:left}.mcb-amount small{display:inline-block}.mcb-bottom .mcb-button{font-size:17px}.mcb-detail-amount{font-size:24px}}

 /* Keep form content within the viewport, including native iOS controls. */
 #overlay .mcb-full .modal-body,#overlay .mcb-sheet .modal-body{width:100%;min-width:0;max-width:100%;overflow-x:hidden!important;overflow-y:auto!important;touch-action:pan-y}
 .mcb-dialog,.mcb-dialog form,.mcb-field,.mcb-dialog fieldset,.mcb-type,.mcb-modes,.mcb-datetime{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
 .mcb-dialog form{margin:0;padding:0}
 .mcb-field input,.mcb-field textarea,.mcb-field select{display:block;width:100%;max-width:100%;min-width:0}
 .mcb-type>* ,.mcb-modes>*{min-width:0;flex:1 1 0}
 .mcb-type .green,.mcb-type .red{color:#fff}
 .mcb-upload{width:100%;max-width:100%;min-width:0;background:#f3f7ff;box-sizing:border-box}
 .mcb-upload input{width:100%;max-width:100%;min-width:0}
 .mcb-upload input::file-selector-button{background:#eaf0ff;color:#1039f4;border:1px solid #b8cdef;border-radius:8px;padding:8px;margin-right:8px}
 .mcb-dialog input::placeholder,.mcb-dialog textarea::placeholder{color:#6b7f98;opacity:1}
 .mcb-full .modal-head .iconbtn,.mcb-sheet .modal-head .iconbtn{color:#27476e;border-color:#ccd9ec;background:#f3f7fd}
 .mcb-full .modal-footer>* ,.mcb-sheet .modal-footer>*{min-width:0;flex:1 1 0;white-space:normal}
 .mcb-periods label:has(:checked){background:#eaf0ff;color:#1039f4}
 .mcb-periods input{padding:0!important;background:#fff!important}
 .mcb-dialog a{color:#1039f4}

 .mcb-search input::placeholder{color:#506580!important;-webkit-text-fill-color:#506580;opacity:1}
 .mcb-search input:focus,.mcb-search input:autofill{color:#142d50!important;-webkit-text-fill-color:#142d50;caret-color:#1039f4}
 .mcb-dialog input,.mcb-dialog textarea,.mcb-dialog select{-webkit-text-fill-color:currentColor;caret-color:#1039f4}
 body.mcb-open .content>.actions .btn{background:#eef4ff;color:#27476e;border-color:#ccd9ec}
 body.mcb-open .content>.actions .btn.cyan{background:#1039f4;color:#fff;border-color:#1039f4}

 .mcb-filters{justify-content:flex-end;padding:10px 16px}
 .mcb-filters .mcb-filter-trigger{background:#eaf0ff;border-color:#b8cdef;color:#1039f4;border-radius:12px;padding:10px 18px;font-size:15px}
 #mcb-filter-form .mcb-field{margin:0 0 18px}
 #mcb-filter-form [hidden]{display:none!important}

 /* Native iPhone focus zoom occurs below 16px, even when labels are smaller. */
 #overlay .mcb-dialog input,#overlay .mcb-dialog select,#overlay .mcb-dialog textarea{font-size:16px!important;line-height:1.4!important}
 #overlay .mcb-dialog input[name=amount]{font-size:26px!important}
 #overlay .modal-cover:has(.mcb-full),#overlay .modal-cover:has(.mcb-sheet){width:100%;max-width:100vw;min-width:0;box-sizing:border-box}
 #overlay .modal.mcb-full,#overlay .modal.mcb-sheet{min-width:0!important;max-width:min(800px,100vw)!important;box-sizing:border-box;align-self:center}
 #overlay .mcb-full .modal-head,#overlay .mcb-full .modal-footer,#overlay .mcb-sheet .modal-head,#overlay .mcb-sheet .modal-footer{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
 #overlay .mcb-dialog{font-size:16px;-webkit-text-size-adjust:100%;text-size-adjust:100%}
}

/* Follow the active transaction type in the mobile entry form. */
@media screen and (max-width:800px){
 #mcb-form:has([data-mcb="direction"][data-value="out"].red) input[name="amount"]{color:#c83a3e!important;-webkit-text-fill-color:#c83a3e!important;caret-color:#c83a3e}
}

/* Reference-led mobile cashbook screens. Desktop ledger is unchanged. */
@media screen and (max-width:800px){
 body.mcb-open{background:#f5f5f7}
 body.mcb-open .content{background:#f5f5fa!important}
 .mcb,.mcb-dialog{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;letter-spacing:0}
 .mcb-head{min-height:70px;padding:10px 16px;gap:10px}
 .mcb-head h1{font-size:22px;font-weight:700}
 .mcb-search{padding:14px 16px;min-height:65px;gap:12px}
 .mcb-search input{font-size:17px!important}
 .mcb-summary{border-radius:16px;margin:0 16px 24px;box-shadow:0 1px 3px #142d5005}
 .mcb-summary>div{padding:16px;font-size:15px}
 .mcb-summary>div:first-child{padding:20px 16px;margin-bottom:4px}
 .mcb-summary strong{font-size:17px;letter-spacing:-.4px}
 .mcb-summary>.mcb-button{min-height:48px;font-size:16px}
 .mcb-count{margin:28px 16px 22px;font-size:13px}
 .mcb-date{margin:20px 16px 14px;font-size:14px}
 .mcb-entry{padding:20px 16px 12px;margin-bottom:8px}
 .mcb-entry p{font-size:15px;margin:22px 0 12px}
 .mcb-entry footer{margin-top:18px;padding-top:12px;font-size:12px}
 .mcb-tag{padding:4px 11px;background:#efedfc;color:#5141ae}
 .mcb-tag.mode{background:#e8f5fc;color:#196c98}
 .mcb-bottom{padding:12px 16px max(20px,env(safe-area-inset-bottom,0px));gap:14px}
 .mcb-bottom .mcb-button{border-radius:12px;font-size:21px;min-height:57px}
 .mcb-button.green{background:#159b58;border-color:#159b58}
 .mcb-button.red{background:#c63b3e;border-color:#c63b3e}
 .mcb-dialog .mcb-button,#overlay .mcb-full .modal-footer .mcb-button,#overlay .mcb-sheet .modal-footer .mcb-button{color:#5142df;border-color:#5142df}
 .mcb-dialog .mcb-button.primary,#overlay .mcb-full .modal-footer .mcb-button.primary,#overlay .mcb-sheet .modal-footer .mcb-button.primary{background:#5142e5;color:#fff;border-color:#5142e5}
 #overlay .mcb-full .modal-head,#overlay .mcb-sheet .modal-head{display:grid;grid-template-columns:40px minmax(0,1fr) 40px;gap:8px;align-items:center;padding:10px 12px!important;min-height:65px;border-bottom:1px solid #eeeeef}
 #overlay .mcb-full .modal-head h2,#overlay .mcb-sheet .modal-head h2{grid-column:2;grid-row:1;text-align:center;font-size:19px!important;font-weight:650;line-height:1.25}
 #overlay .mcb-full .modal-head>[data-do=close],#overlay .mcb-sheet .modal-head>[data-do=close]{grid-column:1;grid-row:1;border:0;background:none;color:#222;width:40px;height:44px;font-size:38px;line-height:1;padding:0}
 .mcb-focus-guard,.mcb-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;border:0!important;white-space:nowrap!important}
 #overlay .mcb-full .modal-body{padding:16px!important}
 #overlay .mcb-full .modal-footer,#overlay .mcb-sheet .modal-footer{padding:16px 16px max(18px,env(safe-area-inset-bottom,0px))!important;gap:16px}
 #overlay .mcb-entry-screen .modal-footer>[data-again]{flex:1.7}
 #overlay .mcb-cash-in .modal-head h2{color:#178148!important}
 #overlay .mcb-cash-out .modal-head h2{color:#bf373e!important}
 #mcb-form .mcb-type{display:none}
 #mcb-form .mcb-datetime{margin:0 0 26px;gap:18px}
 #mcb-form .mcb-datetime label{font-size:11px;color:#777}
 #mcb-form .mcb-datetime input{border:0!important;padding:8px 0!important;font-size:15px!important;font-weight:500}
 #mcb-form .mcb-field{margin:0 0 22px;gap:0}
 #overlay #mcb-form .mcb-field input,#overlay #mcb-form .mcb-field select,#overlay #mcb-form textarea{border:1px solid #ddd!important;border-radius:9px;padding:15px!important;min-height:51px;font-size:17px!important}
 #overlay #mcb-form textarea{height:53px;min-height:53px;resize:vertical}
 #overlay #mcb-form input[name=amount]{font-size:20px!important;color:#178148!important;-webkit-text-fill-color:#178148}
 #overlay #mcb-form[data-direction=out] input[name=amount]{color:#bf373e!important;-webkit-text-fill-color:#bf373e!important;caret-color:#bf373e}
 #overlay #mcb-form input::placeholder,#overlay #mcb-form textarea::placeholder{color:#999!important;-webkit-text-fill-color:#999!important}
 #mcb-form .mcb-upload{position:relative;width:fit-content;max-width:100%;margin:0 0 30px;padding:10px 16px;background:white;border:1px solid #ddd;color:#5142df;font-size:15px;border-radius:9px}
 #mcb-form .mcb-upload input{position:absolute;inset:0;opacity:0;margin:0;width:100%;height:100%;cursor:pointer}
 #mcb-form fieldset{margin:24px 0 28px}
 #mcb-form legend{font-size:14px;color:#777;margin-bottom:15px}
 #mcb-form .mcb-modes{width:auto;justify-content:flex-start;gap:12px}
 #mcb-form .mcb-modes label{flex:0 1 auto;min-width:66px}
 #mcb-form .mcb-modes span{padding:7px 15px;background:#e4e4eb;color:#333;font-size:15px}
 #mcb-form .mcb-modes input:checked+span{background:#5142e5;color:white}
 #mcb-form .mcb-modes input:focus-visible+span{outline:2px solid #5142e5;outline-offset:3px}
 #mcb-form>[data-mcb=field]{border-color:#ddd;min-height:38px;font-size:15px;padding:8px 15px;border-radius:8px}
 .mcb-report-screen h3{font-size:15px;margin:8px 0 10px;color:#222}
 .mcb-report-filters{border:1px solid #ddd;border-radius:12px;overflow:hidden;margin-bottom:32px}
 .mcb-report-filters .mcb-button{display:flex;align-items:center;justify-content:space-between;gap:15px;width:100%;border:0;border-bottom:1px solid #ddd;border-radius:0;padding:12px 16px;min-height:44px;font-weight:400;color:#222;text-align:left}
 .mcb-report-filters .mcb-button:last-child{border-bottom:0}
 .mcb-report-filters b{color:#5142df;font-size:14px;text-align:right;max-width:60%;overflow-wrap:anywhere}
 .mcb-report-types{display:grid;gap:10px}
 .mcb-report-types label{display:flex;align-items:center;gap:18px;padding:17px 18px;border-radius:15px;color:#222;cursor:pointer}
 .mcb-report-types label:has(:checked){background:#e7e8ff}
 #overlay .mcb-report-types input{appearance:auto!important;accent-color:#5142e5;width:22px;height:22px;flex-shrink:0;padding:0!important}
 .mcb-report-types b{display:block;font-size:15px}
 .mcb-report-types small{display:block;font-size:12px;color:#777;margin-top:4px}
 #overlay .mcb-report-modal .modal-footer{flex-direction:column;gap:14px}
 #overlay .mcb-report-modal .modal-footer .mcb-button{flex:auto;width:100%;min-height:49px;font-size:17px}
 .mcb-book-name{padding:0 0 20px}.mcb-book-name small{color:#888;font-size:13px}.mcb-book-name h3{font-size:16px;margin:10px 0 0;color:#222}
 .mcb-section-label{background:#f5f5f5;margin:0 -16px;padding:12px 16px;color:#777;font-size:13px;font-weight:400}
 .mcb-settings-list>.mcb-button{display:flex;align-items:center;gap:16px;border:0;border-bottom:1px solid #eee;border-radius:0;padding:22px 0;width:100%;text-align:left}
 .mcb-settings-symbol{border-radius:50%;background:#e7e7ff;color:#5142df;font-size:23px;width:48px;height:48px;flex:0 0 48px;display:grid;place-items:center}
 .mcb-settings-list b{display:block;color:#222;font-size:16px}.mcb-settings-list small{display:block;color:#888;font-size:12px;font-weight:400;margin-top:7px}
 .mcb-member{display:flex;gap:16px;padding:22px 0;align-items:center}.mcb-member>span{width:44px;height:44px;border-radius:50%;background:#1680ba;color:white;display:grid;place-items:center;font-size:21px}.mcb-member b{color:#222}.mcb-member small{display:block;color:#777;font-size:12px;margin-top:5px}
 #mcb-filter-form .mcb-field{border-bottom:1px solid #eee;padding:8px 0;margin:0;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;color:#222}
 #mcb-filter-form .mcb-field select{width:60%;border:0!important;color:#5142df!important;text-align:right}
 @media(max-width:360px){.mcb-summary>div{font-size:13px;padding:14px 12px}.mcb-summary strong{font-size:15px}.mcb-entry-top{grid-template-columns:minmax(0,1fr) auto}.mcb-amount{text-align:right}.mcb-amount b{font-size:15px}.mcb-amount small{font-size:9px}.mcb-tag{font-size:11px;padding:4px 8px}.mcb-head h1{font-size:20px}}
}
@media screen and (max-width:800px){
 .mcb-filters{justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto;padding:16px;gap:9px}
 .mcb-filters .mcb-button{border-radius:24px;border-color:#ddd;color:#222;background:white;padding:7px 14px;min-height:36px;font-size:14px}
 .mcb-filters .mcb-filter-trigger{color:#5142df;min-width:44px;font-size:20px;padding:3px 12px}
 .mcb-quick-filter{display:block;flex:0 0 auto;margin:0}
 .mcb-quick-filter select{appearance:auto;color-scheme:light;background:#fff!important;color:#222!important;-webkit-text-fill-color:#222;border:1px solid #ddd!important;border-radius:24px;padding:7px 12px!important;min-height:36px;font-size:16px!important;max-width:190px;width:auto;font-family:inherit}
}
/* Mobile containment and receipt controls. */
@media(max-width:800px){
 html:has(body.mcb-open){overflow-x:clip}body.mcb-open{width:100%;max-width:100%;overflow-x:clip;overscroll-behavior-x:none}
 body.mcb-open .layout,body.mcb-open .workspace,body.mcb-open main,body.mcb-open .content,.mcb,.mcb-sticky-top,#mcb-feed{min-width:0!important;max-width:100%!important;box-sizing:border-box}
 .mcb{width:100%;overflow-x:clip}.mcb *,.mcb-dialog *{box-sizing:border-box}.mcb-filters{width:100%;max-width:100%;min-width:0;contain:inline-size;overscroll-behavior-x:contain}.mcb-search{min-width:0}.mcb-search input{width:100%;min-width:0!important;font-size:16px!important}.mcb-head>div{min-width:0}.mcb-entry-top>*{min-width:0}.mcb-amount small{white-space:normal}.mcb-summary strong,.mcb-summary b{overflow-wrap:anywhere}.mcb-summary>div{gap:12px}
 #overlay:has(.mcb-full),#overlay:has(.mcb-sheet){max-width:100vw;overflow-x:clip}.mcb-dialog,#mcb-form{width:100%;min-width:0}.mcb-dialog .mcb-datetime input{border:1px solid #cbd2df!important;border-radius:10px;padding:12px 8px!important;background:#fff!important;min-height:48px}
 .mcb-datetime label>span{display:flex;align-items:center;gap:7px;color:#34445c;font-size:14px}.mcb-icon{width:21px;height:21px;flex-shrink:0;display:inline-block;vertical-align:middle}.mcb-field>span{font-size:14px;font-weight:600;color:#34445c}.mcb-remark{position:sticky;top:-18px;z-index:4;background:white;padding:12px 0;margin-top:12px}.mcb-remark textarea{resize:none!important;height:58px;min-height:58px}.mcb-upload{display:flex;align-items:center;gap:8px;max-width:100%}
 #mcb-attachments,.mcb-proofs .receipt-links{display:flex;flex-wrap:wrap;gap:10px}.mcb-thumbnail,.mcb-proofs a.receipt-link,#mcb-attachments a.receipt-link{display:flex;width:68px;height:68px;padding:4px!important;border:1px solid #d7dbea;border-radius:10px;background:#f4f5fc;align-items:center;justify-content:center;overflow:hidden}.mcb-thumbnail img,.mcb-proofs a img,#mcb-attachments a img{width:100%!important;height:100%!important;object-fit:cover;border-radius:6px}.mcb-attachment{position:relative}.mcb-attachment>.mcb-button{min-width:26px;min-height:26px;padding:0;align-self:flex-start}.mcb-preview{position:fixed;inset:0;z-index:100000;background:#111e;display:flex;flex-direction:column;padding:16px 12px calc(16px + env(safe-area-inset-bottom));gap:12px}.mcb-preview>button{align-self:flex-end;padding:12px 18px;background:white;border:0;border-radius:10px;color:#4338ca;font:600 16px system-ui}.mcb-preview img,.mcb-preview iframe{width:100%;min-height:0;flex:1;object-fit:contain;border:0}.receipt-amount-panel{max-width:100%;font-size:14px}.receipt-amount-panel button{white-space:normal}
}
/* Keep the phone viewport stationary; only the ledger scrolls vertically. */
@media screen and (max-width:800px){
 html:has(body.mcb-open),body.mcb-open{height:100%;min-height:0;overflow:hidden!important;overscroll-behavior:none}
 body.mcb-open #app{position:fixed;inset:0;width:100%;height:100%;height:100dvh;max-width:100%;overflow:hidden}
 body.mcb-open .layout{display:block!important;width:100%!important;height:100%;min-height:0!important;overflow:hidden}
 body.mcb-open .workspace{display:flex;flex-direction:column;width:100%!important;height:100%;min-height:0;margin:0!important;overflow:hidden}
 body.mcb-open .content{flex:1;min-height:0;width:100%!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:none;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
 body.mcb-open .mcb{overflow:visible;width:100%;min-width:0}
 body.mcb-open .mcb-sticky-top{position:sticky;top:0;left:0;width:100%;z-index:10}
 body.mcb-open .mcb-filters{display:flex;flex-wrap:wrap!important;overflow:visible!important;contain:none;gap:8px;width:100%;padding:12px 16px}
 body.mcb-open .mcb-quick-filter{flex:1 1 130px;min-width:0;max-width:100%}
 body.mcb-open .mcb-quick-filter select{width:100%;max-width:100%;min-width:0}
 body.mcb-open .mcb-bottom{width:100%;max-width:100%;box-sizing:border-box}
}
