:root{
  --bg:#f8f6f3;--paper:#fff;--ink:#29221e;--sub:#827a74;--line:#eee8e1;
  --navy:#38251b;--blue:#a66e36;--blueSoft:#f7eee4;--coral:#d85d43;
  --coralSoft:#fff0ec;--red:#c94332;--amber:#a76a2f;--amberSoft:#fff4e8;
  --mint:#28844e;--mintSoft:#eaf5ed;
  font-family:system-ui,-apple-system,"Noto Sans CJK SC","Microsoft YaHei",sans-serif;
}
html,body,#app{width:100%;min-height:100%;background:var(--bg)}
#app{padding-bottom:0}.screen{min-height:100dvh}.content{max-width:none}
@media(min-width:650px){#app{max-width:none;margin:0;box-shadow:none}}
button:focus-visible,label:focus-visible{outline:2px solid var(--amber);outline-offset:2px}

/* Shared warm chrome */
.warm-screen{background:radial-gradient(circle at 7% 3%,#f7e9d8 0,transparent 27%),var(--bg);padding-bottom:90px}
.warm-header{position:sticky;top:0;z-index:10;padding:20px 20px 0;background:linear-gradient(115deg,#faf0e4 0%,#f9f7f4 85%);border:0}
.brand-row{margin:0}.warm-header .brand{display:block;color:#9c632e;font-size:25px;font-weight:760;letter-spacing:.015em}
.warm-header .icon-button{width:36px;height:36px;padding:0;border:0;background:transparent;color:#352b25;font-size:29px;line-height:1}
.top-tabs{display:grid;grid-template-columns:repeat(3,1fr);align-items:end;margin-top:22px}
.top-tab{position:relative;min-height:47px;padding:0 0 15px;border:0;background:transparent;color:#776f6a;font-size:17px;font-weight:520;text-align:center}
.top-tab.active{color:#9c612d;font-weight:720}
.top-tab.active:after{content:"";position:absolute;bottom:0;left:50%;width:26px;height:4px;border-radius:9px;background:#a86c30;transform:translateX(-50%)}
.warm-content{padding:18px 14px 86px}
.surface{border:1px solid #f0eae4;border-radius:17px;box-shadow:0 5px 17px #4d35210a;background:#fff}
.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 1px}
.panel-heading b{font-size:18px;color:var(--ink)}.panel-heading small{font-size:12px;color:var(--sub)}
.primary{background:linear-gradient(100deg,#c38b4c,#a87031);border-radius:24px;color:#fff}
.secondary{border-color:#be9b79;border-radius:24px;color:#745431}
.text-link,.section-head button{color:var(--amber)}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--amber);box-shadow:0 0 0 2px #b9834030}
.hero{background:linear-gradient(115deg,#faf0e4,#f8f6f3);color:var(--ink)}.hero:after{display:none}
.hero .brand{color:#9c632e}.hero .icon-button,.hero-pill{background:#fff;color:var(--amber)}
.hero .desc,.hero-label,.hero-sub{color:var(--sub)}.hero-mini-total span{color:var(--sub)}
.month-switch button{background:#fff;color:#53483e}.import-art{background:linear-gradient(130deg,#c99256,#a66b32)}
.empty-art,.steps b,.file-thumb{background:var(--blueSoft);color:var(--amber)}
.callout{background:var(--blueSoft);color:#85592e}.modal{background:var(--bg)}

/* Chat is the operation surface. The voice is a single bubble. */
.chat-screen{padding-bottom:0}.chat-header{padding:20px 20px 0;background:linear-gradient(115deg,#faf0e4,#f9f7f4);border:0}
.chat-header .brand{color:#9c632e;font-size:25px}.chat-header .icon-button{background:transparent;color:#352b25}
.chat-screen .chat-body{min-height:calc(100dvh - 144px);padding:0 15px 82px}
.chat-screen .chat-list{gap:17px;padding:24px 0 26px}
.chat-welcome{max-width:270px;margin:38px auto;color:var(--sub);line-height:1.6}
.bubble{position:relative;max-width:calc(100% - 50px);padding:12px 15px;font-size:14px;line-height:1.55;box-shadow:0 3px 10px #4c32100d}
.bubble.assistant{align-self:flex-start;margin-left:42px;border:1px solid #ede8e3;border-radius:17px 17px 17px 5px;background:#fff;color:var(--ink)}
.bubble.assistant:before{content:"知";position:absolute;left:-43px;top:0;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:linear-gradient(130deg,#c48b4d,#a56a30);color:#fff;font-size:16px;font-weight:750}
.bubble.assistant .who{display:none}
.bubble.user{align-self:flex-end;border-radius:17px 17px 5px 17px;background:#b47c3f;color:#fff}
.bubble.user.voice-message{padding:0;background:transparent;box-shadow:none}
.bubble.user.voice-message .voice-bubble{display:inline-flex;align-items:center;justify-content:flex-start;gap:9px;min-width:172px;min-height:52px;padding:12px 15px;border:0;border-radius:17px 17px 5px 17px;background:#b47c3f;color:#fff;box-shadow:0 3px 10px #6c3d1e18}
.voice-bubble:active,.bubble.user.voice-message .voice-bubble:active{background:#9d6633!important}
.voice-play{font-size:15px}.voice-wave{display:flex;align-items:center;gap:2px;height:24px;flex:1}.voice-wave i{width:3px;height:8px;border-radius:3px;background:currentColor;opacity:.95}
.voice-wave i:nth-child(2),.voice-wave i:nth-child(8){height:15px}.voice-wave i:nth-child(3),.voice-wave i:nth-child(6){height:20px}.voice-wave i:nth-child(5){height:24px}
.voice-wave i:nth-child(4),.voice-wave i:nth-child(7){height:12px}
.voice-dock,.composer.text-mode{position:fixed;z-index:24;bottom:0;left:0;transform:none;width:100%;max-width:none;min-height:76px;padding:10px 14px;border-top:0;background:linear-gradient(#f8f6f3e8,#f8f6f3);box-shadow:0 -4px 20px #42250c0a}
.voice-dock{gap:9px}.voice-mode-switch,.chat-photo-action{display:grid;place-items:center;flex:none;width:48px;height:52px;border:0;border-radius:22px;background:#fff;color:#26211e;box-shadow:0 3px 11px #42250c15}
.chat-photo-action{font-size:30px;line-height:1}.voice-main{flex:1;min-height:52px;border:0;border-radius:30px;background:#fff;color:#211d1b;box-shadow:0 3px 11px #42250c15}
.voice-main b{font-size:17px;font-weight:700}.voice-main.listening{background:#cf654d!important;color:#fff!important}
.composer.text-mode{gap:8px;border-radius:0}.composer.text-mode .voice-mode-switch{order:-1;background:#fff;color:#3b3029}
.composer.text-mode .chat-attach{order:2;width:44px;height:44px;border-radius:20px;background:#fff;color:var(--amber);font-size:26px}
.composer.text-mode textarea{font-size:14px}.composer.text-mode button[type=submit]{order:3;border-radius:18px;background:var(--amber)}
#app.has-voice-dock{padding-bottom:0}.chat-body{padding-bottom:82px}
.image-review-card{align-self:flex-start;width:calc(100% - 42px);margin:0 0 18px 42px;padding:14px;border-color:#eee6dd;border-radius:19px;box-shadow:0 6px 22px #51301013}
.image-review-title span{font-size:16px}.image-review-title small{color:#a86a32}.image-review-source{background:#faf5ef}.image-review-source button,.review-audit,.review-edit summary,.review-add{color:var(--amber)}
.review-message.user{background:#f6ebdd}.review-message.assistant{background:#faf7f2}.review-questions,.review-warning{background:#fff1e4;color:#935a24}
.review-line{font-size:12px}.review-card-group>strong{font-size:13px}.review-ask{flex-direction:column}.review-ask textarea{width:100%}.review-ask button{align-self:flex-end;min-height:35px}
.image-review-card .primary.full{margin-top:10px}.review-cancel{color:var(--sub)}
.toast{background:#3e2b20}

/* Loan result page */
.warm-month{width:max-content;max-width:100%;margin:0 auto 15px;padding:4px 10px;border-radius:24px;background:#fff;box-shadow:0 3px 11px #5837160d;color:var(--ink)}
.warm-month span{min-width:114px;text-align:center;font-size:14px;font-weight:680}.warm-month button{font-size:21px;line-height:1}
.debt-summary{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:19px 17px;background:linear-gradient(125deg,#fffefa,#fff5eb)}
.debt-summary>div+div{padding-left:15px;border-left:1px solid #e7ddd2}.debt-summary small,.debt-summary span{display:block;color:var(--sub);font-size:11px}
.debt-summary strong{display:block;margin:10px 0 7px;color:#4a2115;font-size:clamp(22px,6vw,28px);font-variant-numeric:tabular-nums;letter-spacing:-.04em;white-space:nowrap}
.debt-summary>div+div strong{color:#9a5723}
.interest-strip{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:9px 1px 0;padding:9px 4px 10px;border-bottom:1px solid #e8ded3;color:#8c6a4a;font-size:12px}.interest-strip span{min-width:0}.interest-strip small{display:inline;margin-left:6px;color:var(--sub);font-size:10px}.interest-strip strong{flex:none;color:#a25d2d;font-size:15px;font-variant-numeric:tabular-nums}
.platform-group{margin-bottom:9px;padding:0 13px}.platform-head{display:flex;align-items:center;gap:10px;width:100%;padding:12px 0;list-style:none;cursor:pointer;text-align:left;color:var(--ink);user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}.platform-head::-webkit-details-marker{display:none}.platform-head::marker{content:''}.platform-head .row-chevron{font-size:17px;transition:transform .18s}.platform-group[open] .platform-head .row-chevron{transform:rotate(180deg)}.platform-content{padding-bottom:11px;border-top:1px solid #f0eae4}.platform-content .loan-detail{margin:0;padding:0;border:0;border-radius:0;border-bottom:1px solid #f3ede7}.platform-content .loan-detail:last-child{border-bottom:0}.platform-content .loan-detail-head{padding:11px 0 11px 14px}.platform-content .loan-detail-head .loan-head-main b{font-size:14px;font-weight:650}.platform-content .loan-detail-content{padding-left:14px;border-top:1px solid #f5f0ea}
.loan-detail{margin-bottom:9px;padding:0 13px;border:1px solid #eee6dd}.loan-detail-head{display:flex;align-items:center;gap:10px;width:100%;padding:12px 0;list-style:none;cursor:pointer;text-align:left;color:var(--ink);user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}.loan-detail-head::-webkit-details-marker{display:none}.loan-detail-head::marker{content:''}
.loan-head-main{flex:1;min-width:0}.loan-head-main b,.loan-head-main small,.loan-head-balance b,.loan-head-balance small{display:block}.loan-head-main b{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.loan-head-main small{margin-top:3px;color:var(--sub);font-size:11px}.loan-head-balance{text-align:right;flex:none}.loan-head-balance b{font-size:14px;font-variant-numeric:tabular-nums}.loan-head-balance small{margin-top:3px;color:var(--sub);font-size:10px}.loan-detail-head .row-chevron{font-size:17px;transition:transform .18s}.loan-detail[open] .loan-detail-head .row-chevron{transform:rotate(180deg)}
.loan-detail-content{padding-bottom:11px;border-top:1px solid #f0eae4}.loan-reconcile{padding:9px 0 5px;color:var(--sub);font-size:11px;line-height:1.6}.loan-reconcile.is-warning{color:#bb5a35}.loan-tools{display:flex;flex-wrap:wrap;gap:7px 15px;padding-top:8px;border-top:1px solid #f5f0ea}.loan-tools button,.loan-logo-upload{border:0;background:transparent;color:#9a612e;font-size:11px;padding:4px 0}.loan-logo-upload{cursor:pointer}
.loan-numbers{display:grid;grid-template-columns:1fr 1fr;gap:11px 8px;padding:11px 0;border-top:1px solid #f0eae4;border-bottom:1px solid #f0eae4}.loan-numbers small,.loan-numbers b{display:block}.loan-numbers small{color:var(--sub);font-size:10px}.loan-numbers b{margin-top:3px;color:#513425;font-size:14px;font-variant-numeric:tabular-nums}
.loan-period{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #f5f0ea;font-size:12px}.loan-period:last-child{border:0}.loan-period span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.loan-period span small{display:block;margin-top:2px;color:var(--sub);font-size:10px}.loan-period strong{font-variant-numeric:tabular-nums}.loan-period em{min-width:46px;text-align:right;font-size:10px;font-style:normal;color:#9b7754}.loan-period em.paid{color:#34876c}.loan-period em.partial,.loan-period em.urgent,.loan-period em.overdue{color:#cc563e}.loan-missing{margin:11px 0 0;color:var(--sub);font-size:11px}
.debt-action-card{padding:13px 14px;border:1px solid #ecd7bd;border-radius:13px;background:#fffaf4;color:var(--ink);box-shadow:0 4px 12px #6243240b}.debt-action-card>b{display:block;color:#9a612e;font-size:13px}.debt-action-card p{margin:7px 0;font-size:12px}.debt-action-card ul{margin:7px 0 11px;padding-left:18px;font-size:12px;line-height:1.6}.debt-action-card li+li{margin-top:3px}.debt-action-card>div{display:flex;gap:8px}.debt-action-card button{flex:1;padding:9px 5px;font-size:12px}.debt-action-card small{display:block;margin-top:8px;color:var(--sub);font-size:10px}
.source-link{width:100%;padding:10px 0 0;border:0;border-top:1px solid #f5f0ea;background:transparent;text-align:left;color:#9a612e;font-size:11px}
.due-alert{display:flex;align-items:center;gap:10px;width:100%;margin:14px 0 22px;padding:13px 14px;border:1px solid #f7d4c9;border-radius:17px;background:#fff0ec;color:#bc3f2a;text-align:left}
.due-alert.overdue{background:#ffe8e5}.due-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:#e24e35;color:#fff;font-size:21px;font-weight:800}
.due-alert span:nth-child(2){flex:1}.due-alert b,.due-alert small{display:block}.due-alert b{font-size:14px}.due-alert small{margin-top:3px;font-size:11px}
.loan-heading{margin:20px 1px 12px}.loan-item{display:flex;align-items:center;gap:10px;width:100%;margin:0 0 9px;padding:16px 12px;border:1px solid #f0eae4;text-align:left;color:var(--ink)}
.loan-avatar{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:#f2e4d3;color:#9e6631;font-size:17px;font-weight:750;overflow:hidden}.loan-avatar.has-logo{background:#fff;border:1px solid #eee5dc}.loan-avatar img{display:block;width:100%;height:100%;object-fit:contain}
.loan-main{flex:1;min-width:0}.loan-main b,.loan-main small,.loan-main strong,.loan-next small,.loan-next strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.loan-main b{font-size:15px}.loan-main small,.loan-next small{margin-top:4px;color:var(--sub);font-size:10px}.loan-main strong{margin-top:3px;font-size:16px;font-variant-numeric:tabular-nums}
.loan-next{max-width:41%;text-align:right}.loan-next strong{margin-top:8px;font-size:15px;font-variant-numeric:tabular-nums}.loan-next small.overdue-text,.loan-next small.urgent-text{color:var(--red)}
.row-chevron{flex:none;color:#968d85;font-size:19px}.month-bills-heading{margin:24px 1px 10px}.bill-list{border:1px solid #f0eae4;box-shadow:0 5px 17px #4d35210a}.bill-row{padding:13px 12px}
.overdue-text,.urgent-text{color:var(--red)!important}.soon-text{color:#b17b31!important}.normal-text{color:var(--sub)!important}

/* Cashbook result page — stat summary card */
.cash-summary{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:15px 4px 17px;border:1px solid #f0eae4;border-radius:20px;background:#fff;box-shadow:0 1px 2px #4d352108,0 12px 30px -12px #4d352114}
.cash-summary>div{min-width:0;padding:0 8px;background:transparent;border-radius:0;text-align:center}
.cash-summary>div:nth-child(2),.cash-summary>div:nth-child(3){border-left:1px solid #f1ece6}
.cash-summary small{display:block;font-size:11px;line-height:1;color:var(--sub);letter-spacing:.01em}
.cash-summary strong{display:block;margin-top:9px;font-size:clamp(19px,5.6vw,24px);line-height:1.05;font-weight:740;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:#34241d}
.cash-summary-cell{cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .18s ease}
.cash-summary-cell strong{color:#b7afa8;transition:color .28s ease}
.cash-summary-cell:active{transform:scale(.965)}
.cash-summary-cell.active small{color:#9c612d}
.cash-summary-cell[data-id="expense"].active strong{color:#a46b31}
.cash-summary-cell[data-id="income"].active strong{color:var(--mint)}
.cash-summary .cash-indicator{position:absolute;top:0;left:4px;padding:0;width:calc((100% - 8px)/3);height:100%;background:transparent;border-radius:0;pointer-events:none;transition:transform .42s cubic-bezier(.22,1,.36,1)}
.cash-indicator-bar{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);width:24px;height:2px;border-radius:2px;background:#a46b31;transition:background .28s ease}
.cash-indicator.income{transform:translateX(100%)}
.cash-indicator.income .cash-indicator-bar{background:var(--mint)}
.category-panel{margin-top:13px;padding:18px 16px}.category-layout{display:flex;align-items:center;gap:22px;margin-top:13px}
.category-chart{position:relative;display:grid;place-items:center;flex:none;width:118px;height:118px;border-radius:50%}.ring-svg{position:absolute;inset:0;width:100%;height:100%}.ring-center{display:flex;flex-direction:column;align-items:center;justify-content:center;width:72px;height:72px;border-radius:50%;background:#fff;text-align:center;animation:ringCenter .5s ease .1s both}
.ring-center strong{font-size:12px;white-space:nowrap}.ring-center small{margin-top:3px;color:var(--sub);font-size:10px}
.category-legend{flex:1;min-width:0}.category-legend>div{display:flex;align-items:center;gap:7px;padding:5px 0;font-size:11px;animation:legendIn .45s ease both}
.category-legend i{flex:none;width:8px;height:8px;border-radius:50%}.category-legend span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .category-legend b{font-weight:600;color:#5d5148}
.category-empty{padding:28px 0 20px;text-align:center;color:var(--sub);font-size:12px;animation:ringCenter .4s ease both}
.ring-seg{animation:segGrow .95s cubic-bezier(.22,1,.36,1) both}
@keyframes segGrow{from{stroke-dasharray:0 var(--C)}to{stroke-dasharray:var(--len) var(--gap)}}
@keyframes ringCenter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes legendIn{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){.ring-seg,.ring-center,.category-legend>div,.category-empty{animation:none!important}.cash-summary-cell,.cash-indicator,.cash-indicator-bar{transition:none!important}}
.daily-group{overflow:hidden;margin-top:13px;padding:0 14px}.daily-heading{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:55px;border-bottom:1px solid #eee8e1}
.daily-heading>span:first-child{white-space:nowrap}.daily-heading b{font-size:16px}.daily-heading small{margin-left:7px;color:var(--sub);font-size:11px}
.daily-totals{display:flex;gap:9px;white-space:nowrap}.daily-totals em{font-size:10px;font-style:normal;color:var(--sub)}.daily-totals b{font-size:11px;color:#5b5149;font-variant-numeric:tabular-nums}
.daily-totals em:first-child b{color:var(--mint)}.daily-totals em:last-child b{color:#9a6735}
.expense-list{background:transparent}.expense-row{gap:10px;min-height:65px;padding:8px 0;background:transparent;border-bottom:1px solid #f0eae4}
.expense-row:last-child{border-bottom:0}.expense-category{display:grid;place-items:center;width:40px;min-width:40px;height:40px;border-radius:50%;background:#ce8850;color:#fff;font-size:15px}
.expense-category.income{background:#6ba765;color:#fff}.expense-info b{font-size:14px}.expense-info small{margin-top:4px;font-size:11px}.expense-row strong{font-size:14px;white-space:nowrap}.expense-row strong.income-text{color:var(--mint)}
.talk-entry{position:fixed;z-index:15;left:14px;right:14px;bottom:11px;display:flex;align-items:center;justify-content:center;gap:9px;min-height:52px;border:0;border-radius:30px;background:linear-gradient(100deg,#c28b4f,#aa7035);color:#fff;font-size:15px;font-weight:700;box-shadow:0 5px 15px #63360c25}
.talk-entry .icon{width:20px;height:20px}
@media(max-width:380px){.daily-heading{align-items:flex-start;flex-direction:column;justify-content:center;gap:4px;padding:9px 0}.daily-totals{align-self:flex-end}.category-layout{gap:10px}.category-chart{width:96px;height:96px}.category-chart>div{width:60px;height:60px}.debt-summary strong{font-size:21px}}

/* Compact conversation chrome */
:root{--bg:#f4f1ed;--line:#e9e3dc}
html,body,#app,.screen{background:var(--bg)}
.warm-screen{background:var(--bg)}
.warm-header,.chat-header{padding:0 10px;background:var(--bg);border-bottom:1px solid #e8e1d9}
.warm-header>.brand-row{display:none}
.main-nav{display:flex;align-items:center;width:100%;height:49px;gap:2px}
.top-tabs{flex:1;display:grid;grid-template-columns:repeat(4,1fr);align-items:stretch;margin:0;height:49px}
.top-tab{min-height:49px;padding:0;color:#68615b;font-size:15px;font-weight:520}
.top-tab.active{color:#9e6835;font-weight:730}
.top-tab.active:after{bottom:3px;width:20px;height:3px}
.main-settings{display:grid;place-items:center;flex:none;width:40px;height:42px;border:0;background:transparent;color:#342d28;font-size:26px;line-height:1}
.chat-screen .chat-body{min-height:calc(100dvh - 49px);padding:0 13px 62px}
.chat-screen .chat-list{gap:14px;padding:20px 0 20px}
.chat-entry{display:flex;flex-direction:column;gap:4px;width:100%}
.chat-time{display:block;padding-left:44px;color:#99918a;font-size:10px;line-height:1.35;font-variant-numeric:tabular-nums}
.chat-entry.user .chat-time{padding-left:0;padding-right:44px;text-align:right}
.chat-message{display:flex;align-items:flex-start;gap:8px;width:100%}
.chat-message.user{flex-direction:row-reverse}
.chat-avatar{display:grid;place-items:center;flex:none;width:36px;height:36px;overflow:hidden;border-radius:7px;background:#b18456;color:white;font-size:16px;font-weight:700}
.chat-avatar.ai{background:#a2703c}
.chat-avatar.ai[data-action="toggleChatTimes"]{appearance:none;border:0;padding:0;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.chat-avatar.mine{background:#ded4c8;color:#786654}
.chat-avatar img{width:100%;height:100%;object-fit:cover}
.chat-message .bubble{position:relative;align-self:auto;max-width:min(76%,430px);margin:0;padding:8px 11px;border:0;border-radius:7px;background:#fff;color:#26211e;box-shadow:none;font-size:15px;line-height:1.48}
.chat-message .bubble.assistant:before{display:none}
.chat-message .bubble.user{background:#e8bc84;color:#2c211a}
.chat-message .bubble:after{content:"";position:absolute;top:13px;width:8px;height:8px;background:inherit;transform:rotate(45deg)}
.chat-message.assistant .bubble:after{left:-4px}
.chat-message.user .bubble:after{right:-4px}
.chat-message .bubble.voice-message{padding:0;background:transparent;border:0;box-shadow:none}
.chat-message .bubble.voice-message:after{background:#e8bc84}
.chat-message .bubble.voice-message{display:flex;flex-direction:column;align-items:flex-end;gap:4px;max-width:min(78vw,300px)}
.chat-message .voice-bubble,.chat-message.user .bubble.voice-message .voice-bubble{display:flex;align-items:center;justify-content:space-between;gap:24px;min-width:128px;min-height:42px;padding:8px 12px;border:0;border-radius:7px;background:#e8bc84;color:#382719;box-shadow:none;font-size:15px;font-weight:500}
.voice-duration{font-variant-numeric:tabular-nums}
.voice-signal{position:relative;display:block;width:18px;height:18px;flex:none}
.voice-signal i{position:absolute;top:50%;right:2px;display:block;border:solid currentColor;border-width:0 0 0 2px;border-radius:50%;transform:translateY(-50%)}
.voice-signal i:nth-child(1){width:6px;height:7px}
.voice-signal i:nth-child(2){width:13px;height:15px}
.voice-signal i:nth-child(3){display:none}
.voice-signal:after{content:"";position:absolute;right:0;top:calc(50% - 1.5px);width:3px;height:3px;border-radius:50%;background:currentColor}
.voice-bubble.playing .voice-signal i{animation:voicePulse 1.05s infinite ease-in-out}
.voice-bubble.playing .voice-signal i:nth-child(2){animation-delay:.16s}
.voice-bubble.playing .voice-signal i:nth-child(3){animation-delay:.32s}
@keyframes voicePulse{0%,100%{opacity:.22}50%{opacity:1}}
.voice-dock,.composer.text-mode{min-height:56px;padding:6px 10px;gap:8px;border-top:1px solid #e7e1db;background:#f6f4f1;box-shadow:none}
.voice-mode-switch,.chat-photo-action{width:39px;height:41px;border:0;border-radius:8px;background:transparent;box-shadow:none;color:#332d29}
.voice-mode-switch .icon{width:24px;height:24px}
.chat-photo-action{font-size:29px}
.voice-main{min-height:40px;border:1px solid #ded8d0;border-radius:7px;background:#fff;box-shadow:none}
.voice-main b{font-size:15px;font-weight:570}
.composer.text-mode .voice-mode-switch{width:39px;height:41px;background:transparent}
.composer.text-mode .chat-attach{width:38px;height:40px;border-radius:7px;background:transparent}
.composer.text-mode textarea{min-height:38px;padding:8px 9px;border:1px solid #e4ded7;border-radius:7px;background:#fff}
.composer.text-mode button[type=submit]{width:38px;height:38px;border-radius:7px}
.chat-body{padding-bottom:62px}
.style-plain{--bg:#ededed;--line:#dedede}
.style-plain .chat-message .bubble.user,.style-plain .chat-message.user .bubble.voice-message .voice-bubble,.style-plain .chat-message .bubble.voice-message:after{background:#a6e77f}
.style-plain .chat-message .bubble.user.voice-message{background:transparent}
.style-plain .warm-header,.style-plain .chat-header{border-bottom-color:#dedede}

/* Settings directory and appearance */
.settings-screen{background:var(--bg)}
.settings-header{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;min-height:51px;padding:0 10px;border-bottom:1px solid var(--line);background:var(--bg);text-align:center}
.settings-header strong{font-size:17px;font-weight:660}
.settings-header button{display:grid;place-items:center;width:40px;height:42px;border:0;background:transparent;color:var(--ink)}
.settings-header .icon{width:23px;height:23px}
.settings-menu{padding:20px 14px}
.settings-menu>button{display:flex;align-items:center;gap:13px;width:100%;min-height:68px;padding:10px 14px;border:0;border-bottom:1px solid var(--line);background:#fff;color:var(--ink);text-align:left}
.settings-menu>button:first-child{border-radius:12px 12px 0 0}
.settings-menu>button:nth-child(3){border-radius:0 0 12px 12px;border-bottom:0}
.menu-symbol{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:#f4ebe0;color:#9e6835}
.menu-symbol .icon{width:18px;height:18px}
.settings-menu button span:nth-child(2){flex:1}
.settings-menu b,.settings-menu small{display:block}
.settings-menu b{font-size:14px}
.settings-menu small{margin-top:3px;color:var(--sub);font-size:11px}
.settings-menu em{color:#aaa39d;font-size:22px;font-style:normal}
.settings-menu>p{margin:18px 4px;color:var(--sub);font-size:11px;text-align:center}
.settings-content{padding:16px 14px 35px}
.settings-content>h2{margin:10px 2px 12px;font-size:15px}
.style-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:26px}
.style-option{display:flex;flex-direction:column;align-items:flex-start;padding:10px;border:1.5px solid transparent;border-radius:12px;background:#fff;color:var(--ink);text-align:left}
.style-option.selected{border-color:#aa7540}
.style-option b{margin-top:8px;font-size:13px}.style-option small{margin-top:2px;color:var(--sub);font-size:11px}
.style-preview{display:flex;flex-direction:column;gap:7px;width:100%;height:58px;padding:10px;border-radius:7px;background:#f4f1ed}
.style-preview i{display:block;width:55%;height:12px;border-radius:4px;background:#fff}.style-preview i:last-child{align-self:flex-end;background:#e8bc84}
.style-preview.plain-preview{background:#ededed}.style-preview.plain-preview i:last-child{background:#a6e77f}
.avatar-setting{display:flex;align-items:center;gap:11px;padding:12px;border-radius:12px;background:#fff;font-size:12px}
.avatar-setting>span:nth-child(2){flex:1;color:var(--sub)}
.avatar-setting label{padding:7px 10px;border:1px solid #c9b29a;border-radius:7px;color:#8f602f;font-weight:650;white-space:nowrap}
.avatar-remove{margin:12px 0;border:0;background:transparent;color:#9d6533;font-size:12px}

/* Each revised confirmation is a new AI message in the conversation. */
.review-card-message{display:flex;align-items:flex-start;gap:8px;width:100%}
.review-card-body{width:calc(100% - 44px);max-width:430px}
.review-card-message .image-review-card{width:100%;margin:0;padding:13px;border-radius:8px;box-shadow:none}
.review-card-message .review-archived{padding:9px 11px;border:1px solid #e7dfd5;border-radius:7px;background:#fff;color:var(--sub)}
.review-archived span,.review-archived small{display:block}
.review-archived span{font-size:12px;font-weight:650}.review-archived small{margin-top:4px;font-size:11px;line-height:1.4}
.review-latest{margin:10px 0;color:#4e4238;font-size:12px;line-height:1.55}
.review-result-loan{margin:9px 0;padding:10px;border:1px solid #eee6dc;border-radius:11px;background:#fffdf9}.review-result-head{display:flex;align-items:center;justify-content:space-between;gap:7px}.review-result-head b{font-size:13px}.review-result-head em{font-size:10px;font-style:normal;color:#a16b37}.review-result-facts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:9px 0}.review-result-facts span{color:var(--sub);font-size:10px}.review-result-facts b{display:block;margin-top:3px;color:var(--ink);font-size:12px;font-variant-numeric:tabular-nums}.review-result-periods{border-top:1px solid #eee7df}.review-result-periods>div{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px;padding:8px 0;border-bottom:1px solid #f2ede8;font-size:11px}.review-result-periods>div:last-child{border:0}.review-result-periods span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.review-result-periods small{display:block;margin-top:2px;color:var(--sub);font-size:9px}.review-result-periods b{font-variant-numeric:tabular-nums}.review-result-periods em{font-size:10px;font-style:normal;color:#b27545}.review-result-periods em.paid{color:#39866e}.review-result-periods p{margin:9px 0 0;color:var(--sub);font-size:10px}.review-checks{margin:10px 0;color:var(--sub);font-size:10px}.review-checks summary{color:#9a612e;cursor:pointer}.review-checks p{margin:5px 0;padding-left:8px;border-left:2px solid #e4c9a6}
.review-result-head{justify-content:flex-start}.review-result-head .loan-avatar{width:30px;height:30px;border-radius:8px;font-size:13px}.review-result-head b{flex:1;min-width:0}.review-result-head em{flex:none}
.review-followup-hint{margin:12px 0 4px;color:var(--sub);font-size:11px;line-height:1.5}
.review-error:not([hidden]){margin:10px 0;padding:9px 10px;border-radius:6px;background:#fff0eb;color:#a33d2d;font-size:12px;line-height:1.5}
.review-card-message .image-review-card{padding:12px}
.image-review-card .image-review-title{align-items:center}
.image-review-card .image-review-title span{font-size:15px}
.image-review-card .image-review-title small{font-size:10px;color:var(--sub)}
.image-review-card .image-review-source{margin-top:5px;padding:0;background:none;font-size:10px}
.image-review-card .image-review-source button{padding:5px 0}
.image-review-card .review-card-group{padding:8px 0}
.image-review-card .review-card-group>strong{margin-bottom:4px;font-size:11px;color:var(--sub)}
.image-review-card .review-result-loan{margin:5px 0;padding:9px;border:1px solid #eee6dc;border-radius:9px}
.image-review-card .review-result-head b{font-size:13px}
.review-result-balance{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-top:8px}
.review-result-balance span{font-size:11px;color:var(--sub)}
.review-result-balance strong{font-size:18px;letter-spacing:-.02em;font-variant-numeric:tabular-nums;color:#3e3026}
.review-result-meta{margin:3px 0 6px;font-size:11px;color:#86613d}
.review-result-meta small{display:block;margin-top:3px;font-size:10px;color:var(--sub)}
.review-result-secondary{margin:2px 0 6px;font-size:10px;color:var(--sub)}
.review-result-periods>div{grid-template-columns:minmax(0,1fr) auto auto;gap:5px;padding:6px 0;font-size:10px}
.review-result-periods small{font-size:9px}
.review-result-periods em{font-size:9px}
.review-quick-field{display:block;margin-top:7px;color:#9b4c34;font-size:11px}
.review-quick-field input{display:block;width:100%;margin-top:3px;padding:8px 9px;border:1px solid #dbc6b0;border-radius:7px;background:#fff;font-size:12px}
.review-extra{margin:3px 0 5px;color:var(--sub);font-size:10px}
.review-extra summary{padding:6px 0;color:#946337;cursor:pointer}
.review-extra p{margin:5px 0;line-height:1.45}
.image-review-card .review-edit{margin:3px 0}
.image-review-card .review-edit summary{padding:7px 0;font-size:10px}
.image-review-card .primary.full{margin-top:6px}
.image-review-card .review-followup-hint{margin-top:8px}
.image-review-card .review-cancel{margin-top:7px}
.duplicate-choice{margin:10px 0;padding:12px;border:2px solid #cc8b31;border-radius:10px;background:#fff4df;color:#63441e}
.duplicate-choice>strong{display:block;font-size:14px;color:#8b520e}
.duplicate-choice p{margin:8px 0;font-size:13px;line-height:1.5}
.duplicate-choice p small{display:block;margin-top:3px;font-size:12px;color:#80623c}
.duplicate-option{display:block;width:100%;min-height:54px;margin-top:8px;padding:10px 12px;border:1px solid #d1b994;border-radius:8px;background:#fff;text-align:left;font-size:14px;font-weight:650;color:#493a28}
.duplicate-option small{display:block;margin-top:4px;font-size:11px;font-weight:400;color:#756851}
.duplicate-option.selected{border:2px solid #92703b;padding:9px 11px;background:#efe3cf}
.duplicate-option.selected:before{content:'';display:inline-block;width:15px;height:15px;margin-right:6px;vertical-align:-2px;background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'16'%20height%3D'16'%20viewBox%3D'0%200%2016%2016'%3E%3Crect%20x%3D'1.6'%20y%3D'1.6'%20width%3D'12.8'%20height%3D'12.8'%20rx%3D'3'%20fill%3D'none'%20stroke%3D'%238a6a3f'%20stroke-width%3D'1.2'%2F%3E%3Cpath%20d%3D'M4.7%208.2l2.2%202.2%204.4-4.7'%20fill%3D'none'%20stroke%3D'%238a6a3f'%20stroke-width%3D'1.2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-size:contain}
.duplicate-decision{display:block;margin-top:10px;font-size:12px;font-weight:600}
.proposal-actions{display:flex;gap:8px;margin-top:12px}.proposal-actions .primary{flex:1;min-height:44px}
.proposal-actions .delete-confirm{background:#ac4a39;color:#fff}
.debt-action-card>.duplicate-choice{display:block}
.debt-action-card .duplicate-option{flex:none;padding:10px 12px;font-size:14px}
.debt-action-card .duplicate-option.selected{padding:9px 11px}
.debt-action-card.duplicate-warning-card,.image-review-card.duplicate-warning-card{border:2px solid #bd7426;background:#ffedc2;box-shadow:0 3px 12px #ad6d201a}
.duplicate-warning-card>b,.duplicate-warning-card .image-review-title span{font-size:16px;color:#91500c}
.duplicate-warning-card .duplicate-choice{background:#fffaf0;border:1px solid #d3a66a}
.image-review-card .duplicate-choice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0;padding:0;border:0;border-radius:0;background:transparent}
.image-review-card .duplicate-option{min-width:0;min-height:38px;margin:0;padding:6px 8px;border:1px solid #d1b994;border-radius:7px;text-align:center;font-size:12px;font-weight:600;line-height:1.35}
.image-review-card .duplicate-option.selected{padding:6px 8px;border:1px solid #a16b37;background:#eedbc0;color:#71491f;box-shadow:inset 0 0 0 1px #a16b37}
.image-review-card .duplicate-option:active{background:#f2e5cf}

/* Hold to talk: animated capture, slide up to cancel. */
.voice-main.listening{background:#e8ded2!important;color:#573820!important}
.voice-main.canceling{background:#f9e0dc!important;color:#b04537!important}
.record-overlay{position:fixed;z-index:40;left:50%;bottom:83px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;width:178px;min-height:112px;padding:14px 12px;border-radius:15px;background:#3a302ae8;color:#fff;pointer-events:none;box-shadow:0 12px 35px #39241b30}
.record-overlay.cancel{background:#9b433be8}
.record-time{font-size:15px;font-weight:620;font-variant-numeric:tabular-nums}
.record-hint{font-size:11px;color:#f5e5d7;white-space:nowrap}
.record-wave{display:flex;align-items:center;gap:4px;height:24px}
.record-wave i{display:block;width:3px;height:8px;border-radius:4px;background:#f5d3a5;animation:captureWave .75s infinite ease-in-out alternate}
.record-wave i:nth-child(2),.record-wave i:nth-child(6){animation-delay:.12s}
.record-wave i:nth-child(3),.record-wave i:nth-child(5){animation-delay:.25s}
.record-wave i:nth-child(4){animation-delay:.36s}
.record-wave i:nth-child(7){animation-delay:.48s}
.record-overlay.cancel .record-wave i{animation-play-state:paused;background:#fff}
@keyframes captureWave{from{height:5px;opacity:.6}to{height:23px;opacity:1}}

/* WeChat-inspired full-screen recording state. */
.record-overlay,.record-overlay.cancel{inset:0;left:0;right:0;top:0;bottom:0;transform:none;display:block;width:100%;height:100dvh;min-height:0;padding:0;border-radius:0;background:#1a1a1ac4;box-shadow:none}
.record-center{position:absolute;top:49%;left:50%;display:flex;flex-direction:column;align-items:center;gap:17px;transform:translate(-50%,-50%)}
.record-green{position:relative;display:grid;place-items:center;width:210px;height:83px;border-radius:17px;background:#99eb69}
.record-green:after{content:"";position:absolute;bottom:-10px;left:calc(50% - 11px);width:22px;height:22px;border-radius:3px;background:inherit;transform:rotate(45deg)}
.record-overlay.cancel .record-green{background:#ef8c7b}
.record-overlay.as-text .record-green{background:#bddff1}
.record-center .record-time{color:#eee;font-size:13px;font-weight:520}
.record-green .record-wave{z-index:1;gap:2px;height:31px}
.record-green .record-wave i{width:2.5px;background:#2f4925;animation-duration:.58s}
.record-green .record-wave i:nth-child(4n){animation-delay:.15s}
.record-green .record-wave i:nth-child(5n){animation-delay:.3s}
.record-overlay.cancel .record-wave i{background:#6c2f28}
.record-overlay.as-text .record-wave i{background:#345b70}
.record-actions{position:absolute;bottom:116px;left:0;right:0;display:flex;justify-content:space-between;gap:20px;padding:0 13px;color:#fff;font-size:15px}
.record-actions span{display:grid;place-items:center;flex:1;height:69px;border-radius:48px;background:#ffffff28;text-align:center}
.record-overlay.cancel .record-cancel-zone{background:#c9685e}
.record-overlay.as-text .record-text-zone{background:#87bb88}
.record-send-zone{position:absolute;bottom:-19px;left:-5%;display:grid;place-items:center;width:110%;height:115px;border-radius:50% 50% 0 0 / 26% 26% 0 0;background:#dedbd6;color:#211f1c}
.record-send-zone .record-hint{color:#211f1c;font-size:16px;font-weight:550}

/* Immediate press feedback and compositor-only microphone movement. */
.voice-main,.voice-bubble,.record-overlay,.record-overlay *{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.voice-main{touch-action:none;outline:none}
.voice-main:focus-visible,.voice-bubble:focus-visible{outline:2px solid #7c5135;outline-offset:2px}
.record-overlay{animation:recordVeilIn .12s ease-out both}
.record-green{animation:recordBubbleIn .16s cubic-bezier(.2,.8,.2,1.2) both}
.record-green .record-wave i{height:26px;animation:none;transform:scaleY(.23);transform-origin:center;will-change:transform}
.record-overlay.cancel .record-wave i,.record-overlay.as-text .record-wave i{animation:none}
@keyframes recordVeilIn{from{opacity:0}to{opacity:1}}
@keyframes recordBubbleIn{from{transform:scale(.93);opacity:.6}to{transform:scale(1);opacity:1}}

/* Conversation results stay in the message; duplicate questions use a soft tint. */
.chat-status{display:inline-block;margin-right:6px;font-weight:700;line-height:inherit}
.chat-status.success{color:#31805a}
.chat-status.failure{color:#b84938}
.chat-status.warning{color:#ad742c}
.chat-message.assistant .bubble.duplicate-warning{background:#fff0cf;color:#684b29}
.debt-action-card .proposal-actions{display:flex;gap:8px;margin-top:10px}
.debt-action-card .duplicate-summary{padding:5px 0;color:#85643b;font-size:12px}

/* One fixed card template for every model-proposed operation. */
.agent-card{padding:11px;border:1px solid #e6d8c6;border-radius:8px;background:#fffaf3;color:#40382f}
.agent-card.agent-question{background:#fff0cf;border-color:#c89953}
.agent-card .agent-title{display:block;font-size:14px;line-height:1.4}
.agent-card>p{margin:6px 0;font-size:13px;line-height:1.5}
.agent-changes{max-height:220px;overflow-y:auto;margin:7px 0;overscroll-behavior:contain}
.agent-row{display:flex;align-items:center;gap:7px;padding:6px 0;border-bottom:1px solid #eee5d9}
.agent-row:last-child{border-bottom:0}
.agent-row>div{min-width:0;flex:1}.agent-row b{display:block;font-size:12px;font-weight:600}
.agent-row small{display:block;margin-top:3px;font-size:11px;line-height:1.5;color:#81715c;overflow-wrap:anywhere}
.agent-row .loan-avatar{flex:none;width:27px;height:27px;border-radius:7px}
.agent-missing{display:block;margin-top:6px;font-size:11px;color:#88745a;line-height:1.5}
.agent-actions{display:flex;gap:6px;margin-top:9px}
.agent-actions button{flex:1;min-width:0;min-height:38px;padding:7px 8px;font-size:12px;border-radius:7px}
.agent-actions .delete-confirm{background:#ac4a39;color:#fff}
.agent-source{display:block;margin-top:6px;padding:3px 0;border:0;background:none;color:#99703e;font-size:11px}

.month-group .platform-content{padding:0 12px 5px}
.month-group .month-bill-content .bill-row{padding:10px 4px;background:transparent;border-bottom:1px solid #f3ede7}
.month-group .month-bill-content .bill-row:last-child{border-bottom:0}
.month-group .month-bill-content .bill-date b{font-size:16px}
.month-group .month-bill-content .bill-info b{font-size:13px}
.bill-components{color:var(--sub);font-size:10px;line-height:1.5;white-space:normal!important}
.loan-period span{white-space:normal}

/* Borrowing summaries stay compact; measured height animates both ways. */
.platform-head,.loan-detail-head{flex-wrap:wrap;column-gap:9px;row-gap:7px}
.borrowing-facts{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 16px;width:100%;font-size:11px;color:var(--sub)}
.borrowing-facts>span{display:inline-flex;align-items:baseline;gap:5px}
.borrowing-facts b{color:#5b3b28;font-size:12px;font-weight:650;font-variant-numeric:tabular-nums}
.borrowing-facts small,.loan-interest-total small{margin-left:3px;color:var(--sub);font-size:10px;font-weight:400}
.platform-head>.borrowing-facts{margin-top:1px;padding-top:8px;border-top:1px solid #f2ebe3}
.interest-strip{margin:0 1px 11px;padding:0 1px 9px}
.interest-strip .borrowing-facts{justify-content:space-between}
.loan-interest-total{width:100%;color:var(--sub);font-size:11px;line-height:1.5}
.loan-interest-total b{color:#805027;font-size:12px;font-variant-numeric:tabular-nums}
.loan-head-main{flex-basis:90px}
.loan-head-balance b,.month-group .bill-end b{color:#b33e26}
.loan-period em:not(.paid){padding:3px 7px;border-radius:5px;background:#fff0e9;color:#b33e26;font-weight:650}
.loan-period em.urgent,.loan-period em.overdue{background:#fde4df;color:#b52c23}
.loan-period em.paid{padding:3px 7px;color:#25825e;background:#edf6f0;border-radius:5px}
.month-group .bill-end small{display:inline-block;margin-top:3px;padding:2px 6px;border-radius:4px;background:#fff0e9;color:#b33e26!important;font-weight:600}
.debt-screen .normal-text,.debt-screen .soon-text{color:#b33e26!important}
details[data-disclosure-open='false']>summary>.row-chevron{transform:rotate(0deg)!important}
details[data-disclosure-open='true']>summary>.row-chevron{transform:rotate(180deg)!important}
.platform-content,.loan-detail-content{box-sizing:border-box}
@media(prefers-reduced-motion:reduce){.platform-head .row-chevron,.loan-detail-head .row-chevron{transition:none}}

/* Compact memo notebook. */
.memo-content{padding-top:16px;padding-bottom:32px}.memo-toolbar{display:flex;gap:10px}.memo-toolbar input{min-width:0;flex:1;padding:11px 12px;border:1px solid #ded7ce;border-radius:10px;background:#fff;font:inherit}.memo-toolbar button{white-space:nowrap;padding:10px 14px}
.memo-filters{display:flex;gap:4px;margin:14px 0 8px}.memo-filters button{border:0;background:none;padding:8px 10px;color:var(--sub);font-size:13px}.memo-filters .active{color:#805027;font-weight:650;background:#ece4d8;border-radius:8px}
.memo-row{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #e7dfd5;background:transparent;padding:16px 2px;color:inherit}.memo-row b{font-size:16px;overflow-wrap:anywhere}.memo-row p{margin:7px 0;line-height:1.55;color:#756b60;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere}.memo-row small,.memo-modal>small{color:var(--sub);font-size:11px}.memo-row.is-done>b{color:#928a80}.memo-body{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8;margin:20px 0;font-size:15px}.memo-modal .modal-head h2{overflow-wrap:anywhere}.memo-modal textarea{min-height:180px;line-height:1.7}.memo-modal details{margin:16px 0}.memo-modal summary{color:var(--sub);font-size:13px;cursor:pointer}.memo-modal form>.primary{margin-top:18px}.memo-actions{display:flex;flex-wrap:wrap;gap:8px}.memo-actions button{padding:9px 14px}.memo-history>div{border-top:1px solid #e9e1d8;padding:14px 0}.memo-history small{display:block;color:var(--sub);margin-bottom:5px}.memo-history p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:13px}.memo-history button{border:0;background:transparent;color:#805027;padding:6px 0}.memo-modal{max-height:88dvh;overflow:auto}
@media(max-width:360px){.top-tabs .top-tab{padding-left:10px;padding-right:10px}.memo-filters button{padding:8px}}

/* Mature Swiper paging; fixed composer stays outside the transformed track. */
.tab-pager{width:100%;overflow:hidden;--swiper-theme-color:#a86c30}
.tab-pager>.swiper-wrapper{align-items:flex-start}
.tab-pager .swiper-slide{height:auto;min-width:0;overflow:hidden}
.tab-pager .screen{min-height:calc(100dvh - 50px)}
.tab-pager .swiper-slide[aria-hidden] *{animation:none!important}
.tab-pager .swiper-slide[aria-hidden] .ring-seg{stroke-dasharray:var(--len) var(--gap)}
.tab-pager .swiper-slide[aria-hidden] .category-legend>div{opacity:1;transform:none}
.top-tabs.is-swiping .top-tab.active:after{transform:translateX(calc(-50% + var(--swipe-indicator,0px)))}

/* Persistent navigation stays outside the transformed pager. */
#app.has-tab-pager{padding-top:50px}
#app.has-tab-pager>header{position:fixed;top:0;left:50%;transform:translateX(-50%);width:100%;max-width:470px;z-index:30}
#app>.voice-dock[hidden],#app>.composer[hidden]{display:none!important}
.tab-pager .swiper-slide[aria-hidden] .talk-entry{visibility:hidden}
.tab-pager .swiper-wrapper{will-change:transform}

/* Tabs use text and underline feedback; suppress WebView's large tap-highlight rectangle. */
.top-tabs .top-tab{appearance:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;box-shadow:none;background:transparent}
.top-tabs .top-tab:active,.top-tabs .top-tab:focus{background:transparent;box-shadow:none;outline:none}
.top-tabs .top-tab:focus-visible{outline:2px solid #a86c30;outline-offset:-6px;border-radius:4px}
#app.has-tab-pager .screen>.content{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
#app>.voice-dock,#app>.composer.text-mode{padding-bottom:calc(6px + env(safe-area-inset-bottom))}

/* Original compact red reminder, for the nearest due date only. */
.due-reminder{margin:14px 0 22px;overflow:hidden;border:1px solid #f7d4c9;border-radius:17px;background:#fff0ec;color:#bc3f2a;box-shadow:none}
.due-reminder-heading{display:flex;align-items:center;gap:10px;padding:13px 14px 5px}
.due-reminder-title{flex:1;min-width:0}.due-reminder-title b{display:block;font-size:14px}.due-reminder-title small{display:block;margin-top:3px;font-size:11px;color:#b57667}
.due-reminder-heading>strong{flex:none;font-size:14px;font-variant-numeric:tabular-nums}.due-reminder-heading>strong>small{margin-right:5px;font-size:11px;font-weight:400;color:#b57667}
.due-platforms{list-style:none;margin:0;padding:0 14px 11px 58px}
.due-platforms>li{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:29px;padding:3px 0;font-size:13px}
.due-platform-name{min-width:0;overflow-wrap:anywhere}.due-platforms strong{flex:none;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}

/* Compact grouped settings and message actions, based on standard mobile list/menu patterns. */
.settings-screen{background:#f4f3f0}.settings-menu{padding:10px 16px 30px}.settings-label{margin:18px 12px 8px;font-size:12px;color:var(--sub)}
.settings-group{background:#fff;border-radius:9px;overflow:hidden}.settings-group>button{display:flex;align-items:center;gap:8px;width:100%;min-height:52px;padding:12px 16px;border:0;background:transparent;color:var(--ink);text-align:left;font-size:15px;box-shadow:none;border-radius:0}
.settings-group>button+button{border-top:1px solid #eeece8}.settings-group>button>span{flex:1}.settings-group small{max-width:52%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--sub);font-size:12px}.settings-group em{font-size:20px;font-style:normal;color:#b9b4ae}
.settings-content{padding:16px}.settings-content .settings-section{padding:16px;border-radius:9px;box-shadow:none;border:0}.settings-section p{font-size:12px;line-height:1.7;color:var(--sub)}.settings-section select{font-size:15px;background:#fff}.settings-test{display:block;margin:14px auto 0;border:0;background:none;color:#8b663b;font-size:13px;box-shadow:none;padding:6px 10px}.provider-custom[hidden],.provider-fields[hidden],.asr-workspace[hidden]{display:none!important}
.chat-message .bubble[data-chat-index],.voice-transcript{user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.voice-transcript{align-self:flex-end;margin:2px 44px 4px 44px;max-width:78%;padding:10px 12px;background:#fff;border-radius:7px;line-height:1.6;color:#3d3935;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-menu-backdrop{position:fixed;inset:0;z-index:2000;background:transparent}.chat-context-menu{position:absolute;display:flex;max-width:calc(100vw - 24px);background:#343434;border-radius:7px;padding:3px;box-shadow:0 3px 14px #0002}.chat-context-menu button{min-height:44px;border:0;padding:10px 17px;color:#fff;background:none;font-size:14px;white-space:nowrap;border-radius:4px;box-shadow:none}.chat-context-menu button:active{background:#ffffff20}.chat-context-menu button:focus-visible{outline:1px solid #ddd}

/* Message actions own long press; nested text must not restore native selection. */
[data-chat-index],[data-chat-index] *{user-select:none!important;-webkit-user-select:none!important;-webkit-touch-callout:none!important}

/* Visible tabs share the available width; the chat tab cannot be hidden. */
.top-tabs{grid-template-columns:repeat(var(--tab-count,4),1fr)}
.module-fixed{display:flex;align-items:center;justify-content:space-between;min-height:52px;padding:12px 16px;color:var(--ink);font-size:15px}.module-fixed small{font-size:12px;color:var(--sub)}
.module-settings>button{border-top:1px solid #eeece8}.module-switch{position:relative;flex-shrink:0;width:42px;height:25px;border-radius:20px;background:#d9d8d5;transition:background .15s}.module-switch:after{content:"";position:absolute;left:3px;top:3px;width:19px;height:19px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:transform .15s}.module-settings [aria-checked=true] .module-switch{background:#a66e36}.module-settings [aria-checked=true] .module-switch:after{transform:translateX(17px)}.module-settings [role=switch]:focus-visible{outline:2px solid #a66e36;outline-offset:-3px}.module-note{margin:14px 4px;font-size:12px;line-height:1.7;color:var(--sub)}
@media(prefers-reduced-motion:reduce){.module-switch,.module-switch:after{transition:none}}

/* The draft and its image previews occupy one composer field. */
.chat-screen.photo-composing .chat-body{padding-bottom:145px}
.composer.text-mode.with-photos{align-items:flex-end;gap:6px}
.chat-compose-field{min-width:0;flex:1;border:1px solid #e4ded7;border-radius:12px;background:#fff;overflow:hidden}
.composer.text-mode .chat-compose-field textarea{display:block;width:100%;border:0;outline:none;border-radius:0;box-shadow:none}
.chat-compose-field:focus-within{border-color:#bd915f}
.chat-attachment-list{display:flex;gap:8px;overflow-x:auto;padding:8px 8px 3px}
.chat-attachment-list>div{flex:none;position:relative;width:57px;height:57px}
.chat-attachment-list img{display:block;width:100%;height:100%;object-fit:cover;border-radius:8px}
.chat-attachment-list button{position:absolute;top:0;right:0;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:#29241fd9;color:#fff}
.chat-draft-mic{display:grid;place-items:center;flex:none;width:41px;height:40px;padding:0;border:0;border-radius:9px;color:#504739;background:#fff;touch-action:none}
.chat-draft-mic.listening{color:#fff;background:#518c61}
.chat-message .bubble.has-images{min-width:0;padding:8px}
.chat-bubble-images{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:min(54vw,220px);gap:4px}
.chat-bubble-images.single{display:block;width:min(52vw,205px)}
.chat-photo-tile{display:block;width:100%;min-width:0;position:relative;z-index:1;border:0;border-radius:9px;overflow:hidden;padding:0;background:#eadbc8;color:#584638}
.chat-photo-tile .chat-photo{width:100%;aspect-ratio:1;object-fit:cover;display:block}
.chat-bubble-images.single .chat-photo{aspect-ratio:4 / 3;object-fit:contain}
.chat-bubble-text{padding:6px 2px 0;white-space:normal;overflow-wrap:anywhere}
.chat-photo-view{margin:0 0 12px;text-align:center}
.chat-photo-view .chat-photo{display:block;max-width:100%;max-height:72dvh;margin:auto;border-radius:10px}
.chat-photo-view figcaption{font-size:12px;color:var(--sub);margin-top:5px;overflow-wrap:anywhere}
.chat-photo-missing{display:none;padding:14px}
.photo-missing>.chat-photo{display:none}
.photo-missing>.chat-photo-missing{display:block}


/* ==========================================================================
   2026-12-04 Unified Warm UI Redesign Layer
   - Composer: Option A (Warm Unified Card + Preserved Hold-to-Talk)
   - Sent Multimodal Bubble: Option B (Clean Soft-Pill without Tail)
   - Global UI Polish: Warm Recording Veil, Denoised Cards, Top Toast,
     Dark Lightbox, SVG Chevrons, Cashbook Tabs & Memo Cards
   ========================================================================== */
:root{
  --radius-card:14px;
  --radius-ctrl:10px;
  --border-soft:#eae3da;
  --shadow-soft:0 2px 10px rgba(72,48,24,.045);
}

/* 1. Option A Unified Warm Composer + Preserved Hold-to-Talk Dock */
.chat-screen .chat-body,
.chat-screen.photo-composing .chat-body{
  padding-bottom:calc(var(--composer-h, 74px) + 18px);
}
.voice-dock{
  min-height:58px;
  padding:8px 12px calc(8px + env(safe-area-inset-bottom));
  gap:8px;
  background:rgba(244,241,237,.96);
  border-top:1px solid #e7e0d7;
}
.voice-main{
  min-height:42px;
  border:1px solid #dfd6cb;
  border-radius:12px;
  background:#fff;
  color:#2b231d;
  box-shadow:0 1px 4px rgba(68,46,24,.05);
}
.voice-mode-switch,.chat-photo-action{
  width:40px;height:42px;border-radius:11px;color:#473c32;
}
.voice-mode-switch:active,.chat-photo-action:active{background:rgba(166,110,54,.09)}

.composer.text-mode,
.composer.text-mode.with-photos{
  display:block;
  min-height:0;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom));
  background:rgba(244,241,237,.96);
  border-top:1px solid #e6dfd6;
  border-radius:0;
}
.composer.text-mode .chat-compose-field{
  display:flex;
  flex-direction:column;
  width:100%;
  border:1px solid #dfd4c7;
  border-radius:16px;
  background:#fff;
  box-shadow:0 2px 10px rgba(72,48,24,.055);
  overflow:visible;
  transition:border-color .15s;
}
.composer.text-mode .chat-compose-field:focus-within{border-color:#bc884f}

.chat-attachment-list{
  display:flex;
  align-items:center;
  gap:10px;
  overflow-x:auto;
  padding:11px 11px 4px;
}
.chat-attachment-list::-webkit-scrollbar{height:0}
.chat-attachment-list>div{
  flex:none;
  position:relative;
  width:52px;height:52px;
}
.chat-attachment-list img{
  display:block;width:100%;height:100%;
  object-fit:cover;
  border-radius:10px;
  border:1px solid rgba(40,28,18,.1);
  cursor:pointer;
}
.chat-attachment-list button{
  position:absolute;
  top:-6px;right:-6px;z-index:2;
  width:20px;height:20px;padding:0;
  border:2px solid #fff;border-radius:50%;
  background:#3a2f28;color:#fff;
  font-size:12px;line-height:1;
  display:grid;place-items:center;
  box-shadow:0 1px 4px rgba(0,0,0,.22);
}
.chat-attach-tile{
  flex:none;
  width:52px;height:52px;
  border-radius:10px;
  border:1.5px dashed #d3c4b3;
  background:#faf7f3;color:#9a7b5c;
  display:grid;place-items:center;
  cursor:pointer;
}
.chat-attach-tile .icon{width:20px;height:20px}

.composer.text-mode .chat-compose-field textarea{
  display:block;width:100%;
  min-height:28px;max-height:92px;
  padding:7px 12px 6px;
  border:0;outline:none;border-radius:0;background:transparent;
  font-size:15px;line-height:1.42;color:#26201c;
  resize:none;overflow-y:auto;box-shadow:none;
}
.composer.text-mode .chat-compose-field textarea::placeholder{color:#a89e94}

.chat-compose-toolbar{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:5px 8px 7px;
  border-top:1px solid #f4efe9;
}
.chat-toolbar-left,.chat-toolbar-right{
  display:flex;align-items:center;gap:6px;
}
.composer.text-mode .chat-tool-btn,
.composer.text-mode .voice-mode-switch.chat-tool-btn,
.composer.text-mode .chat-attach.chat-tool-btn,
.composer.text-mode .chat-draft-mic.chat-tool-btn{
  position:static;order:0;
  width:auto;height:31px;min-height:31px;
  padding:0 10px;border:0;border-radius:9px;
  background:#f6f1eb;color:#625140;
  font-size:12px;font-weight:600;line-height:1;
  display:inline-flex;align-items:center;justify-content:center;gap:4px;
  box-shadow:none;cursor:pointer;white-space:nowrap;
}
.composer.text-mode .chat-tool-btn .icon{width:15px;height:15px}
.composer.text-mode .chat-tool-btn:active{background:#ece2d5}
.composer.text-mode .chat-draft-mic.listening{background:#278350;color:#fff}

.composer.text-mode button[type=submit].chat-send-btn{
  order:0;flex:none;
  width:34px;height:31px;min-height:31px;padding:0;
  border:0;border-radius:9px;
  background:#d8cfc4;color:#fff;
  display:grid;place-items:center;
  transition:background .15s;
}
.composer.text-mode button[type=submit].chat-send-btn.is-ready,
.composer.text-mode.with-photos button[type=submit].chat-send-btn{
  background:#a66e36;
}
.composer.text-mode button[type=submit].chat-send-btn .icon{width:17px;height:17px}

/* 2. Option B Sent Bubbles & Multimodal Message Polish */
.chat-avatar{border-radius:50%;width:33px;height:33px;font-size:14px}
.chat-avatar.ai{background:linear-gradient(135deg,#bc8449,#99612c)}
.chat-avatar.mine{background:#e4ddd4;color:#685b4e}

.chat-message .bubble{
  border-radius:16px;
  padding:10px 13px;
  font-size:14.5px;
  line-height:1.5;
}
.chat-message .bubble:after{display:none}
.chat-message.assistant .bubble{
  border-top-left-radius:5px;
  background:#fff;
  box-shadow:0 1px 4px rgba(56,40,24,.055);
}
.chat-message.user .bubble{
  border-top-right-radius:5px;
  background:#eed8bc;
  color:#2a1f16;
}
.chat-message.user .bubble.voice-message{
  background:transparent;
  box-shadow:none;
}
.chat-message .voice-bubble,
.chat-message.user .bubble.voice-message .voice-bubble{
  border-radius:16px;
  border-top-right-radius:5px;
  background:#eed8bc;
  color:#342518;
}
.style-plain .chat-message.user .bubble,
.style-plain .chat-message.user .bubble.voice-message .voice-bubble{
  background:#a6e77f;
}
.style-plain .chat-message.user .bubble.voice-message{background:transparent}

.chat-message .bubble.has-images{
  padding:5px;
  border-radius:16px;
  border-top-right-radius:5px;
  white-space:normal;
}
.chat-bubble-images.single{
  width:100%;
  min-width:min(52vw,205px);
}
.chat-photo-tile.photo-missing .chat-photo-zoom{display:none}
.chat-photo-tile{
  border-radius:12px;
  background:#f4ece1;
}
.chat-photo-zoom{
  position:absolute;right:6px;bottom:6px;
  display:inline-flex;align-items:center;gap:3px;
  padding:2px 7px;border-radius:999px;
  background:rgba(28,22,18,.58);color:#fff;
  font-size:10px;font-weight:600;line-height:1.3;
  pointer-events:none;
}
.chat-photo-zoom .icon{width:11px;height:11px}
.chat-bubble-text{padding:7px 7px 3px}

/* Clean vector replacement for inline ✅ / ! status markers (preserves DOM text for tests) */
.chat-status{
  position:relative;
  display:inline-block;
  width:20px;height:20px;
  margin-right:6px;
  vertical-align:-4.5px;
  color:transparent!important;
  overflow:hidden;
  background-repeat:no-repeat;
  background-position:center;
  background-size:20px 20px;
}
.chat-status.success{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23d8f2e3'/%3E%3Cpath d='M7.2 12.4l3.1 3.1 6.5-6.8' fill='none' stroke='%231f7a46' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.chat-status.failure{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23fce5e0'/%3E%3Cpath d='M12 7v6.2' stroke='%23c84333' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.8' r='1.4' fill='%23c84333'/%3E%3C/svg%3E");
}
.chat-status.warning{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='11' fill='%23fcede0'/%3E%3Cpath d='M12 7v6.2' stroke='%23b57223' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.8' r='1.4' fill='%23b57223'/%3E%3C/svg%3E");
}

/* 3. Warm Hold-to-Talk Overlay (Replaces Neon WeChat Green) */
.record-overlay,.record-overlay.cancel{
  background:rgba(28,23,19,.80);
  backdrop-filter:blur(6px);
}
.record-green{
  width:204px;height:78px;border-radius:20px;
  background:linear-gradient(135deg,#c78e50,#a66e36);
  box-shadow:0 12px 30px rgba(40,24,10,.32);
}
.record-overlay.cancel .record-green{background:linear-gradient(135deg,#d96452,#bf4838)}
.record-overlay.as-text .record-green{background:linear-gradient(135deg,#489a6e,#2f7c54)}
.record-green .record-wave i{background:#fff;opacity:.92}
.record-overlay.cancel .record-wave i,
.record-overlay.as-text .record-wave i{background:#fff}
.record-actions{
  bottom:124px;
  padding:0 28px;
  gap:18px;
}
.record-actions span{
  height:56px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.14);
  font-size:14px;font-weight:600;
}
.record-overlay.cancel .record-cancel-zone{background:#c84e3d;border-color:transparent}
.record-overlay.as-text .record-text-zone{background:#34855a;border-color:transparent}
.record-send-zone{
  height:108px;
  background:#f2ede6;
  color:#2c241d;
  box-shadow:0 -8px 24px rgba(0,0,0,.18);
}
.record-send-zone .record-hint{color:#2c241d;font-size:15px;font-weight:650}

/* 4. Denoised AI Confirmation Cards */
.agent-card{
  padding:13px 14px;
  border:1px solid #e9e0d5;
  border-radius:14px;
  background:#fff;
  box-shadow:0 2px 10px rgba(68,46,24,.05);
}
.agent-card.agent-question{
  background:#fffaf1;
  border-color:#e2c395;
  box-shadow:0 2px 10px rgba(166,110,54,.08);
}
.agent-actions{gap:8px;margin-top:11px}
.agent-actions button{
  min-height:38px;
  border-radius:10px;
  font-size:13px;font-weight:650;
}
.agent-actions .primary{border-radius:10px}
.agent-actions .secondary{
  border:1px solid #dfd4c7;
  border-radius:10px;
  background:#faf7f2;
  color:#5c4b3b;
}

/* 5. Top Floating Toast (Never Covers Latest Chat Reply or Keyboard) */
.toast{
  top:58px;
  bottom:auto;
  padding:9px 16px;
  border-radius:999px;
  background:rgba(44,34,27,.92);
  backdrop-filter:blur(8px);
  font-size:12.5px;
  font-weight:600;
  box-shadow:0 6px 20px rgba(32,20,10,.22);
}

/* 6. Immersive Dark Photo Lightbox */
.modal-wrap.photo-lightbox{
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(16,13,11,.90);
  backdrop-filter:blur(6px);
}
.modal-wrap.photo-lightbox .lightbox-sheet{
  max-width:520px;
  max-height:90dvh;
  padding:14px;
  border-radius:18px;
  background:#1f1b18;
  color:#f5f0ea;
  box-shadow:0 20px 50px rgba(0,0,0,.45);
}
.modal-wrap.photo-lightbox .modal-head{margin-bottom:10px}
.modal-wrap.photo-lightbox .modal-head h2{font-size:15px;font-weight:650;color:#f5f0ea}
.modal-wrap.photo-lightbox .modal-head button{
  background:rgba(255,255,255,.14);
  color:#fff;
  border-radius:50%;
}
.modal-wrap.photo-lightbox .chat-photo-view{margin:0}
.modal-wrap.photo-lightbox .chat-photo-view .chat-photo{
  max-height:76dvh;
  border-radius:12px;
}
.modal-wrap.photo-lightbox .chat-photo-view figcaption{
  margin-top:8px;
  color:#b9afa5;
}

/* 7. Centered SVG Chevrons & Cleaner Loan Audit Footnote */
.row-chevron{
  display:inline-grid;
  place-items:center;
  width:20px;height:20px;
  color:#9c9288;
}
.row-chevron .icon{width:17px;height:17px}
.settings-group em{
  display:inline-grid;
  place-items:center;
  width:18px;height:18px;
  color:#b2a9a0;
}
.settings-group em .icon{width:16px;height:16px}
.loan-reconcile:not(.is-warning){
  padding:6px 0 4px;
  font-size:10.5px;
  color:#9d9389;
  line-height:1.45;
}

/* 8. Cashbook Tappable Summary Tabs & Spacious Donut Center */
.cash-summary{
  padding:10px 6px 12px;
  border-radius:16px;
}
.cash-summary>div{
  padding:6px 6px 8px;
  border-radius:11px;
}
.cash-summary-cell.active{
  background:#faf3ea;
}
.cash-summary-cell[data-id="income"].active{
  background:#edf7f1;
}
.cash-summary>div:nth-child(2),.cash-summary>div:nth-child(3){
  border-left:0;
}
.cash-summary .cash-indicator-bar{
  bottom:6px;width:28px;height:3px;border-radius:99px;
}
.ring-center{
  width:78px;height:78px;padding:0 4px;
}
.ring-center strong{
  font-size:clamp(10.5px,3.1vw,13px);
  max-width:72px;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* 9. Memo Cards & Toolbar Polish */
.memo-toolbar{gap:8px}
.memo-toolbar input{
  height:42px;padding:0 12px;
  border:1px solid var(--border-soft);
  border-radius:var(--radius-ctrl);
}
.memo-toolbar button.primary{
  height:42px;min-height:42px;
  padding:0 14px;
  border-radius:var(--radius-ctrl);
}
.memo-filters{gap:6px;margin:12px 0 10px}
.memo-filters button{border-radius:9px;padding:7px 11px}
.memo-row{
  margin-bottom:9px;
  padding:14px 15px;
  border:1px solid var(--border-soft);
  border-radius:var(--radius-card);
  background:#fff;
  box-shadow:var(--shadow-soft);
}
.memo-row-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
}
.memo-pin-tag{
  flex:none;
  padding:2px 7px;border-radius:999px;
  background:#f6ebe0;color:#99612c;
  font-size:10.5px;font-weight:650;
}
.memo-modal{max-height:92dvh}

/* 10. Unified Card & Settings Polish */
.surface,.platform-group,.settings-group,.settings-content .settings-section{
  border-radius:var(--radius-card);
}
.settings-group{
  border:1px solid var(--border-soft);
  box-shadow:var(--shadow-soft);
}
.settings-content .settings-section{
  border:1px solid var(--border-soft);
  box-shadow:var(--shadow-soft);
}


/* ==========================================================================
   Group B UI Styles:
   - Cloud Backup Option B (Hero Status + Borderless Hierarchy)
   - Custom Warm Confirmation Sheet
   - Clickable Loan Period Rows & Auto Chat Time Dividers
   ========================================================================== */

/* Auto 5-minute chat time divider */
.chat-time-divider{
  align-self:center;
  margin:4px 0 2px;
  padding:2px 10px;
  border-radius:999px;
  color:#988e84;
  font-size:11px;
  line-height:1.4;
  font-variant-numeric:tabular-nums;
}

/* Clickable per-period bill rows inside Loan Detail */
button.loan-period{
  width:100%;
  border:0;
  border-bottom:1px solid #f5f0ea;
  background:transparent;
  color:inherit;
  text-align:left;
  cursor:pointer;
}
button.loan-period:active{background:#faf5ee;border-radius:8px}

/* Custom Warm Confirmation Sheet */
.confirm-sheet .confirm-message{
  margin:4px 0 18px;
  color:#4c4239;
  font-size:14px;
  line-height:1.6;
}
.confirm-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.confirm-actions button{
  margin-top:0!important;
  min-height:44px;
  border-radius:12px;
  font-size:14px;
  font-weight:650;
}
.confirm-actions .danger-confirm{
  background:#c84333;
  color:#fff;
}

/* Cloud Backup Option B (Matches Approved Preview) */
.cloud-screen{background:#f7f5f2}
.cloud-screen .settings-header{
  background:#f7f5f2;
  border-bottom:0;
}
.cloud-body{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:10px 16px 32px;
}
.cloud-hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:12px 8px 6px;
}
.cloud-hero-badge{
  width:56px;height:56px;
  border-radius:18px;
  display:grid;place-items:center;
  margin-bottom:11px;
  background:#eae5de;color:#6c635b;
}
.cloud-hero-badge .icon{width:28px;height:28px}
.cloud-hero-badge .icon.spin svg{animation:spin 1s linear infinite}
.cloud-hero-badge.syncing{background:#f7e8d4;color:#a66e36}
.cloud-hero-badge.success{background:#dff3e7;color:#237f4b}
.cloud-hero-badge.error{background:#fce2dc;color:#c84333}
.cloud-hero-badge.offline{background:#eae6e0;color:#6b645d}
.cloud-hero-title{font-size:18px;font-weight:750;color:#241e1a}
.cloud-hero-title.success{color:#1f6f42}
.cloud-hero-title.error{color:#bf3b2b}
.cloud-hero-sub{
  margin-top:5px;
  font-size:13px;
  color:#786f66;
  line-height:1.5;
  max-width:300px;
}
.cloud-progress{
  width:180px;height:4px;
  border-radius:999px;
  margin-top:11px;
  background:rgba(166,110,54,.18);
  overflow:hidden;
}
.cloud-progress-bar{
  height:100%;width:48%;
  border-radius:999px;
  background:#a66e36;
  animation:cloudSlide 1.5s infinite ease-in-out;
}
@keyframes cloudSlide{
  0%{transform:translateX(-80%)}
  50%{transform:translateX(120%)}
  100%{transform:translateX(-80%)}
}
.cloud-retry-btn{
  margin-top:11px;
  padding:8px 20px;
  border:0;border-radius:999px;
  background:#c84333;color:#fff;
  font-size:13px;font-weight:700;
}
.cloud-time-chip{
  margin-top:10px;
  padding:5px 12px;
  border-radius:999px;
  background:rgba(40,30,20,.055);
  color:#5d534a;
  font-size:12px;
  font-variant-numeric:tabular-nums;
}

.cloud-toggle-card{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:15px 16px;
  border-radius:18px;
  background:#fff;
  box-shadow:0 2px 10px rgba(45,32,20,.045);
}
.cloud-toggle-card b{display:block;font-size:16px;font-weight:720;color:#241e1a}
.cloud-toggle-card small{display:block;margin-top:3px;font-size:12px;color:#82786e}
.cloud-switch{
  position:relative;flex:none;
  width:50px;height:29px;padding:0;
  border:0;border-radius:999px;
  background:#d6cfc7;
  transition:background .2s;
}
.cloud-switch:after{
  content:"";position:absolute;left:3px;top:3px;
  width:23px;height:23px;border-radius:50%;
  background:#fff;
  box-shadow:0 1px 4px rgba(0,0,0,.18);
  transition:transform .2s;
}
.cloud-switch[aria-checked="true"]{background:#28844e}
.cloud-switch[aria-checked="true"]:after{transform:translateX(21px)}

.cloud-recovery-card{
  padding:14px 15px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(166,110,54,.24);
  box-shadow:0 2px 10px rgba(72,48,24,.05);
}
.cloud-recovery-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cloud-recovery-head b{font-size:13px;color:#8a5520}
.cloud-recovery-head small{font-size:11px;color:#8e8377}
.cloud-recovery-code{
  margin:9px 0;
  padding:10px 12px;
  border-radius:10px;
  background:#f5f2ed;
  color:#26201c;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:15px;font-weight:750;
  letter-spacing:.06em;text-align:center;
  user-select:all;-webkit-user-select:all;
}
.cloud-recovery-card p{
  margin:0 0 10px;
  font-size:12px;color:#7a6f64;line-height:1.5;
}
.cloud-recovery-actions{display:flex;gap:8px}
.cloud-recovery-actions button{
  flex:1;height:35px;border:0;border-radius:9px;
  font-size:12.5px;font-weight:650;
}
.cloud-copy-btn{background:#2d251f;color:#fff}
.cloud-ack-btn{background:#f1ede7;color:#5a5047}

.cloud-plain-list{
  display:flex;flex-direction:column;gap:4px;
}
.cloud-plain-row{
  width:100%;padding:13px 12px;
  border:0;border-radius:14px;
  background:transparent;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  text-align:left;
}
.cloud-plain-row:active{background:rgba(255,255,255,.75)}
.cloud-row-left{display:flex;align-items:center;gap:12px;min-width:0}
.cloud-row-ico{
  flex:none;width:34px;height:34px;
  border-radius:10px;
  background:#fff;color:#5a5046;
  display:grid;place-items:center;
  box-shadow:0 1px 4px rgba(40,30,20,.055);
}
.cloud-row-ico .icon{width:17px;height:17px}
.cloud-plain-row b{display:block;font-size:14.5px;font-weight:650;color:#26201c}
.cloud-plain-row small{display:block;margin-top:2px;font-size:12px;color:#867c72}

.cloud-more-drawer{
  margin-top:2px;
  padding:13px 14px;
  border-radius:14px;
  background:#fff;
  box-shadow:0 1px 6px rgba(40,30,20,.04);
  display:flex;flex-direction:column;gap:10px;
}
.cloud-kv{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  font-size:12.5px;
}
.cloud-kv span{color:#82786e;flex:none}
.cloud-kv code{
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:11.5px;color:#3d332a;
  background:#f3eee8;padding:3px 7px;border-radius:6px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.cloud-more-actions{display:flex;gap:8px}
.cloud-more-actions button{
  flex:1;height:36px;
  border:1px solid #e4dad0;border-radius:10px;
  background:#fff;color:#4f4135;
  font-size:12.5px;font-weight:650;
}
.cloud-foot{
  margin:14px 0 0;
  text-align:center;
  font-size:11.5px;color:#9d9389;
}

/* Cloud Backup Snapshots Restore List */
.cloud-snap-list{
  display:flex;flex-direction:column;gap:8px;
}
.cloud-snap-row{
  width:100%;padding:13px 14px;
  border:1px solid #ebe4dc;border-radius:12px;
  background:#fff;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  text-align:left;
}
.cloud-snap-row b{display:block;font-size:14px;color:#26201c;font-variant-numeric:tabular-nums}
.cloud-snap-row small{display:block;margin-top:3px;font-size:12px;color:#82786e}


/* Suppress native long-press selection/copy on voice & composer toolbar controls */
[data-voice],[data-voice] *,
.chat-tool-btn,.chat-tool-btn *,
.chat-draft-mic,.chat-draft-mic *{
  -webkit-user-select:none!important;
  user-select:none!important;
  -webkit-touch-callout:none!important;
  -webkit-tap-highlight-color:transparent!important;
}
[data-voice],.chat-draft-mic{touch-action:none!important}

/* Masked Recovery Code Row + Show/Hide Toggle */
.cloud-recovery-code-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin:9px 0;
}
.cloud-recovery-code-row .cloud-recovery-code{
  flex:1;
  min-width:0;
  margin:0;
  font-size:14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.cloud-eye-btn{
  flex:none;
  height:38px;
  padding:0 12px;
  border:1px solid #e2d8cc;
  border-radius:10px;
  background:#fff;
  color:#5b4b3d;
  font-size:12.5px;
  font-weight:650;
}
.cloud-eye-btn:active{background:#f3ece4}


/* ==========================================================================
   Loan Page Option A (Approved Warm Structured Cards)
   - Twin Hero Card (Total Debt + Selected Month Due + Overall Progress)
   - Inline Month Switcher inside Monthly Due Heading
   - Unified Monthly Calendar Card with Date Boxes & Restrained Urgency Colors
   - Global Account Cards with Repayment Progress Bars
   ========================================================================== */
.debt-summary{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:17px 16px 15px;
  border:1px solid #ece1d3;
  border-radius:16px;
  background:linear-gradient(135deg,#fffefa 0%,#fff5e8 100%);
  box-shadow:0 3px 14px rgba(82,54,24,.055);
}
.debt-summary-twin{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
}
.debt-summary-twin > div + div{
  padding-left:15px;
  border-left:1px solid #ede2d4;
}
.debt-summary-twin small,
.debt-summary-twin span{display:block;color:#7e7368;font-size:11.5px}
.debt-summary-twin strong{
  display:block;
  margin:7px 0 5px;
  color:#2c1f16;
  font-size:clamp(22px,6.4vw,28px);
  font-weight:780;
  font-variant-numeric:tabular-nums;
  letter-spacing:-.035em;
  white-space:nowrap;
}
.debt-summary-twin strong.month-due-num{color:#a25d24}

.debt-summary > .debt-overall-prog{
  padding-left:0;
  border-left:0;
  padding-top:11px;
  border-top:1px solid #efe5d8;
}
.debt-overall-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:6px;
  font-size:11px;
  color:#7e7368;
}
.debt-overall-meta b{color:#5c4128;font-weight:650;font-variant-numeric:tabular-nums}
.loan-prog-track{
  display:block;
  width:100%;
  height:5px;
  border-radius:99px;
  background:#efe7dd;
  overflow:hidden;
}
.loan-prog-track > i{
  display:block;
  height:100%;
  border-radius:99px;
  background:linear-gradient(90deg,#c79153,#a66e36);
}

/* Inline Month Switcher inside Monthly Due Heading */
.month-bills-heading{
  margin:20px 1px 11px;
  align-items:center;
}
.month-heading-left{
  display:inline-flex;
  align-items:baseline;
  gap:7px;
}
.month-inline{
  display:inline-flex;
  align-items:center;
  gap:2px;
  margin:0;
  padding:3px 6px;
  border:1px solid #e6ddd2;
  border-radius:999px;
  background:#fff;
  box-shadow:0 1px 5px rgba(72,48,24,.05);
}
.month-inline button{
  width:24px;height:24px;padding:0;
  border:0;border-radius:50%;
  background:transparent;color:#5e5247;
  font-size:17px;line-height:1;
  display:grid;place-items:center;
}
.month-inline span{
  min-width:74px;
  text-align:center;
  font-size:12.5px;
  font-weight:700;
  color:#2c241d;
}

/* Unified Monthly Calendar Card (Distinct from Loan Accounts below) */
.month-card-a{
  overflow:hidden;
  border:1px solid #ebe3d9;
  border-radius:15px;
  background:#fff;
  box-shadow:0 2px 10px rgba(72,48,24,.04);
}
.month-card-a .month-group{
  margin:0;
  padding:0 13px;
  border:0;
  border-radius:0;
  box-shadow:none;
  background:transparent;
}
.month-card-a .month-group + .month-group{
  border-top:1px solid #f2ebe3;
}
.due-date-box{
  flex:none;
  width:42px;height:42px;
  border-radius:11px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:#f4efe9;color:#4a4037;
}
.due-date-box.overdue,.due-date-box.urgent{background:#fdece8;color:#c23c2b}
.due-date-box.soon{background:#fdf2e1;color:#b06d1d}
.due-date-box b{font-size:16px;font-weight:780;line-height:1.05;font-variant-numeric:tabular-nums}
.due-date-box small{font-size:9.5px;margin-top:1px;font-weight:600}

/* Restrained Urgency Colors (Stop All-Red Anxiety) */
.debt-screen .loan-head-balance b{color:#2c221a}
.debt-screen .month-group .loan-head-balance b.amt-urgent,
.debt-screen .month-group .loan-head-balance b.amt-overdue{color:#c23c2b}
.debt-screen .month-group .loan-head-balance b.amt-soon{color:#a86618}
.debt-screen .month-group .loan-head-balance b.amt-normal{color:#2c221a}
.debt-screen .month-group .due-pill{
  display:inline-block;
  margin-top:3px;
  padding:1px 6px;
  border-radius:5px;
  font-size:10px;
  font-weight:650;
}
.debt-screen .month-group .due-pill.urgent,
.debt-screen .month-group .due-pill.overdue{background:#fde8e3;color:#c23c2b!important}
.debt-screen .month-group .due-pill.soon{background:#fdf1dc;color:#a86618!important}
.debt-screen .month-group .due-pill.normal{background:#f2eee8;color:#7a7066!important}

/* Repayment Progress Row inside Global Account Cards */
.loan-prog-row{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  margin-top:2px;
}
.loan-prog-row .loan-prog-track{flex:1;height:5px}
.loan-prog-row small{
  flex:none;
  font-size:11px;
  color:#7e7368;
  font-variant-numeric:tabular-nums;
}


/* Compact Due Reminder Banner matching Option A Mockup */
.due-reminder{
  margin:12px 0 4px;
  border:1px solid #f5d2c8;
  border-radius:14px;
  background:#fdf0ec;
  color:#b83d2c;
  box-shadow:none;
}
.due-reminder-heading{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 13px;
}
.due-reminder .due-icon{
  width:26px;height:26px;
  background:#d64c38;
  color:#fff;
  font-size:15px;font-weight:800;
}
.due-reminder-title b{font-size:13.5px;font-weight:720;color:#b83d2c}
.due-reminder-title small{margin-top:2px;font-size:11.5px;color:#a8685c}
.due-reminder-heading > strong{
  font-size:15px;font-weight:750;color:#b83d2c;
}
.due-reminder .due-platforms{
  padding:0 13px 10px 49px;
  border-top:1px solid rgba(214,76,56,.10);
  margin-top:0;
  padding-top:6px;
}
.due-reminder .due-platforms > li{
  min-height:24px;
  font-size:12.5px;
  color:#9c4a3c;
}


/* Subtle visual de-emphasis for settled (paid-off) loans & periods sorted to the bottom */
.platform-group.is-settled,
.loan-detail.is-settled{
  opacity:.74;
}
.platform-group.is-settled .loan-prog-track > i{
  background:#28844e;
}
.platform-group.is-settled .loan-head-balance small,
.loan-detail.is-settled .loan-head-balance small{
  color:#25804d;
  font-weight:650;
}
.loan-period.is-paid{
  opacity:.72;
}


/* Soft styling for repayment rows excluded from daily expense totals */
.expense-row.is-repayment-excluded{opacity:.72}
.expense-category.repay-muted{background:#c5bbb0;color:#fff}
.repay-excl-tag{
  display:inline-block;
  margin-left:6px;
  padding:1px 6px;
  border-radius:5px;
  background:#f1ece5;
  color:#857a6f;
  font-size:10px;
  font-weight:600;
  vertical-align:1px;
}
.expense-row strong.excluded-amt{color:#8c8277;font-weight:600}
