/* Unified safe sizing prevents date controls from expanding their grid tracks. */
body.ui-filter-is-open { overflow:hidden; overscroll-behavior:contain; }
.ui-polished { --ink:#261f19; --muted:#726e68; --surface-soft:#f6f5f3; }
.ui-polished .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; }
.ui-polished .form-grid > *, .ui-polished .form-field, .ui-polished label, .ui-polished .section-head > div, .ui-polished .planning-inline-label { min-width:0; }
.ui-polished input:not([type=checkbox]):not([type=radio]):not([type=file]), .ui-polished select, .ui-polished textarea { max-width:100%; box-sizing:border-box; }
.ui-polished .form-field input, .ui-polished .form-field select, .ui-polished .form-field textarea { display:block; width:100%; min-width:0; }
.ui-polished input[type=date], .ui-polished input[type=month], .ui-polished input[type=datetime-local] { min-width:0; width:100%; max-width:100%; min-inline-size:0; appearance:none; -webkit-appearance:none; overflow:hidden; text-align:left; }
.ui-polished input[type=date]::-webkit-date-and-time-value, .ui-polished input[type=month]::-webkit-date-and-time-value { min-width:0; text-align:left; }
.ui-polished input[type=date]::-webkit-datetime-edit, .ui-polished input[type=month]::-webkit-datetime-edit { min-width:0; padding:0; }
.ui-polished input[type=date]::-webkit-calendar-picker-indicator, .ui-polished input[type=month]::-webkit-calendar-picker-indicator { flex:0 0 18px; margin-left:4px; }
.ui-polished .form-field { line-height:1.5; }
.ui-polished .section-head h2 { letter-spacing:-.35px; }
.ui-polished .section-head .muted { max-width:650px; }
.ui-polished .modal { border:1px solid #eeedea; }
.ui-polished .modal-subtitle { max-width:100%; }
.ui-polished .modal-toolbar { gap:12px; }
.ui-polished .modal-action { min-width:0; }
.ui-polished .modal-action button { max-width:100%; white-space:normal; }
.ui-polished .feature-list-row > div, .ui-polished .planning-txn > span { min-width:0; }
.ui-polished .feature-actions, .ui-polished .section-actions { flex-wrap:wrap; }
.ui-polished .feature-card, .ui-polished .planning-panel, .ui-polished .table-panel { border:1px solid #efeeeb; }
.ui-polished .metric-card { background:#f5f3f0; }
.ui-polished .metric-card.accent { background:#fdf6e6; border-color:rgba(200,164,92,.5); }
.ui-polished .metric-label { font-weight:650; }
.ui-polished .metric-foot, .ui-polished .data-sub { color:#7d7973; }
.ui-polished .management-account { border:1px solid #edeae6; }
.ui-polished .ui-bank-symbol { font-size:19px; font-weight:800; background:#cb4d58; color:#a83b45; }
.ui-polished .ui-bank-symbol[data-bank=ccb] { color:#c3ac79; background:#c3ac79; }
.ui-polished .ui-bank-symbol[data-bank=abc],.ui-polished .ui-bank-symbol[data-bank=psbc] { color:#5d4c3e; background:#f5f2ec; }
.ui-polished .ui-bank-symbol[data-bank=alipay] { color:#c3ac79; background:#c3ac79; }
.ui-polished .ui-bank-symbol[data-bank=wechat] { color:#635142; background:#f6f3ee; }
.ui-account-tail { white-space:nowrap; }
.ui-transaction-toolbar { display:flex; justify-content:space-between; gap:12px; align-items:center; margin:14px 0; }
.ui-month-field { display:flex; align-items:center; gap:10px; font-size:12px; color:#726f69; font-weight:650; min-width:0; }
.ui-month-field > span { flex:0 0 auto; white-space:nowrap; }
.ui-month-field input { max-width:175px; min-height:44px; padding:9px 12px; border:1px solid #ebe9e5; border-radius:14px; background:#ffffff; font-size:14px; color:#392f26; }
.ui-filter-button { display:flex; align-items:center; justify-content:center; gap:7px; min-width:92px; padding:9px 14px; }
.ui-filter-button svg { width:18px; height:18px; }
#advancedTransactionFilters:not(.ui-filter-open) { display:none; }
.ui-filter-anchor { display:none; }
.ui-filter-dialog { width:min(560px,calc(100% - 32px)); max-height:calc(100dvh - 48px); border:0; padding:26px; border-radius:27px; color:var(--ink); background:#ffffff; box-shadow:0 20px 90px #183d2b33; overflow:auto; overscroll-behavior:contain; }
.ui-filter-dialog::backdrop { background:#142b254f; backdrop-filter:blur(5px); }
.ui-sheet-handle { display:none; }
.ui-sheet-title { display:flex; gap:18px; align-items:flex-start; justify-content:space-between; }
.ui-sheet-title h2 { margin:0; font-size:22px; }
.ui-sheet-title p { color:var(--muted); font-size:12px; margin:7px 0 0; }
.ui-sheet-title .icon-button { flex:0 0 40px; width:40px; height:40px; min-height:40px; font-size:24px; }
.ui-filter-dialog .feature-filter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:25px 0; }
.ui-sheet-actions { display:flex; justify-content:flex-end; border-top:1px solid #eeece9; padding-top:18px; }
.ui-sheet-actions button { min-width:140px; }
.ui-home-budget { width:100%; margin-top:13px; }
.ui-home-budget small { display:block; color:#7a766f; font-size:11px; line-height:1.5; }
.ui-home-progress { width:100%; height:6px; border-radius:10px; background:#e8e6e3; overflow:hidden; margin-bottom:9px; }
.ui-home-progress > span { display:block; height:100%; border-radius:inherit; background:#a29373; }
.ui-onboarding { display:flex; justify-content:space-between; align-items:center; gap:16px; border:1px solid #ede9e3; border-radius:19px; background:#f6f4f0; padding:16px 18px; margin:0 0 16px; }
.ui-onboarding[hidden] { display:none; }
.ui-onboarding strong { display:block; font-size:14px; }
.ui-onboarding p { font-size:12px; line-height:1.5; margin:5px 0 0; color:#79756f; }
.ui-onboarding button { flex-shrink:0; font-size:12px; min-height:38px; padding:7px 12px; }
.ui-expand-trend { display:none; }
.ui-trend-empty-note { color:#817d76; font-size:12px; line-height:1.6; text-align:center; margin:9px 0; }
.ui-trend-empty-note[hidden] { display:none; }
.ui-polished .sidebar .nav-item[hidden], .ui-secondary-navigation { display:none!important; }
.ui-polished.ui-local-entry #quickAction { display:none; }
.ui-polished .ui-settings-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1px; background:#edebe8; border:1px solid #edebe8; border-radius:22px; overflow:hidden; margin:0 0 23px; }
.ui-tool-link { display:flex; align-items:center; gap:13px; text-align:left; border:0; background:#ffffff; color:var(--ink); padding:19px 20px; min-width:0; }
.ui-tool-link:hover { background:#f8f7f4; }
.ui-tool-link > span:nth-child(2) { flex:1; min-width:0; }
.ui-tool-link strong,.ui-tool-link small { display:block; }
.ui-tool-link strong { font-size:14px; font-weight:650; }
.ui-tool-link small { color:#7f7b75; font-size:11px; line-height:1.6; margin-top:4px; }
.ui-tool-icon { display:flex; align-items:center; justify-content:center; flex:0 0 37px; width:37px; height:37px; color:#807458; background:#f6f3ef; border-radius:12px; }
.ui-tool-icon svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.ui-tool-arrow { color:#9d9a94; font-size:21px; }
.ui-context-links { display:flex; flex-wrap:wrap; align-items:center; gap:18px; padding:0 0 18px; }
.ui-context-links .text-button { font-size:12px; color:#797468; min-height:35px; }
.ui-analysis-tabs { display:flex; width:max-content; max-width:100%; margin:0 0 20px; }
.ui-overflow-actions { position:relative; margin-left:auto; }
.ui-overflow-actions summary { list-style:none; cursor:pointer; font-size:12px; color:#7a766f; padding:10px 12px; border-radius:12px; }
.ui-overflow-actions summary::-webkit-details-marker { display:none; }
.ui-overflow-actions[open] summary,.ui-overflow-actions summary:hover { background:#f2efeb; color:#59493c; }
.ui-overflow-menu { position:absolute; right:0; bottom:calc(100% + 5px); z-index:3; min-width:142px; display:grid; padding:7px; background:#ffffff; border:1px solid #e8e6e3; border-radius:15px; box-shadow:0 8px 30px #20382c20; }
.ui-overflow-menu button { text-align:left; min-height:40px; width:100%; border:0; background:transparent; margin:0; border-radius:9px; padding:9px 12px; white-space:nowrap; }
.ui-overflow-menu button:hover { background:#f6f5f2; }
.ui-polished .ui-tool-link:focus-visible,.ui-context-links button:focus-visible,.ui-overflow-actions summary:focus-visible { outline:2px solid #8a7a58; outline-offset:3px; }
@media(max-width:1000px) { .ui-polished .section-head { flex-wrap:wrap; } }
@media(max-width:700px) {
  .ui-polished .main-content { padding-inline:18px; padding-bottom:calc(202px + env(safe-area-inset-bottom)); }
  .ui-polished .topbar { margin-bottom:15px; }
  .ui-polished .topbar h1 { font-size:26px; }
  .ui-polished .topbar-actions { gap:9px; }
  .ui-polished .topbar-actions .icon-button { width:41px; height:41px; min-height:41px; }
  .ui-polished .experience-home-toolbar { margin:-4px 0 0; }
  .ui-polished .experience-home-toolbar button { padding:4px 0; font-size:11px; }
  .ui-polished .experience-home-layout { gap:16px; }
  .ui-polished .experience-home-card > .net-worth-panel { padding:6px 0 0; min-height:0; }
  .ui-polished .net-worth-main { gap:11px; margin-top:9px; }
  .ui-polished .net-worth-value { font-size:clamp(36px,10.8vw,48px); }
  .ui-polished .net-worth-panel > .section-kicker { font-size:17px; }
  .ui-polished .snapshot-button { min-height:32px; font-size:11px; padding:6px 12px; }
  .ui-polished .experience-trend-wrap { height:152px; min-height:0; margin-top:17px; grid-template-rows:auto minmax(64px,1fr) auto; }
  .ui-polished .experience-trend-wrap canvas { min-height:64px; }
  .ui-polished .experience-chart-help { display:none; }
  .ui-polished .experience-trend-value { font-size:11px; margin-top:3px; }
  .ui-polished .experience-trend-controls { gap:6px; flex-wrap:wrap; font-size:11px; }
  .ui-polished .experience-period-switch { margin-left:auto; }
  .ui-polished .experience-period-switch button { min-width:29px; min-height:27px; padding:3px 7px; font-size:11px; }
  .ui-expand-trend { display:block; padding:3px 0 3px 5px; font-size:10px; font-weight:600; color:#7a766f; }
  .ui-polished .experience-trend-wrap.ui-trend-empty { display:block!important; height:auto; min-height:0; margin-top:14px; padding:12px; border:1px dashed #e8e6e2; border-radius:15px; }
  .ui-polished .ui-trend-empty canvas, .ui-polished .ui-trend-empty .experience-trend-controls, .ui-polished .ui-trend-empty .experience-trend-value, .ui-polished .ui-trend-empty .experience-chart-help { display:none; }
  .ui-polished .experience-trend-wrap.ui-trend-expanded { height:240px; }
  .ui-polished .experience-trend-wrap.ui-trend-expanded canvas { min-height:145px; }
  .ui-polished .experience-home-card > .overview-shortcuts { margin:0; }
  .ui-polished .shortcut-icon { width:48px; height:48px; }
  .ui-polished .shortcut-button { font-size:12px; gap:7px; }
  .ui-polished .shortcut-icon svg { width:24px; height:24px; }
  .ui-polished .change-comparison { min-height:204px; }
  .ui-polished .comparison-block { padding:14px 0; gap:6px; }
  .ui-polished .insight-panel .section-kicker { font-size:12px; }
  .ui-polished .insight-panel strong { font-size:23px; }
  .ui-polished .side-insights { gap:10px; }
  .ui-polished .insight-panel { padding-inline:13px; }
  .ui-polished .change-comparison { padding-inline:11px; }
  .ui-polished .overview-plan-balances { max-height:75px; margin-top:6px; }
  .ui-polished .overview-plan-balances button { padding:3px 0; min-height:27px; font-size:10px; }
  .ui-polished .section-head { margin:21px 0 13px; gap:10px; }
  .ui-polished .section-head h2 { font-size:20px; }
  .ui-polished .section-head .muted { font-size:12px; line-height:1.6; }
  .ui-polished .metric-card { padding:16px 14px; min-height:108px; }
  .ui-polished .metric-card strong { font-size:22px; }
  .ui-polished .form-grid { gap:15px 12px; }
  .ui-polished .form-field { font-size:13px; }
  .ui-polished .form-field input,.ui-polished .form-field select,.ui-polished .form-field textarea { min-height:49px; font-size:16px; padding:11px 12px; border-radius:13px; }
  .ui-polished .tx-amount-field input { font-size:30px; min-height:65px; }
  .ui-polished .modal-subtitle { font-size:12px; margin-bottom:20px; }
  .ui-polished #modalContent { padding:22px 18px calc(26px + env(safe-area-inset-bottom)); }
  .ui-polished .modal-toolbar { min-height:68px; padding:11px 15px; }
  .ui-polished .funds-tabs { margin:3px 0 17px; }
  .ui-polished #fundsTransactionsPane > .section-head { margin:16px 0 18px; }
  .ui-polished #fundsTransactionsPane > .section-head p { display:none; }
  .ui-polished #fundsTransactionsPane .filter-row { gap:11px; margin-bottom:10px; }
  .ui-polished #fundsTransactionsPane .search-box { min-height:44px; }
  .ui-polished .ui-transaction-toolbar { margin:11px 0; }
  .ui-polished .ui-month-field { flex:1; max-width:220px; }
  .ui-polished .ui-month-field input { width:100%; max-width:160px; font-size:15px; padding:9px; }
  .ui-polished .feature-summary-strip { margin:12px 0 18px; gap:9px 17px; padding:14px 16px; line-height:1.5; }
  .ui-polished .feature-summary-strip > span:first-child { flex-basis:100%; color:#78746d; font-size:11px; }
  .ui-polished .mobile-fab { left:auto; right:20px; bottom:calc(104px + env(safe-area-inset-bottom)); transform:none; padding:0 16px; min-height:43px; font-size:12px; box-shadow:0 6px 18px #24845a22; }
  .ui-polished .mobile-fab:active { transform:scale(.96); }
  body.ui-polished.ui-local-entry .mobile-fab, body.ui-polished[data-page="plans"] .mobile-fab, body.ui-polished[data-page="investments"] .mobile-fab, body.ui-polished[data-page="holdings"] .mobile-fab, body.ui-polished[data-page="holdingTargets"] .mobile-fab, body.ui-polished[data-page="allocation"] .mobile-fab, body.ui-polished[data-page="accountCenter"] .mobile-fab { display:none; }
  body.ui-polished[data-page="overview"]:not(.ui-local-entry) .mobile-fab { display:flex; }
  body.ui-polished.ui-local-entry .main-content, body.ui-polished[data-page="investments"] .main-content, body.ui-polished[data-page="accountCenter"] .main-content { padding-bottom:calc(134px + env(safe-area-inset-bottom)); }
  body.ui-polished.ui-modal-open .mobile-fab { display:none; }
  .ui-polished .ui-settings-tools { grid-template-columns:minmax(0,1fr); border-radius:20px; margin-bottom:18px; }
  .ui-tool-link { gap:12px; padding:16px; }
  .ui-tool-link strong { font-size:13px; }
  .ui-context-links { gap:16px; padding-bottom:12px; }
  .ui-analysis-tabs { margin-bottom:15px; }
  .ui-polished .ui-overflow-menu button { min-height:43px; padding:10px 12px; }
  .ui-polished .mobile-more-panel { display:block; padding:19px 17px; background:rgba(252, 251, 249, .98); max-height:min(71dvh,660px); }
  .ui-polished .mobile-more-panel[hidden] { display:none; }
  .ui-more-group + .ui-more-group { margin-top:20px; padding-top:17px; border-top:1px solid #e8e6e3; }
  .ui-more-group h3 { font-size:12px; margin:0 0 11px; color:#7f7b74; font-weight:650; }
  .ui-more-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .ui-polished .mobile-more-panel button { min-height:72px; padding:10px 4px; border:1px solid #f0eeeb; border-radius:18px; background:#ffffff; }
  .ui-polished .mobile-more-panel span { margin-bottom:6px; }
  .ui-polished .mobile-more-panel span svg { width:23px; height:23px; }
  .ui-polished .mobile-more-panel strong { font-size:11px; font-weight:650; }
  .ui-filter-dialog { width:100%; max-width:none; max-height:calc(94dvh - env(safe-area-inset-top)); margin:auto 0 0; padding:14px 19px calc(22px + env(safe-area-inset-bottom)); border-radius:28px 28px 0 0; }
  .ui-sheet-handle { display:block; margin:0 auto 18px; width:35px; height:4px; border-radius:10px; background:#e1dfdb; }
  .ui-sheet-title h2 { font-size:22px; }
  .ui-filter-dialog .feature-filter-grid { gap:16px 12px; }
  .ui-filter-dialog .feature-filter-grid input,.ui-filter-dialog .feature-filter-grid select { font-size:16px; min-height:47px; padding:11px; }
  .ui-sheet-actions button { width:100%; min-height:47px; }
  .ui-onboarding { padding:13px 14px; gap:10px; margin-bottom:12px; }
  .ui-onboarding p { font-size:11px; }
  .ui-onboarding button { padding-inline:9px; font-size:11px; }
  .ui-polished .planning-inline-label { flex:1 1 170px; }
  .ui-polished .planning-inline-label input { font-size:16px; width:auto; flex:1; max-width:175px; }
  .ui-polished .plan-toolbar input { width:auto; flex:1; min-width:0; max-width:180px; }
}
@media(max-width:480px) {
  .ui-polished .form-grid > .ui-date-field, .ui-polished .form-grid > .form-field:has(input[type=date]), .ui-polished .form-grid > .form-field:has(input[type=month]), .ui-polished .form-grid > label:has(input[type=date]), .ui-polished .form-grid > label:has(input[type=month]) { grid-column:1/-1; }
}
@media(max-width:360px) {
  .ui-polished .form-grid, .ui-polished .tx-entry-form .form-grid { grid-template-columns:minmax(0,1fr); }
  .ui-polished .form-field.full { grid-column:1; }
  .ui-polished .main-content { padding-inline:15px; }
  .ui-polished .ui-month-field { gap:6px; }
  .ui-polished .ui-month-field input { max-width:142px; font-size:14px; }
  .ui-polished .ui-filter-button { min-width:82px; padding-inline:11px; font-size:12px; }
  .ui-polished .ui-onboarding { align-items:flex-start; flex-wrap:wrap; }
  .ui-polished .planning-budget-numbers { gap:10px; }
}

/* ═══ 统一页头：左上角小圆标 + 标题与说明（桌面舒展 / 手机紧凑） ═══ */
.topbar > div.header-identity { display:flex; align-items:center; gap:13px; min-width:0; }
.profile-shortcut { flex:0 0 auto; display:grid; place-items:center; width:44px; height:44px; padding:0; overflow:hidden; border:1px solid var(--line); border-radius:50%; background:#f3f2ef; }
.profile-shortcut img { display:block; width:100%; height:100%; object-fit:cover; border-radius:50%; }
.header-heading { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:9px; row-gap:2px; min-width:0; }
.topbar h1 { flex:0 0 100%; margin:0; font-size:27px; line-height:1.18; font-weight:740; letter-spacing:-.01em; }
.header-heading .eyebrow { position:static; order:1; margin:0; padding:0; font-size:11px; font-weight:500; line-height:1.45; letter-spacing:0; text-align:left; text-transform:none; white-space:normal; color:var(--muted); }
.header-heading .book-switcher { order:2; font-size:11px; font-weight:600; color:#6b6862; }
.header-heading .book-switcher::before { content:"·"; margin-right:7px; color:#cac9c6; }
@media (min-width:1200px) {
  .ui-polished .main-content { max-width:1640px; padding:34px 54px 86px; }
  .topbar { margin-bottom:38px; }
  .topbar h1 { font-size:30px; }
  .profile-shortcut { width:46px; height:46px; }
  .section-head { margin-top:40px; margin-bottom:20px; }
  .section-head .muted { margin-top:9px; }
}
@media (min-width:701px) and (max-width:1199px) {
  .ui-polished .main-content { padding:28px 32px 66px; }
  .section-head { margin-top:32px; margin-bottom:17px; }
}
@media (max-width:700px) {
  .ui-polished .main-content { padding:calc(6px + env(safe-area-inset-top)) 15px calc(150px + env(safe-area-inset-bottom)); }
  .topbar { position:sticky; top:0; z-index:60; display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 12px; padding:7px 0 9px; background:rgba(255, 255, 255, .94); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
  .topbar > div.header-identity { gap:10px; }
  .profile-shortcut { width:36px; height:36px; }
  .topbar h1 { font-size:21px; font-weight:730; }
  .header-heading { column-gap:7px; row-gap:1px; }
  .header-heading .eyebrow { display:none; }
  .header-heading .book-switcher { font-size:10px; }
  .header-heading .book-switcher::before { margin-right:6px; }
  .topbar-actions { gap:8px; }
  .topbar-actions .icon-button { width:36px; height:36px; min-height:36px; box-shadow:none; background:#f7f6f4; }
  .section-head { margin:20px 0 12px; gap:10px; }
  .section-head .section-kicker { display:none; }
  .section-head .muted { margin-top:4px; font-size:11.5px; line-height:1.55; }
  .section-head h2 { font-size:19px; }
  /* 首页不再隐藏标题：让两端的页头结构保持一致，避免只剩一枚头像 */
  body[data-page="overview"] .header-heading { display:flex; }
  body[data-page="overview"] #pageTitle { display:block; }
}
