:root {
  --bg: #f7f7ef;
  --paper: #fffefb;
  --ink: #293f36;
  --muted: #667267;
  --accent: #426c57;
  --accent-soft: #e9f0e5;
  --line: #dde3d8;
  --green: #293f36;
  --green-soft: #e8efe3;
  --amber: #825b32;
  --amber-soft: #fbefdf;
  --red: #a13730;
  --radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, a, select, input[type=checkbox], input[type=radio] { cursor: pointer; }
button { color: inherit; border: 0; background: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
a { color: var(--accent); text-underline-offset: 3px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; outline-offset: 3px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #60825a; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; letter-spacing: -.6px; line-height: 1.4; }
h2 { font-size: 18px; line-height: 1.5; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono, .amount, .statement-amount, .fee-line strong { font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.initial-loading { padding: 80px 24px; text-align: center; color: var(--muted); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 226px; padding: 34px 20px 24px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #fcfbf6; z-index: 10; }
.sidebar-brand-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.brand { display: flex; gap: 10px; align-items: center; min-width: 0; }
.brand-mark { width: 33px; height: 38px; border: 1px solid #b8cbb7; display: grid; place-items: center; color: var(--accent); border-radius: 4px; flex: none; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-name { font-size: 17px; font-weight: 650; letter-spacing: .5px; white-space: nowrap; }
.brand-en { font-size: 8px; letter-spacing: 1.7px; color: var(--muted); margin-top: 3px; }
.side-caption { margin: 48px 14px 14px; color: #647665; font-size: 11px; letter-spacing: 1px; }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav button { min-height: 47px; display: flex; align-items: center; gap: 12px; text-align: left; padding: 11px 14px; border-radius: 7px; color: var(--muted); transition: background .15s, color .15s; }
.nav button:hover { background: #edf1e6; }
.nav button.active { background: var(--green-soft); color: var(--accent); }
.nav button.active .icon { color: var(--accent); }
.nav .count { margin-left: auto; min-width: 21px; border-radius: 4px; font-size: 11px; padding: 0 6px; color: var(--ink); background: #dbe8d1; text-align: center; }
.side-bottom { margin-top: auto; padding: 25px 9px 0; }
.side-note { font-size: 11px; color: var(--muted); padding-top: 20px; border-top: 1px solid var(--line); line-height: 1.9; }
.side-note strong { display: block; font-size: 12px; color: #586e5d; font-weight: 500; margin-bottom: 5px; }
.user-info { display: flex; align-items: center; gap: 9px; margin-top: 26px; }
.user-info strong { font-size: 12px; }
.user-info .small { font-size: 10px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: 12px; }
.logout { margin-left: auto; min-width: 35px; min-height: 44px; display: grid; place-items: center; color: var(--muted); }
.mobile-logout { display: none; }
.main { grid-column: 2; min-width: 0; }
.topbar { min-height: 80px; display: flex; align-items: center; justify-content: space-between; padding: 16px 42px; gap: 16px; background: #fcfbf6; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 12px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.breadcrumb span:last-child { color: var(--ink); }
.top-controls { display: flex; gap: 10px; align-items: center; }
.top-controls select, .top-controls input { max-width: 190px; background: #fffefb; }
.content { max-width: 1440px; margin: auto; padding: 35px 42px 50px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.eyebrow { font-size: 10px; letter-spacing: 1.5px; color: var(--accent); margin-bottom: 9px; text-transform: uppercase; }
.page-subtitle { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.8; }
.heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.button { min-height: 44px; padding: 10px 17px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 6px; line-height: 1.5; font-weight: 550; font-size: 12px; text-decoration: none; transition: background .15s, border-color .15s; }
.button .icon { width: 17px; height: 17px; }
.primary { background: var(--accent); color: #fffefb; border: 1px solid var(--accent); }
.primary:hover { background: #355744; }
.secondary { background: var(--paper); border: 1px solid #ccd7c7; }
.secondary:hover { background: #eff3e9; border-color: #9bb49d; }
.subtle { background: var(--accent-soft); color: #426c57; }
.danger { background: #f9ebe8; color: var(--red); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #426c57; min-height: 44px; padding: 9px 5px; }
.text-button .icon { width: 16px; height: 16px; }
.demo-banner { display: flex; align-items: center; gap: 8px; margin-bottom: 25px; font-size: 11px; color: #71624e; border-bottom: 1px solid #e7dbcb; padding: 0 0 12px; }
.demo-banner .icon { width: 15px; height: 15px; }
.statement-summary { display: grid; grid-template-columns: 1.05fr 1fr; border: 1px solid #d1dccb; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; background: var(--paper); }
.statement-total { padding: 31px 34px 26px; background: #e6eddc; color: var(--ink); min-height: 230px; position: relative; }
.statement-label { color: #476149; font-size: 12px; letter-spacing: .7px; }
.statement-amount { font-size: clamp(30px,3.25vw,48px); font-weight: 550; letter-spacing: -1.5px; line-height: 1.25; margin: 21px 0 10px; overflow-wrap: anywhere; }
.statement-amount>span { font-size: 22px; margin-right: 8px; color: #5b795d; font-weight: 400; }
.statement-total p { font-size: 12px; color: #62745f; }
.statement-stamp { font-size: 9px; color: #5f765e; letter-spacing: 2px; margin-top: 22px; }
.statement-breakdown { padding: 27px 32px 20px; display: flex; flex-direction: column; justify-content: center; }
.fee-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 10px 0; font-size: 13px; }
.fee-line>span { color: var(--muted); }
.fee-line strong { font-size: 20px; font-weight: 550; white-space: nowrap; }
.fee-line em { font-size: 10px; padding: 3px 6px; background: #edf1e6; color: #627359; border-radius: 3px; font-style: normal; margin-left: 6px; white-space: nowrap; }
.statement-facts { padding-top: 17px; margin-top: 11px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.statement-facts b { color: var(--ink); font-weight: 600; }
.fee-edit { align-self: flex-start; min-height: 36px; padding-bottom: 0; }
.pending-notice { width: 100%; padding: 13px 17px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #f7e9d6; border-radius: 7px; color: #7a5733; margin-bottom: 20px; text-align: left; font-size: 12px; }
.pending-notice>span { display: flex; align-items: center; gap: 10px; }
.pending-notice .icon { width: 16px; height: 16px; }
.pending-notice strong { white-space: nowrap; font-weight: 600; }
.pending-notice>span:last-child { white-space: nowrap; }
.category-summary { border: 1px solid var(--line); border-radius: var(--radius); background: #fcfbf6; padding: 20px 24px; margin: 24px 0 32px; }
.category-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.category-heading h2 { font-size: 14px; }
.category-heading>span { font-size: 11px; color: var(--muted); }
.category-lines { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px 30px; }
.category-lines>div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; }
.category-lines span { color: var(--muted); }
.category-lines strong { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.section-head h2 { font-size: 17px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.table-wrap { overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.records-table th { text-align: left; padding: 14px 20px; background: #fcfbf6; font-size: 11px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); }
.records-table td { padding: 18px 20px; border-bottom: 1px solid #e8ece2; font-size: 12px; vertical-align: middle; }
.records-table tr:last-child td { border-bottom: 0; }
.records-table .amount { text-align: right; white-space: nowrap; }
.records-table td.amount { font-weight: 600; font-size: 15px; }
.record-link { padding: 0; text-align: left; width: 100%; min-width: 0; display: block; min-height: 44px; }
.record-link:hover .record-name { color: #426c57; }
.record-title { min-width: 0; display: flex; align-items: center; }
.item-symbol { display: none; }
.record-name { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.record-category { font-size: 10px; color: var(--muted); margin-top: 3px; }
.badge { display: inline-block; border-radius: 3px; padding: 3px 7px; font-size: 10px; line-height: 1.6; white-space: nowrap; }
.badge.green { background: #e9f1e2; color: #426449; }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.gray { background: #eff2e9; color: #626e5d; }
.note-footer { display: flex; align-items: center; gap: 6px; padding-top: 18px; color: var(--muted); font-size: 11px; }
.note-footer .icon { width: 13px; height: 13px; }
.empty-state { padding: 50px 24px; text-align: center; }
.empty-art { margin: 0 auto 17px; width: 48px; height: 48px; display: grid; place-items: center; background: #ecf0e4; border-radius: 10px; color: #66835e; }
.empty-state h3 { margin-bottom: 7px; }
.empty-state p { color: var(--muted); margin: 0 auto 18px; max-width: 360px; font-size: 13px; }
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; flex: 1; min-width: 200px; }
.search-field .icon { position: absolute; left: 12px; top: 13px; width: 17px; height: 17px; color: #74816d; }
.search-field input { width: 100%; padding-left: 37px!important; }
input:not([type=checkbox]):not([type=file]):not([type=radio]), select, textarea { border: 1px solid #c5d0c0; border-radius: 5px; padding: 10px 12px; background: var(--paper); color: var(--ink); min-height: 44px; max-width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: #426c57; width: 16px; height: 16px; flex: none; }
textarea { resize: vertical; min-height: 80px; }
input[hidden] { display: none!important; }
.filter-tabs { display: flex; gap: 3px; background: #eff2e9; padding: 3px; border-radius: 5px; }
.filter-tabs button { padding: 6px 11px; min-height: 38px; border-radius: 3px; font-size: 12px; }
.filter-tabs button.selected { background: var(--paper); box-shadow: 0 1px 3px #0000000b; color: #426c57; }
.table-caption { display: flex; justify-content: space-between; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 15px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12px; }
.upload-drop { display: flex; align-items: center; gap: 17px; border: 1px dashed #a9bca0; border-radius: 9px; background: #edf3e5; padding: 24px; margin-bottom: 22px; cursor: pointer; }
.upload-drop.drag-over { background: #e2ecd8; border-color: #547543; }
.upload-symbol { width: 48px; height: 48px; border: 1px solid #cddbc2; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: var(--paper); flex: none; }
.upload-drop h2 { font-size: 16px; }
.upload-drop p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.upload-drop>.button { margin-left: auto; flex: none; pointer-events: none; }
.upload-queue { margin: 0 0 20px; padding: 12px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.queue-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 12px; }
.queue-row>span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-status { color: var(--muted); text-align: right; }
.review-workspace { display: grid; grid-template-columns: 245px minmax(0,1fr); gap: 18px; align-items: start; }
.review-rail { padding: 17px 11px; max-height: 800px; overflow: auto; }
.review-rail-header { display: flex; align-items: center; justify-content: space-between; font-size: 12px; padding: 0 6px 14px; }
.review-select-all { display: flex; align-items: center; gap: 6px; min-height: 30px; color: var(--muted); }
.review-item { display: flex; align-items: flex-start; gap: 7px; padding: 11px 7px; border: 1px solid transparent; border-radius: 6px; margin-bottom: 5px; }
.review-item.selected { background: #edf3e5; border-color: #c4d5ba; }
.review-item>input { margin-top: 7px; }
.review-item>button { width: 100%; min-width: 0; text-align: left; padding: 2px 0; }
.review-item .record-name { font-size: 12px; }
.review-meta { color: var(--muted); font-size: 11px; margin: 5px 0; }
.batch-toolbar { border-top: 1px solid var(--line); padding: 13px 6px 0; margin-top: 12px; }
.batch-toolbar .button { width: 100%; padding: 8px; }
.review-main { padding: 25px; }
.review-title-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.review-title-row h2 { font-size: 16px; }
.review-columns { display: grid; grid-template-columns: minmax(145px,.8fr) minmax(240px,1fr); gap: 24px; align-items: start; }
.evidence { min-width: 0; }
.evidence-preview { background: #eff1e9; border: 1px solid #d9e0d2; border-radius: 6px; min-height: 180px; max-height: 560px; overflow: auto; padding: 7px; text-align: center; }
.evidence-preview img { display: block; width: 100%; height: auto; object-fit: contain; }
.evidence-placeholder { padding: 60px 10px; color: #74816d; font-size: 12px; text-align: center; }
.evidence-placeholder .icon { display: block; margin: 0 auto 12px; }
.evidence-caption { font-size: 10px; color: var(--muted); overflow-wrap: anywhere; padding-top: 9px; }
.ocr-details { font-size: 11px; color: var(--muted); margin-top: 11px; }
.ocr-details summary { cursor: pointer; min-height: 30px; }
.ocr-details pre { font-family: inherit; font-size: 11px; line-height: 1.8; padding: 10px; background: #f3f5ec; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.record-form { min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field-label { font-size: 12px; font-weight: 550; }
.field input, .field select, .field textarea { width: 100%; font-size: 13px; }
.field.full { grid-column: 1/-1; }
.hint { font-size: 11px; color: var(--muted); line-height: 1.8; }
.warning-box { background: var(--amber-soft); color: var(--amber); padding: 12px 14px; border-radius: 6px; font-size: 12px; margin-bottom: 18px; }
.warning-box ul { margin: 0; padding-left: 16px; }
.date-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; }
.date-shortcuts button { color: #426c57; background: #edf2e5; border-radius: 4px; padding: 6px 9px; min-height: 36px; font-size: 11px; }
.date-precision { display: flex; gap: 16px; margin-bottom: 4px; }
.date-precision label { display: flex; align-items: center; gap: 5px; font-size: 12px; min-height: 32px; font-weight: 400; }
.date-precision input { width: 14px; height: 14px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.form-error { color: var(--red); font-size: 12px; margin-top: 12px; }
.form-error:empty { margin: 0; }
.success-box { color: #426449; background: #e9f1e2; font-size: 12px; padding: 12px; border-radius: 5px; margin-top: 15px; }
.billing-settings { display: grid; grid-template-columns: 1fr 240px; gap: 35px; padding: 26px 28px; margin-bottom: 24px; }
.billing-settings h2 { margin-bottom: 8px; }
.billing-settings p { color: var(--muted); font-size: 12px; max-width: 560px; }
.billing-settings .hint { font-size: 11px; margin-top: 9px; }
.billing-settings form .button { margin-top: 12px; width: 100%; }
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.access-card { padding: 28px; }
.access-icon { width: 40px; height: 40px; border: 1px solid #cddbc2; border-radius: 7px; color: var(--accent); display: grid; place-items: center; margin-bottom: 18px; }
.access-card h2 { font-size: 17px; margin-bottom: 8px; }
.access-card>p { font-size: 12px; color: var(--muted); margin-bottom: 21px; }
.access-card>.hint { margin-top: 18px; font-size: 11px; margin-bottom: 0; }
.access-card .field { margin-bottom: 14px; }
.link-box { background: #f6f6ee; border: 1px solid var(--line); padding: 10px 12px; border-radius: 5px; margin: 18px 0 10px; font-size: 11px; overflow-wrap: anywhere; }
.link-box code { font-family: inherit; }
.link-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.access-note { background: #eef2e5; padding: 20px 24px; margin-top: 24px; border-radius: 8px; color: #5f7158; font-size: 12px; }
.access-note strong { display: block; color: #4c6546; margin-bottom: 5px; }
.client-shell { max-width: 1100px; margin: auto; padding: 32px 40px 50px; }
.client-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 25px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.client-caption { font-size: 11px; color: var(--muted); display: flex; gap: 16px; align-items: center; }
.client-hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.client-hero h1 { font-size: 30px; font-family: "Songti SC", "Noto Serif CJK SC", serif; font-weight: 600; letter-spacing: .4px; }
.client-month-control { display: flex; flex-direction: column; gap: 6px; }
.client-month-control label { font-size: 11px; color: var(--muted); }
.client-footer { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 10px; }
.mobile-records { display: none; }
.mobile-card { padding: 19px 18px; display: block; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.mobile-card:last-child { border: 0; }
.mobile-record-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.mobile-card .record-name { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.mobile-record-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); }
.mobile-amount { white-space: nowrap; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.login-story { background: #e6eddc; color: #293f36; padding: 50px 64px; display: flex; flex-direction: column; justify-content: space-between; }
.login-story .brand-en { color: #61775a; }
.login-story .brand-mark { border-color: #a9be9c; color: #587448; }
.login-story .eyebrow { color: #617b53; font-size: 9px; letter-spacing: 2.8px; margin-bottom: 25px; }
.login-message { padding: 55px 0; }
.login-message h1 { font-family: "Songti SC", serif; font-size: 43px; font-weight: 500; line-height: 1.65; letter-spacing: .5px; }
.login-message p { font-size: 13px; line-height: 2; color: #536c4c; margin-top: 22px; }
.login-rule { width: 56px; height: 1px; background: #a7b993; margin: 36px 0 17px; }
.login-service, .login-bottom { font-size: 10px; color: #61775a; letter-spacing: 1px; }
.login-side { display: grid; place-items: center; padding: 45px 30px; }
.login-card { width: 100%; max-width: 360px; }
.login-card h2 { font-size: 25px; margin-bottom: 9px; }
.login-card>p { color: var(--muted); font-size: 12px; margin-bottom: 28px; }
.login-card .field { margin-bottom: 18px; }
.login-card .button { width: 100%; margin-top: 9px; }
.review-accounts { font-size: 11px; margin-top: 24px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); }
.review-accounts summary { cursor: pointer; }
.review-accounts p { margin-top: 12px; overflow-wrap: anywhere; }
.review-accounts button { padding: 6px 0; min-height: 32px; text-decoration: underline; color: #426c57; }
.login-card>.login-local { margin: 18px 0 0; font-size: 11px; line-height: 1.8; }
dialog { border: 1px solid #d1dccb; padding: 0; border-radius: 11px; width: min(960px,calc(100vw - 40px)); max-height: 90vh; color: var(--ink); background: var(--paper); box-shadow: 0 25px 90px #17171435; }
dialog::backdrop { background: #25272599; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 19px 25px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 18px; }
.icon-button { min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--muted); border-radius: 5px; }
.icon-button:hover { background: #e9efe1; }
.dialog-body { padding: 25px; max-height: calc(90vh - 84px); overflow: auto; }
.dialog-narrow { max-width: 470px; }
.detail-client h2 { font-size: 20px; margin-top: 16px; overflow-wrap: anywhere; }
.detail-amount { font-size: 35px; font-variant-numeric: tabular-nums; font-weight: 550; margin: 10px 0 26px; }
.detail-list { margin: 0; display: grid; grid-template-columns: 80px 1fr; gap: 14px; font-size: 13px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-foot { margin-top: 25px; padding-top: 15px; border-top: 1px solid var(--line); }
.toolbar-note { color: var(--muted); font-size: 12px; margin-bottom: 18px; line-height: 1.9; }
.error-page { max-width: 500px; padding: 80px 24px; text-align: center; margin: auto; }
.error-page h1 { font-size: 25px; margin-bottom: 12px; }
.error-page p { font-size: 13px; color: var(--muted); margin-bottom: 22px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%,15px); opacity: 0; pointer-events: none; z-index: 1000; color: #fffefb; background: var(--accent); padding: 13px 20px; border-radius: 6px; font-size: 12px; max-width: calc(100vw - 32px); transition: opacity .18s, transform .18s; box-shadow: 0 8px 32px #17171420; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
.loading-indicator { display: inline-block; height: 13px; width: 13px; border: 2px solid #cfddc4; border-top-color: #426c57; border-radius: 50%; margin-right: 6px; vertical-align: -2px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 204px minmax(0,1fr); }
  .sidebar { width: 204px; padding-left: 15px; padding-right: 15px; }
  .brand-name { font-size: 15px; }
  .brand-en { font-size: 7px; letter-spacing: 1.4px; }
  .content { padding: 30px 28px 45px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .page-heading { align-items: start; }
  .heading-actions { justify-content: flex-end; max-width: 270px; }
  .statement-total { padding: 28px; }
  .statement-breakdown { padding: 25px; }
  .review-workspace { grid-template-columns: 210px minmax(0,1fr); }
  .review-main { padding: 20px; }
  .review-columns { grid-template-columns: 1fr; }
  .evidence-preview { min-height: 100px; max-height: 280px; }
  .evidence-preview img { width: auto; max-width: 100%; max-height: 260px; margin: auto; }
  .billing-settings { grid-template-columns: 1fr 200px; gap: 22px; }
  .login-story { padding: 45px; }
  .login-message h1 { font-size: 36px; }
}
@media (max-width: 920px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; padding: 20px 24px 12px; display: block; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand-name { font-size: 17px; }
  .brand-en { font-size: 8px; }
  .side-caption, .side-bottom { display: none; }
  .mobile-logout { min-width: 50px; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 12px; }
  .mobile-logout .icon { width: 16px; height: 16px; }
  .nav { flex-direction: row; gap: 7px; margin-top: 18px; }
  .nav button { justify-content: center; flex: 1; padding: 10px 7px; font-size: 12px; gap: 8px; min-height: 44px; }
  .nav .icon { width: 17px; height: 17px; }
  .nav .count { margin-left: 0; }
  .topbar { min-height: 68px; padding: 12px 25px; }
  .content { padding: 29px 25px 45px; }
  .statement-amount { font-size: 37px; }
  .statement-summary { grid-template-columns: 1fr 1fr; }
  .review-workspace { grid-template-columns: 220px minmax(0,1fr); }
  .category-lines { gap: 12px 24px; }
  .login-story { padding: 35px; }
  .login-message h1 { font-size: 30px; }
  .access-card { padding: 24px; }
}
@media (max-width: 640px) {
  .sidebar { padding: 17px 16px 11px; }
  .brand-mark { width: 30px; height: 35px; }
  .brand-name { font-size: 16px; }
  .brand-en { letter-spacing: 1.3px; font-size: 7px; }
  .nav { margin-top: 14px; gap: 3px; }
  .nav button { font-size: 11px; gap: 4px; padding: 8px 4px; }
  .nav .icon { width: 14px; height: 14px; }
  .nav .count { display: none; }
  .topbar { padding: 12px 17px; }
  .breadcrumb { display: none; }
  .top-controls { width: 100%; gap: 10px; }
  .top-controls select { min-width: 0; width: 0; flex: 1; max-width: none; }
  .top-controls input { width: 145px; font-size: 12px; }
  .content { padding: 26px 17px 35px; }
  .demo-banner { align-items: flex-start; font-size: 10px; margin-bottom: 23px; }
  .demo-banner .icon { margin-top: 2px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading h1 { font-size: 27px; }
  .eyebrow { font-size: 9px; margin-bottom: 7px; }
  .page-subtitle { font-size: 12px; }
  .heading-actions { margin-top: 18px; justify-content: flex-start; max-width: none; }
  .button { font-size: 12px; padding: 10px 14px; }
  .statement-summary { grid-template-columns: 1fr; border-radius: 9px; }
  .statement-total { padding: 24px 24px 22px; min-height: 192px; }
  .statement-label { font-size: 11px; }
  .statement-amount { font-size: 41px; margin-top: 17px; }
  .statement-amount>span { font-size: 21px; }
  .statement-stamp { font-size: 8px; margin-top: 18px; }
  .statement-breakdown { padding: 17px 24px 16px; }
  .fee-line { padding: 6px 0; font-size: 12px; }
  .fee-line strong { font-size: 18px; }
  .statement-facts { padding-top: 13px; margin-top: 12px; font-size: 10px; }
  .fee-edit { font-size: 11px; min-height: 38px; }
  .pending-notice { padding: 12px 14px; align-items: start; font-size: 11px; }
  .pending-notice>span:first-child { flex-wrap: wrap; gap: 5px 7px; }
  .pending-notice>span:first-child>span { width: 100%; }
  .pending-notice>span:last-child { font-size: 0; padding-top: 3px; }
  .category-summary { padding: 18px 20px; margin: 22px 0 27px; }
  .category-heading { margin-bottom: 16px; }
  .category-heading>span { font-size: 10px; }
  .category-lines { grid-template-columns: 1fr 1fr; gap: 13px 20px; }
  .category-lines>div { font-size: 10px; gap: 8px; }
  .section-head h2 { font-size: 16px; }
  .section-head .small { font-size: 10px; }
  .table-wrap { display: none; }
  .mobile-records { display: block; }
  .desktop-only { display: none; }
  .note-footer { font-size: 10px; align-items: flex-start; }
  .note-footer .icon { margin-top: 3px; }
  .filters { padding: 15px; gap: 10px; }
  .search-field { min-width: 100%; }
  .filters>select { flex: 1; min-width: 0; font-size: 12px; }
  .filter-tabs { flex: 1; }
  .filter-tabs button { flex: 1; font-size: 11px; padding: 6px 8px; }
  .table-caption { padding: 13px 17px; flex-wrap: wrap; gap: 5px; font-size: 10px; }
  .upload-drop { padding: 18px 16px; gap: 12px; }
  .upload-symbol { width: 39px; height: 43px; }
  .upload-drop h2 { font-size: 14px; }
  .upload-drop p { font-size: 10px; line-height: 1.8; }
  .upload-drop>.button { display: none; }
  .queue-row { font-size: 10px; }
  .review-workspace { grid-template-columns: 1fr; }
  .review-rail { max-height: 300px; padding: 14px 11px; }
  .review-main { padding: 20px 16px; }
  .review-title-row h2 { font-size: 15px; }
  .review-title-row .badge { font-size: 9px; }
  .review-columns { gap: 20px; }
  .evidence-preview { max-height: 280px; }
  .form-grid { gap: 13px 10px; }
  .field label, .field-label { font-size: 11px; }
  .form-actions .button { padding: 10px 12px; }
  .form-actions .primary { flex: 1; }
  .billing-settings { grid-template-columns: 1fr; padding: 23px; gap: 20px; }
  .billing-settings h2 { font-size: 17px; }
  .access-grid { grid-template-columns: 1fr; gap: 18px; }
  .access-card { padding: 23px; }
  .access-note { padding: 18px; font-size: 11px; }
  .client-shell { padding: 23px 17px 30px; }
  .client-top { align-items: flex-start; padding-bottom: 21px; margin-bottom: 25px; }
  .client-caption { display: block; text-align: right; font-size: 10px; max-width: 90px; }
  .client-caption .text-button { display: block; margin-left: auto; padding: 6px 0; min-height: 32px; font-size: 10px; }
  .client-hero { display: block; margin-bottom: 22px; }
  .client-hero h1 { font-size: 27px; }
  .client-month-control { margin-top: 18px; flex-direction: row; align-items: center; gap: 12px; }
  .client-month-control input { font-size: 12px; }
  .client-month-control label { font-size: 11px; }
  .client-footer { flex-direction: column; gap: 7px; font-size: 10px; margin-top: 25px; }
  .login-layout { display: block; }
  .login-story { padding: 25px; min-height: 280px; }
  .login-message { padding: 29px 0 0; }
  .login-message .eyebrow { font-size: 8px; margin-bottom: 10px; }
  .login-message h1 { font-size: 28px; line-height: 1.6; }
  .login-message p { font-size: 11px; margin-top: 12px; }
  .login-rule, .login-service, .login-bottom { display: none; }
  .login-side { padding: 34px 25px 45px; }
  .login-card { max-width: 410px; }
  .login-card h2 { font-size: 23px; }
  dialog { width: calc(100vw - 24px); max-height: 92vh; border-radius: 9px; }
  .dialog-head { padding: 14px 18px; }
  .dialog-head h2 { font-size: 16px; }
  .dialog-body { padding: 20px 18px; max-height: calc(92vh - 74px); }
  .detail-amount { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}
@media print {
  :root, body { background: white; color: black; }
  .sidebar, .topbar, .heading-actions, .demo-banner, .pending-notice, .fee-edit, .client-month-control, .client-caption button, .text-button, #toast { display: none!important; }
  .app-shell { display: block; }
  .content, .client-shell { max-width: none; padding: 0; }
  .statement-total { background: white; color: black; border-right: 1px solid #bbb; }
  .statement-label, .statement-total p, .statement-stamp, .statement-amount>span { color: #555; }
  .statement-summary { grid-template-columns: 1fr 1fr; break-inside: avoid; }
  .table-wrap { display: block; overflow: visible; }
  .mobile-records { display: none; }
  .panel, .category-summary { break-inside: avoid; box-shadow: none; }
  .record-name { white-space: normal; }
  .records-table th, .records-table td { padding: 10px; }
  a { color: black; text-decoration: none; }
}
.loading-page { padding: 40px 24px; text-align: center; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; font-size: 13px; }

/* A quiet, warm workspace for everyday household purchases. */
:root { --green: #426c57; --green-soft: #e8efe3; --radius: 18px; color-scheme: light; }
body { font-size: 15px; }
button, a, summary { touch-action: manipulation; }
summary { cursor: pointer; }
button:active:not(:disabled), .button:active { opacity: .82; }
h1, h2 { text-wrap: balance; }
.sidebar { background: #fdfcf7; padding-top: 30px; }
.brand-mark { width: 40px; height: 40px; border-radius: 14px 14px 14px 5px; background: #e8efe1; border: 0; }
.brand-name { letter-spacing: .2px; font-size: 17px; }
.brand-en { font-size: 11px; letter-spacing: .6px; color: var(--muted); }
.nav button { border-radius: 12px; font-size: 14px; }
.nav button.active { color: var(--accent); font-weight: 650; }
.nav .count { border-radius: 20px; }
.side-caption { margin-top: 38px; font-size: 12px; letter-spacing: 0; }
.side-note, .side-note strong { font-size: 12px; }
.logout { min-width: 44px; }
.topbar { background: #fafaf3; min-height: 82px; }
.breadcrumb { font-size: 13px; }
.eyebrow { font-size: 12px; letter-spacing: .7px; text-transform: none; }
.page-heading h1 { font-size: 29px; font-weight: 600; letter-spacing: -.4px; }
.page-subtitle { font-size: 14px; }
.button { border-radius: 10px; min-height: 46px; font-size: 14px; }
.text-button { font-size: 13px; min-height: 44px; }
input:not([type=checkbox]):not([type=file]):not([type=radio]), select, textarea { border-radius: 10px; font-size: 16px; min-height: 48px; }
.top-controls select, .top-controls input { max-width: 210px; font-size: 14px; }
.statement-summary { border-color: #d3ddc9; box-shadow: 0 6px 20px #334b2e04; }
.statement-total { background: #e6eddc; color: var(--ink); padding: 32px 34px; }
.statement-label { font-size: 14px; }
.statement-amount { font-weight: 550; font-size: clamp(35px,3.4vw,52px); letter-spacing: -1.8px; }
.statement-total p, .statement-stamp { font-size: 12px; }
.statement-stamp { letter-spacing: .6px; margin-top: 20px; }
.statement-breakdown { padding: 28px 34px; }
.fee-line { font-size: 14px; }
.fee-line em, .statement-facts { font-size: 12px; }
.fee-edit { min-height: 44px; }
.pending-notice { border: 1px solid #ebd9bd; border-radius: 12px; min-height: 60px; font-size: 13px; }
.category-heading h2 { font-size: 16px; }
.category-heading>span, .category-lines>div { font-size: 13px; }
.category-summary { padding: 22px 26px; }
.records-table th { font-size: 12px; }
.records-table td { font-size: 13px; }
.record-category, .badge, .table-caption, .note-footer { font-size: 12px; }
.badge { border-radius: 6px; padding: 4px 8px; }
.upload-drop { border-radius: 16px; padding: 22px 25px; gap: 17px; background: #edf3e5; border-color: #abc29d; }
.upload-drop[aria-disabled="true"] { cursor: progress; }
.upload-drop h2 { font-size: 18px; }
.upload-drop p, .upload-format { font-size: 12px; color: #61735a; }
.upload-format { display: block; margin-top: 3px; }
.upload-symbol { border-radius: 14px; width: 50px; height: 50px; border: 0; color: var(--accent); }
.upload-queue { border-radius: 14px; padding: 18px 22px; }
.queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-heading strong { font-size: 14px; font-weight: 600; }
.queue-heading span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.upload-queue progress { width: 100%; height: 6px; border: 0; border-radius: 6px; overflow: hidden; accent-color: var(--accent); margin-top: 14px; background: var(--green-soft); }
.upload-queue progress::-webkit-progress-bar { background: var(--green-soft); }
.upload-queue progress::-webkit-progress-value { background: var(--accent); }
.queue-details { font-size: 12px; }
.queue-details summary { min-height: 44px; padding: 10px 0; color: var(--muted); }
.queue-row { font-size: 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.queue-row>span:first-child { flex: 1; min-width: 0; }
.queue-status { max-width: 65%; }
.queue-error .queue-status { color: var(--red); }
.review-workspace { grid-template-columns: 260px minmax(0,1fr); gap: 22px; }
.review-rail { padding: 0; max-height: 780px; }
.review-rail>summary { min-height: 60px; padding: 17px 18px; font-size: 14px; list-style: none; border-bottom: 1px solid transparent; }
.review-rail[open]>summary { border-color: var(--line); }
.review-rail>summary::-webkit-details-marker { display: none; }
.rail-summary-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.review-rail-body { padding: 10px; }
.review-rail-header { padding: 0 7px 8px; }
.review-select-all { min-height: 44px; }
.review-item { gap: 0; padding: 8px 8px 8px 0; border-radius: 10px; }
.review-item-check { display: flex; min-width: 44px; min-height: 44px; justify-content: center; align-items: center; cursor: pointer; }
.review-item>button { padding: 6px 0; }
.review-item .record-name { font-size: 13px; }
.review-meta { font-size: 12px; }
.rail-empty { padding: 20px 10px; font-size: 13px; color: var(--muted); }
.review-main { padding: 26px; }
.review-title-row { margin-bottom: 18px; }
.review-title-row h2 { font-size: 20px; }
.review-step { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.review-columns { display: block; }
.evidence { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 22px; overflow: hidden; }
.evidence>summary { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: #58714e; font-size: 13px; list-style: none; background: #f5f7ee; }
.evidence>summary::-webkit-details-marker { display: none; }
.evidence-toggle { margin-left: auto; font-size: 12px; white-space: nowrap; }
.evidence-content { padding: 12px; }
.evidence-preview { max-height: 440px; min-height: 100px; padding: 0; }
.evidence-preview img { width: auto; max-width: 100%; max-height: none; margin: auto; }
.evidence-caption { font-size: 12px; }
.evidence-caption a { display: inline-flex; min-height: 44px; align-items: center; }
.ocr-details, .ocr-details pre { font-size: 12px; }
.ocr-details summary { min-height: 44px; padding: 10px 0; }
.field label, .field-label { font-size: 14px; }
.field input, .field select, .field textarea { font-size: 16px; }
.form-grid { gap: 20px 16px; }
.amount-input { font-weight: 650!important; color: var(--accent)!important; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; }
.warning-box { border-radius: 10px; font-size: 12px; padding: 12px 14px; }
.warning-box strong { display: block; font-weight: 550; margin-bottom: 4px; }
.date-precision { gap: 12px; margin: 0; }
.date-precision label { min-height: 44px; font-size: 14px; padding-right: 8px; }
.date-precision input { width: 16px; height: 16px; }
.date-shortcuts { gap: 8px; }
.date-shortcuts button { min-height: 44px; min-width: 55px; padding: 10px 13px; border-radius: 8px; font-size: 13px; }
.record-extra { border-top: 1px solid var(--line); margin-top: 22px; }
.record-extra>summary { min-height: 48px; padding: 13px 0; font-size: 13px; color: #52674b; }
.record-extra>summary span { font-size: 12px; color: var(--muted); margin-left: 8px; }
.record-extra .form-grid { margin: 12px 0; }
.form-actions { margin-top: 20px; }
.form-actions .danger { min-width: 46px; }
.form-error { font-size: 13px; }
.filter-tabs button { min-height: 44px; }
.client-hero h1 { font-size: 32px; }
.client-month-control label, .client-caption { font-size: 12px; }
.client-footer { font-size: 12px; line-height: 1.8; }
.login-story { background: #e6eddc; color: var(--ink); }
.login-story .eyebrow { font-size: 13px; letter-spacing: .5px; }
.login-message h1 { font-size: 40px; }
.login-message p { font-size: 15px; line-height: 1.9; }
.login-service, .login-bottom { font-size: 12px; letter-spacing: .5px; }
.login-card>p { font-size: 14px; }
.login-card>.login-local { font-size: 12px; }
.review-accounts { font-size: 12px; }
.review-accounts button, .review-accounts summary { min-height: 44px; }
.review-accounts summary { padding: 9px 0; }
.access-card>p, .billing-settings p, .access-note { font-size: 14px; }
.access-card>.hint, .billing-settings .hint { font-size: 12px; }
.access-icon { width: 46px; height: 46px; border: 0; background: var(--green-soft); border-radius: 14px; }
.access-note { background: #f6ebdb; color: #755c3e; }
.access-note strong { color: #675035; }
#toast { font-size: 14px; border-radius: 12px; }
@media (max-width: 1200px) and (min-width: 641px) {
  .brand-name { font-size: 15px; }
  .brand-en { font-size: 10px; }
  .brand-mark { width: 34px; height: 38px; }
  .review-workspace { grid-template-columns: 220px minmax(0,1fr); }
  .page-heading h1 { font-size: 27px; }
}
@media (max-width: 920px) and (min-width: 641px) {
  .nav button { font-size: 13px; }
  .review-workspace { grid-template-columns: 210px minmax(0,1fr); }
  .review-main { padding: 20px; }
}
@media (max-width: 640px) {
  :root { --mobile-nav-height: 76px; }
  .app-shell { padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
  .sidebar { padding: 15px 18px 11px; border-bottom: 0; }
  .brand-name { font-size: 16px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 12px 12px 12px 4px; }
  .brand-en { font-size: 10px; letter-spacing: .4px; margin-top: 1px; }
  .nav { position: fixed; inset: auto 0 0; z-index: 25; margin: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fffefb; border-top: 1px solid #d9e2d1; gap: 6px; box-shadow: 0 -5px 20px #3c4d3108; }
  .nav button { flex-direction: column; gap: 3px; min-height: 58px; padding: 5px 2px; font-size: 11px; border-radius: 11px; font-weight: 500; }
  .nav button .icon { width: 21px; height: 21px; }
  .nav button[data-page="review"] { background: var(--accent); color: #fffefb; }
  .nav button[data-page="review"] .icon { color: #fffefb; }
  .nav button.active:not([data-page="review"]) { background: var(--green-soft); color: var(--accent); }
  .nav .count { display: none; }
  .topbar { min-height: 66px; padding: 8px 18px 12px; background: #fdfcf7; }
  .top-controls { gap: 8px; }
  .top-controls select, .top-controls input { font-size: 16px; min-height: 46px; }
  .top-controls input { width: 148px; }
  .content { padding: 23px 18px 32px; }
  .demo-banner { margin-bottom: 18px; font-size: 11px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading h1 { font-size: 26px; line-height: 1.45; }
  .eyebrow { font-size: 11px; letter-spacing: .3px; margin-bottom: 6px; }
  .page-subtitle { font-size: 13px; margin-top: 8px; }
  .heading-actions { gap: 8px; margin-top: 13px; }
  .button { font-size: 13px; padding: 10px 13px; min-height: 46px; }
  .heading-actions .text-button { min-height: 44px; }
  .statement-summary { border-radius: 17px; }
  .statement-total { padding: 25px 24px 23px; min-height: 204px; }
  .statement-amount { font-size: clamp(34px,10.5vw,44px); margin: 17px 0 8px; }
  .statement-label { font-size: 13px; }
  .statement-stamp { margin-top: 19px; font-size: 11px; }
  .statement-breakdown { padding: 18px 24px 15px; }
  .fee-line { font-size: 13px; }
  .fee-line strong { font-size: 20px; }
  .statement-facts { font-size: 11px; }
  .fee-edit { font-size: 12px; min-height: 44px; }
  .pending-notice { font-size: 12px; border-radius: 12px; }
  .category-summary { padding: 20px; }
  .category-heading { gap: 10px; }
  .category-heading h2 { font-size: 15px; }
  .category-heading>span { font-size: 11px; }
  .category-lines { gap: 14px 20px; grid-template-columns: 1fr; }
  .category-lines>div { font-size: 13px; }
  .mobile-card { padding: 20px 18px; }
  .mobile-card .record-name { font-size: 14px; }
  .mobile-record-top { gap: 12px; }
  .record-category, .mobile-record-bottom { font-size: 12px; }
  .mobile-amount { font-size: 17px; }
  .badge { font-size: 11px; }
  .note-footer, .table-caption { font-size: 11px; }
  .filters>select { font-size: 16px; }
  .filter-tabs button { min-height: 44px; font-size: 12px; }
  .upload-drop { position: relative; padding: 18px 16px; border-radius: 15px; gap: 12px; margin-bottom: 18px; }
  .upload-symbol { width: 40px; height: 46px; border-radius: 12px; }
  .upload-drop h2 { font-size: 16px; }
  .upload-drop p { font-size: 12px; line-height: 1.6; margin-top: 4px; }
  .upload-format { font-size: 11px; margin-top: 7px; }
  .upload-queue { padding: 14px 16px; }
  .queue-heading { align-items: flex-start; }
  .queue-heading .button { font-size: 12px; padding: 9px; }
  .queue-row { font-size: 12px; }
  .review-workspace { grid-template-columns: 1fr; gap: 17px; }
  .review-rail { max-height: none; border-radius: 13px; }
  .review-rail>summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 14px 16px; }
  .review-rail>summary::after { content: '+'; font-size: 20px; color: var(--accent); }
  .review-rail[open]>summary::after { content: '−'; }
  .rail-summary-hint { margin: 0 0 0 auto; font-size: 11px; }
  .review-rail-body { max-height: 340px; overflow-y: auto; }
  .review-main { padding: 20px 16px 14px; border-radius: 16px; scroll-margin-top: 15px; }
  .review-title-row h2 { font-size: 19px; }
  .review-title-row .badge { font-size: 11px; }
  .review-step { font-size: 12px; }
  .evidence { margin-bottom: 18px; }
  .evidence>summary { font-size: 12px; padding: 10px; gap: 6px; }
  .evidence-toggle { font-size: 11px; }
  .evidence-preview { max-height: 400px; }
  .form-grid { gap: 17px 12px; }
  .field label, .field-label { font-size: 13px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .date-precision { gap: 10px; }
  .date-precision label { font-size: 13px; }
  .date-shortcuts button { font-size: 12px; min-height: 44px; padding: 9px 12px; }
  .record-extra>summary span { font-size: 11px; }
  .form-actions { position: sticky; bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); background: #fffefb; padding: 12px 0 8px; margin-top: 9px; z-index: 2; border-top: 1px solid var(--line); }
  .form-actions .primary { flex: 1; }
  .form-actions .button { font-size: 13px; }
  .client-shell { padding: 22px 18px calc(30px + env(safe-area-inset-bottom)); }
  .client-top { margin-bottom: 27px; }
  .client-caption { font-size: 11px; max-width: 100px; }
  .client-caption .text-button { min-height: 44px; font-size: 11px; }
  .client-hero h1 { font-size: 27px; line-height: 1.55; }
  .client-month-control input { font-size: 16px; }
  .client-month-control label { font-size: 12px; }
  .client-footer { font-size: 11px; }
  .login-story { min-height: auto; padding: 24px; }
  .login-message { padding: 27px 0 0; }
  .login-message .eyebrow { font-size: 11px; margin-bottom: 10px; }
  .login-message h1 { font-size: 29px; }
  .login-message p { font-size: 13px; margin-top: 14px; }
  .login-side { padding: 29px 24px calc(40px + env(safe-area-inset-bottom)); }
  .login-card h2 { font-size: 24px; }
  .login-card>p { font-size: 13px; }
  .login-card .field { margin-bottom: 16px; }
  dialog { width: calc(100vw - 20px); max-height: 94dvh; border-radius: 17px; }
  .dialog-body { max-height: calc(94dvh - 80px); padding: 19px 16px calc(20px + env(safe-area-inset-bottom)); }
  dialog .form-actions { bottom: 0; }
  #toast { bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 10px); font-size: 13px; width: max-content; }
}
@media print {
  .statement-total { background: white; color: black; }
  .nav { display: none!important; }
  .app-shell { padding-bottom: 0; }
}
