:root {
    color-scheme: light;
    --page: #faf8f1;
    --ink: #493d2c;
    --muted: #817563;
    --accent: #ad832b;
    --line: #eee7d8;
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--page);
    color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
[v-cloak] { display: none; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible { outline: 2px solid #b08b36; outline-offset: 3px; }
h1, h2, p { margin: 0; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.dashboard { width: 100%; max-width: 480px; margin: 0 auto; padding: max(25px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }
.page-header, .brand, .section-heading, .metric-heading, .chart-toolbar, .balance-footer, .chart-summary, .recent-legend { display: flex; align-items: center; justify-content: space-between; }
.page-header { gap: 16px; }
.brand { justify-content: flex-start; gap: 11px; }
.brand-icon { display: grid; place-items: center; width: 42px; height: 46px; border-radius: 15px; background: #f2e6bf; color: #9b782b; }
.brand-icon .icon { width: 23px; height: 23px; }
h1 { font-size: 22px; line-height: 1.35; font-weight: 650; letter-spacing: 1px; }
.brand p { color: #796f5e; font-size: 11px; margin-top: 5px; letter-spacing: .7px; }
.dot { margin: 0 4px; color: #aa9b82; }
.refresh-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #e9e1cf; border-radius: 50%; background: #fffdf8; color: #8d753f; }
.refresh-button:active { background: #f2e6bf; }
.update-status { min-height: 16px; display: flex; align-items: center; gap: 6px; margin: 19px 2px 10px; font-size: 11px; color: #796f5e; line-height: 1.6; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: #b89b53; flex-shrink: 0; }
.status-dot.pending { background: #c3a967; }
.status-dot.warning { background: #b8783c; }
.balance-card { position: relative; overflow: hidden; min-height: 210px; padding: 25px 24px 0; border: 1px solid #e7ce8d; border-radius: 23px; background: linear-gradient(115deg, #f2dea3, #e9ca80); color: #493b22; box-shadow: 0 9px 20px #8d6a1f0a; }
.balance-content { position: relative; z-index: 1; }
.balance-eyebrow { display: flex; align-items: center; gap: 7px; color: #69532e; }
.balance-eyebrow h2 { font-size: 12px; font-weight: 400; letter-spacing: 1.6px; }
.mini-dot { width: 5px; height: 5px; border-radius: 50%; background: #aa8130; }
.balance-value { width: fit-content; max-width: 100%; margin-top: 15px; line-height: 1.1; font-size: clamp(35px, 12vw, 52px); font-weight: 550; letter-spacing: -1.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-shadow: none; }
.balance-value span { margin-left: 8px; font-size: 13px; font-weight: 400; letter-spacing: 0; color: #69532e; }
.balance-caption { font-size: 11px; line-height: 1.6; margin: 12px 0 22px; color: #69532e; letter-spacing: .7px; }
.house-art { position: absolute; right: -3px; top: 20px; width: 125px; height: 137px; opacity: .65; pointer-events: none; }
.balance-footer { position: relative; z-index: 1; gap: 8px; border-top: 1px solid #aa84302b; padding: 12px 0 13px; font-size: 10px; color: #645231; letter-spacing: .2px; }
.overview { margin-top: 25px; }
.section-heading { gap: 10px; }
.section-heading h2 { font-size: 16px; line-height: 1.5; font-weight: 650; letter-spacing: .4px; }
.period-label { font-size: 10px; color: #796f5e; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.metric-card { min-width: 0; padding: 15px 15px 13px; border: 1px solid #eee7d8; border-radius: 16px; background: #fffdf8; }
.metric-heading { gap: 5px; font-size: 12px; color: #7e715d; }
.metric-heading .icon { width: 17px; height: 17px; color: #ae8d48; }
.metric-heading .warm { color: #b49a63; }
.metric-value { margin-top: 11px; font-size: clamp(19px, 6vw, 26px); font-weight: 550; letter-spacing: -.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.25; }
.metric-value span { color: #7b705f; font-size: 10px; font-weight: 400; margin-left: 4px; letter-spacing: 0; white-space: nowrap; }
.metric-card p { color: #7b705f; font-size: 10px; margin-top: 6px; letter-spacing: .3px; }
.chart-card { margin-top: 18px; padding: 20px 17px 0; border: 1px solid #eee7d8; border-radius: 20px; background: #fffefa; min-width: 0; }
.chart-heading p { font-size: 11px; color: #7c705c; margin-top: 5px; letter-spacing: .2px; }
.chart-icon { width: 35px; height: 35px; display: grid; place-items: center; background: #f8f0dc; color: #a68a45; border-radius: 12px; }
.chart-icon .icon { width: 17px; height: 17px; }
.chart-toolbar { gap: 8px; margin-top: 20px; }
.segmented { display: flex; padding: 3px; gap: 3px; border-radius: 11px; background: #f5f0e4; }
.segmented button { min-height: 40px; padding: 0 15px; border: 0; background: transparent; border-radius: 8px; font-size: 10px; color: #746953; transition: background .2s, color .2s; }
.segmented button.active { color: #6f531e; background: #f1dda6; box-shadow: 0 1px 4px #8d6a1f0c; font-weight: 600; }
.chart-unit { font-size: 10px; color: #7a6e5c; }
.chart-summary { margin-top: 17px; gap: 8px; font-size: 10px; color: #7b705f; }
.chart-summary b { margin: 0 3px; font-size: 12px; font-weight: 600; color: #8f6a23; font-variant-numeric: tabular-nums; }
.chart-summary > span:last-child { font-size: 10px; }
.chart-wrap { position: relative; margin-top: 5px; height: 187px; }
.chart { width: 100%; height: 100%; }
.chart-message { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; background: #fffefaf2; color: #7b705f; font-size: 11px; text-align: center; padding: 12px; }
.chart-message button { border: 1px solid #e8ddbe; border-radius: 8px; min-height: 36px; padding: 0 15px; background: #faf4e5; font-size: 11px; }
.chart-note { border-top: 1px solid #f0eadc; padding: 13px 0; font-size: 10px; letter-spacing: .3px; text-align: center; color: #7a6e5c; }
.recent-card { margin-top: 14px; }
.recent-legend { margin: 21px 0 0; font-size: 10px; color: #7b6d53; }
.recent-legend > span:first-child { display: flex; align-items: center; gap: 6px; }
.recent-legend i { width: 12px; height: 3px; background: #b09349; border-radius: 3px; }
.recent-wrap { height: 180px; margin-top: 10px; }
.page-footer { display: flex; justify-content: center; align-items: center; gap: 5px; margin: 25px 0 5px; color: #7c705d; font-size: 10px; letter-spacing: 1px; }
.page-footer .icon { width: 13px; height: 13px; stroke-width: 1.4; }
.loader { width: 19px; height: 19px; border-radius: 50%; border: 2px solid #f0e7cd; border-top-color: #b48c33; animation: spin 1s linear infinite; }
.spinning { animation: spin 1s linear infinite; }
.skeleton { color: transparent; border-radius: 7px; background: #a98c4820; animation: pulse 1.3s ease-in-out infinite alternate; }
.skeleton span { visibility: hidden; }
.noscript { padding: 30px; text-align: center; color: #8d753f; font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { to { opacity: .35; } }
@media (max-width: 350px) {
    .dashboard { padding-left: 15px; padding-right: 15px; }
    .balance-card { padding-left: 20px; padding-right: 20px; }
    .house-art { right: -15px; width: 108px; opacity: .4; }
    .metric-card { padding-left: 12px; padding-right: 12px; }
    .chart-card { padding-left: 13px; padding-right: 13px; }
    .segmented button { padding-left: 12px; padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
