/* Wah-Kit Money Book */
:root { --in: #1B7F4A; --in-soft: #E3F4EA; --out: #C23A14; --out-soft: #FDE7E0; --move: #1F5FD1; --move-soft: #E6EEFB; --paper: #FFFDF7; }
.mb-intro { padding-bottom: 14px; }
.mb-loading { color: var(--muted); }
.mb-hint, .mb-limit { margin: 0; color: var(--ink-soft); font-size: 14px; }
.mb-limit:empty { display: none; }
.mb-limit { color: var(--muted); }
.mb-limit a { font-weight: 700; }
.mb-small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.mb-big { min-height: 54px; font-size: 17px; padding: 0 26px; }
.mb-link { border: 0; background: none; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }
.mb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-row > * { flex: 1 1 180px; }
.mb-app input[type=text], .mb-app input[type=search], .mb-app select, .mb-sheet input[type=text], .mb-sheet input[type=date], .mb-sheet select, .mb-setup input, .mb-setup select {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 16px var(--font-body); color: var(--ink); background: var(--surface); min-height: 44px; min-width: 0;
}
.mb-sp { flex: 1; }

/* gate */
.mb-gate { padding: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.mb-gate div { display: flex; flex-direction: column; gap: 2px; }
.mb-gate span { color: var(--ink-soft); }

/* setup */
.mb-setup { padding: 26px; display: flex; flex-direction: column; gap: 20px; }
.mb-setup-head h2 { font-size: 26px; }
.mb-setup-head p { margin: 4px 0 0; color: var(--ink-soft); }
.mb-steps { margin: 0; padding: 0; list-style: none; counter-reset: st; display: flex; flex-direction: column; gap: 26px; }
.mb-steps > li { counter-increment: st; position: relative; padding-left: 46px; display: flex; flex-direction: column; gap: 10px; }
.mb-steps > li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font: 800 16px var(--font-display); display: flex; align-items: center; justify-content: center; }
.mb-steps h3 { font-size: 19px; }
.mb-su-accts { display: flex; flex-direction: column; gap: 8px; }
.mb-su-acct { display: grid; grid-template-columns: 34px minmax(0, 1.4fr) minmax(0, 1.2fr) 96px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.mb-su-acct .ic { font-size: 22px; text-align: center; }
.mb-su-acct .rm { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--muted); }
.mb-su-acct .rm:disabled { visibility: hidden; }
.mb-catpick { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mb-catgroup { display: flex; flex-direction: column; gap: 10px; }
.mb-catgroup-h { display: flex; justify-content: space-between; align-items: baseline; }
.mb-catgroup-h span { font-size: 13px; color: var(--muted); font-weight: 700; }
.mb-addcat { display: flex; gap: 8px; }
.mb-addcat input { flex: 1; }
.mb-setup-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-left: 46px; }
.mb-or { color: var(--muted); font-size: 14px; }

/* chips */
.mb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 600 14px var(--font-body); color: var(--ink); cursor: pointer; max-width: 100%; }
.mb-chip .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-chip .cur { font-size: 11px; color: var(--muted); font-weight: 700; }
.mb-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mb-chip[aria-pressed="true"] .cur { color: #C9C7DA; }
.mb-chip.add { border-style: dashed; color: var(--ink-soft); }
.mb-chip:disabled { opacity: .45; cursor: default; }

/* the book */
.mb-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 0; border-radius: var(--radius); overflow: hidden; background: var(--ink); color: #fff; }
.mb-nw { padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.mb-bookname { font-size: 13px; color: #B9B6D3; font-weight: 700; letter-spacing: .02em; }
.mb-nw-l { margin-top: 8px; font-size: 14px; color: #D8D6EA; }
.mb-nw-v { font: 800 clamp(30px, 5vw, 44px)/1.05 var(--font-display); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.mb-nw-sub { font-size: 14px; color: #D8D6EA; }
.mb-month { background: #2A2750; padding: 18px 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: center; }
.mb-m { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mb-m span { font-size: 13px; color: #C9C7DA; }
.mb-m b { font: 800 20px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-m.in b { color: #7FE0A6; } .mb-m.out b { color: #FFA98F; }
.mb-mh { grid-column: 1 / -1; font-size: 13px; font-weight: 700; color: #fff; display: flex; justify-content: space-between; gap: 8px; }
.mb-bar { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; display: flex; }
.mb-bar i { display: block; height: 100%; background: #FFA98F; }

.mb-quick { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.mb-adds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mb-add { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; border-radius: 12px; border: 2px solid transparent; font: 800 18px var(--font-display); cursor: pointer; letter-spacing: -.2px; }
.mb-add span { font-size: 24px; line-height: 1; }
.mb-add.spent { background: var(--out-soft); color: var(--out); border-color: #F7C3B3; }
.mb-add.received { background: var(--in-soft); color: var(--in); border-color: #B8E2C8; }
.mb-add.moved { background: var(--move-soft); color: var(--move); border-color: #BFD2F5; }
.mb-add:hover { filter: brightness(.97); }
.mb-say { display: flex; gap: 8px; }
.mb-say input { flex: 1; }
.mb-sayprev { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper); border: 1px dashed #D9CFA8; }
.mb-sayprev .what { flex: 1 1 240px; }
.mb-sayprev .what b { font-variant-numeric: tabular-nums; }
.mb-sayprev .err { color: var(--out); }

.mb-alert { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #FFF6DB; border: 1px solid #F1DC9B; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; font-size: 15px; }

.mb-tabs { margin: 18px 0 14px; display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.mb-tabs::-webkit-scrollbar { display: none; }
.mb-tabs button { flex: none; border: 0; background: none; padding: 10px 14px; font: 700 15px var(--font-body); color: var(--ink-soft); border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap; }
.mb-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.mb-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.mb-box { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.mb-box-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mb-box-h h3 { font-size: 18px; }
.mb-box-h a, .mb-box-h button { font-size: 14px; }
.mb-empty { color: var(--muted); margin: 0; font-size: 15px; }

/* account rows */
.mb-accts { display: flex; flex-direction: column; }
.mb-arow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; text-align: start; font: inherit; color: inherit; cursor: pointer; width: 100%; }
.mb-arow:last-child { border-bottom: 0; }
.mb-arow:hover { background: var(--ground); }
.mb-arow .ic { font-size: 20px; text-align: center; }
.mb-arow .nm { display: flex; flex-direction: column; min-width: 0; }
.mb-arow .nm b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-arow .nm span { font-size: 13px; color: var(--muted); }
.mb-arow .v { text-align: end; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.mb-arow .v small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.mb-arow.hidden-acct { opacity: .55; }
.mb-neg { color: var(--out); }
.mb-pos { color: var(--in); }
.mb-sect { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 6px 0 2px; }
.mb-sect h3 { font-size: 17px; }
.mb-sect .tot { font-weight: 800; font-variant-numeric: tabular-nums; }
.mb-sect-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mb-count { font-size: 13px; color: var(--muted); font-weight: 600; }

/* entries list: a ledger */
.mb-filters { padding: 12px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.mb-entotal { margin: 10px 2px; font-size: 14px; color: var(--ink-soft); }
.mb-entotal:empty { display: none; }
.mb-list { overflow: hidden; background: var(--paper); }
.mb-day { padding: 8px 16px 6px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; background: #F6F2E4; border-bottom: 1px solid #ECE5CC; display: flex; justify-content: space-between; }
.mb-ent { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #EFEAD8; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.mb-ent:hover { background: #FBF6E6; }
.mb-ent .ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; background: var(--ground); }
.mb-ent.spent .ic { background: var(--out-soft); } .mb-ent.received .ic { background: var(--in-soft); } .mb-ent.moved .ic { background: var(--move-soft); }
.mb-ent .t { display: flex; flex-direction: column; min-width: 0; }
.mb-ent .t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-ent .t span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-ent .v { font-weight: 800; font-variant-numeric: tabular-nums; text-align: end; white-space: nowrap; }
.mb-ent .v small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.mb-ent.spent .v { color: var(--out); } .mb-ent.received .v { color: var(--in); } .mb-ent.moved .v { color: var(--move); }
.mb-more { display: block; width: 100%; padding: 12px; border: 0; background: none; color: var(--blue); font: 700 15px var(--font-body); cursor: pointer; }

/* reports */
.mb-periods { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mb-reports { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.mb-reports .wide { grid-column: 1 / -1; }
.mb-chart { width: 100%; height: auto; display: block; overflow: visible; }
.mb-chart text { font: 11px var(--font-body); fill: var(--muted); }
.mb-chart .lbl { fill: var(--ink); font-weight: 700; }
.mb-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-soft); }
.mb-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mb-hbars { display: flex; flex-direction: column; gap: 9px; }
.mb-hbar { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; background: none; border: 0; padding: 0; text-align: start; font-family: inherit; color: inherit; cursor: pointer; }
.mb-hbar .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-hbar .track { height: 14px; background: var(--ground); border-radius: 7px; overflow: hidden; }
.mb-hbar .track i { display: block; height: 100%; border-radius: 7px; background: var(--out); }
.mb-hbar.inc .track i { background: var(--in); }
.mb-hbar .v { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.mb-hbar .v small { color: var(--muted); font-weight: 500; margin-left: 4px; }
.mb-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mb-kpi { padding: 12px 14px; border-radius: 12px; background: var(--ground); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mb-kpi span { font-size: 13px; color: var(--ink-soft); }
.mb-kpi b { font: 800 19px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mb-table th, .mb-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: start; }
.mb-table td.n, .mb-table th.n { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mb-table tr.tot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--ink); }
.mb-table input { width: 110px; text-align: end; min-height: 36px !important; padding: 6px 8px !important; }

/* settings */
.mb-set { display: flex; flex-direction: column; gap: 16px; }
.mb-set .mb-box p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.mb-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-status { font-size: 14px; color: var(--muted); }
.mb-status b { color: var(--ink); }
.mb-danger { border-color: #F3C4B8; }
.btn-wa { background: #1B7F4A; color: #fff; } .btn-wa:hover { background: #146A3D; color: #fff; }

/* sheets */
.mb-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(29,26,57,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mb-sheet-in { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.mb-sheet-in.small { width: min(440px, 100%); }
.mb-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.mb-sheet-head h3 { font-size: 20px; }
.mb-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ground); font-size: 16px; cursor: pointer; color: var(--ink); }
.mb-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 4px 18px 6px; padding: 4px; background: var(--ground); border-radius: 12px; }
.mb-kinds button { border: 0; background: none; border-radius: 9px; min-height: 38px; font: 700 14px var(--font-body); color: var(--ink-soft); cursor: pointer; white-space: nowrap; padding: 0 4px; }
.mb-kinds button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(29,26,57,.15); }
.mb-kinds button[data-k="spent"][aria-pressed="true"] { color: var(--out); }
.mb-kinds button[data-k="received"][aria-pressed="true"] { color: var(--in); }
.mb-kinds button[data-k="moved"][aria-pressed="true"] { color: var(--move); }
.mb-fbody { padding: 10px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.mb-fbody h3 { font-size: 19px; }
.mb-fbody > p { margin: 0; color: var(--ink-soft); }
.mb-fld { display: flex; flex-direction: column; gap: 6px; }
.mb-fl { font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.mb-opt { font-weight: 500; color: var(--muted); }
.mb-amount { display: flex; flex-direction: column; gap: 4px; }
.mb-amount label { font-weight: 700; font-size: 14px; color: var(--ink-soft); }
.mb-amt-in { display: flex; align-items: center; gap: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.mb-amt-in span { font: 800 18px var(--font-display); color: var(--muted); }
.mb-amt-in input { flex: 1; min-width: 0; border: 0 !important; outline: none; font: 800 34px var(--font-display) !important; padding: 0 !important; color: var(--ink); background: none !important; font-variant-numeric: tabular-nums; }
.mb-calc { font-size: 13px; color: var(--muted); min-height: 18px; }
.mb-chips.pick { max-height: 138px; overflow-y: auto; padding: 2px; }
.mb-fx { padding: 10px 12px; background: var(--move-soft); border-radius: 10px; font-size: 14px; gap: 8px; }
.mb-fx .r { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mb-fx input { width: 130px; min-height: 38px !important; padding: 6px 10px !important; }
.mb-dates { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mb-dates button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 600 14px var(--font-body); cursor: pointer; color: var(--ink); }
.mb-dates button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.mb-dates input { flex: 1 1 150px; }
.mb-jhead, .mb-jline { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 6px; align-items: center; }
.mb-jhead { font-size: 12px; font-weight: 700; color: var(--muted); }
.mb-jline { margin-bottom: 6px; }
.mb-jline select, .mb-jline input { width: 100%; min-height: 40px !important; padding: 6px 8px !important; font-size: 15px !important; }
.mb-jline .rm { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; color: var(--muted); }
.mb-jsum { margin: 0; font-size: 14px; font-weight: 700; }
.mb-jsum.ok { color: var(--in); } .mb-jsum.bad { color: var(--out); }
.mb-ferr { margin: 0; color: var(--out); font-weight: 600; font-size: 14px; }
.mb-ferr:empty { display: none; }
.mb-sheet-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.mb-sheet-foot .btn-primary { min-width: 120px; }
.mb-del { color: var(--out); }
.mb-check { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.mb-check input { width: 18px; height: 18px; }
.mb-icon-in { flex: 0 0 60px !important; text-align: center; font-size: 20px !important; }

.mb-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar) + 18px); z-index: 75; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 26px rgba(0,0,0,.25); display: flex; gap: 14px; align-items: center; font-size: 15px; max-width: calc(100vw - 32px); }
.mb-toast button { border: 0; background: none; color: #FFB59F; font: 800 15px var(--font-body); cursor: pointer; padding: 4px; }

.mb-faq { margin-top: 40px; max-width: 760px; }
.mb-faq h2 { font-size: 24px; margin-bottom: 10px; }
.mb-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.mb-faq summary { font-weight: 700; cursor: pointer; }
.mb-faq p { margin: 8px 0 0; color: var(--ink-soft); }
.mb-src { font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .mb-top { grid-template-columns: 1fr; }
  .mb-grid2, .mb-reports, .mb-catpick { grid-template-columns: minmax(0, 1fr); }
  .mb-filters { grid-template-columns: 1fr 1fr; }
  .mb-filters #enSearch { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .mb-intro p { display: none; }
  .mb-intro { padding: 18px 0 10px; }
  .mb-setup { padding: 18px; }
  .mb-steps > li { padding-left: 0; }
  .mb-steps > li::before { position: static; margin-bottom: -4px; }
  .mb-setup-go { padding-left: 0; }
  .mb-setup-go .btn { flex: 1 1 100%; }
  .mb-su-acct { grid-template-columns: 30px minmax(0, 1fr) 36px; grid-template-areas: "ic kind rm" "ic name name" "ic cur bal"; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .mb-su-acct .ic { grid-area: ic; align-self: start; }
  .mb-su-acct .kind { grid-area: kind; } .mb-su-acct .name { grid-area: name; } .mb-su-acct .cur { grid-area: cur; } .mb-su-acct .bal { grid-area: bal; } .mb-su-acct .rm { grid-area: rm; }
  .mb-nw { padding: 18px; }
  .mb-month { padding: 14px 18px; }
  .mb-m b { font-size: 17px; }
  .mb-add { min-height: 54px; font-size: 16px; gap: 6px; flex-direction: column; gap: 0; }
  .mb-add span { font-size: 20px; }
  .mb-kpis { grid-template-columns: 1fr 1fr; }
  .mb-sheet { align-items: flex-end; padding: 0; }
  .mb-sheet-in, .mb-sheet-in.small { width: 100%; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
  .mb-hbar { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) auto; }
  .mb-ent { padding: 10px 12px; }
}
.mb-credit { margin: 18px 2px 0; }
.mb-app.ro .mb-quick { display: none; }
.mb-bookrow { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.mb-bookrow:last-child { border-bottom: 0; }
.mb-bookrow .ic { font-size: 20px; text-align: center; }
.mb-bookrow .nm { display: flex; flex-direction: column; min-width: 0; }
.mb-bookrow .nm b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-bookrow .nm span { font-size: 13px; color: var(--muted); }
.mb-bookrow.cur .nm b::after { content: ' ✓'; color: var(--in); }
.mb-closerow { align-items: center; }
.mb-closerow .mb-fl { flex: 0 0 auto; }
.mb-closerow input { flex: 1 1 160px; }
.mb-closerow .btn { flex: 0 0 auto; }
.mb-badge { display: inline-block; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 10px; background: var(--out); color: #fff; font-size: 12px; line-height: 20px; text-align: center; vertical-align: 1px; }
.mb-plan { padding: 12px; border-radius: 12px; background: var(--ground); gap: 10px; }
.mb-plan .mb-row { align-items: center; }
.mb-plan .mb-row .mb-fl { flex: 0 0 64px; }
.mb-plan select, .mb-plan input[type=number], .mb-plan input[type=date] { flex: 1 1 140px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 15px var(--font-body); min-height: 40px; background: var(--surface); color: var(--ink); min-width: 0; }
.mb-due { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.mb-due:last-child { border-bottom: 0; }
.mb-due .ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 17px; background: var(--ground); }
.mb-due.spent .ic { background: var(--out-soft); } .mb-due.received .ic { background: var(--in-soft); } .mb-due.moved .ic { background: var(--move-soft); }
.mb-due .t { display: flex; flex-direction: column; min-width: 0; background: none; border: 0; padding: 0; text-align: start; font: inherit; color: inherit; cursor: pointer; }
.mb-due .t b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-due .t span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-due .t span.late { color: var(--out); font-weight: 700; }
.mb-due .v { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: end; }
.mb-due.spent .v { color: var(--out); } .mb-due.received .v { color: var(--in); } .mb-due.moved .v { color: var(--move); }
.mb-due .ok { min-height: 36px; padding: 0 12px; font-size: 14px; white-space: nowrap; }
.mb-plantop { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mb-remind { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 14px; color: var(--ink-soft); }
.mb-warn { padding: 10px 12px; border-radius: 10px; background: var(--out-soft); color: var(--out); font-weight: 700; font-size: 14px; }
.mb-okmsg { padding: 10px 12px; border-radius: 10px; background: var(--in-soft); color: var(--in); font-weight: 700; font-size: 14px; }
@media (max-width: 760px) {
  .mb-due { grid-template-columns: 34px minmax(0, 1fr) auto; row-gap: 6px; }
  .mb-due .t span { white-space: normal; }
  .mb-due .ok { grid-column: 2 / -1; justify-self: start; }
}
.mb-dim { opacity: .45; }
.mb-lock { max-width: 480px; margin: 10px auto 0; padding: 30px 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.mb-lock-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.mb-lock h2 { font-size: 24px; }
.mb-lock-sub { margin: -6px 0 4px; color: var(--ink-soft); }
.mb-lock-form { display: flex; gap: 8px; width: 100%; }
.mb-lock-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 16px var(--font-body); min-height: 48px; color: var(--ink); background: var(--surface); }
.mb-lock .mb-big { width: 100%; }
.mb-lock-links { margin: 0; font-size: 14px; }
.mb-lock-links span { color: var(--ink-soft); }
.mb-lock .mb-ferr:empty { display: none; }
.mb-pwbox { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.mb-pwbox input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 16px var(--font-body); min-height: 44px; color: var(--ink); background: var(--surface); width: 100%; }
.mb-pwbox p { margin: 0; font-size: 13px; color: var(--muted); }
.mb-pwbox .mb-pwwarn { padding: 10px 12px; border-radius: 10px; background: #FFF6DB; border: 1px solid #F1DC9B; color: var(--ink); font-size: 14px; }
.mb-reckey { margin: 12px 0; padding: 14px; border-radius: 12px; background: var(--ground); border: 2px dashed var(--ink); font: 700 clamp(14px, 3.9vw, 21px)/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace; letter-spacing: .04em; text-align: center; word-break: break-all; user-select: all; }
#askSheet .mb-btns { margin: 6px 0 10px; }
#askYes:disabled { opacity: .45; cursor: default; }
