:root {
  color-scheme: light;
  --ink: #182622;
  --ink-soft: #60706a;
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --surface-muted: #ebe8dc;
  --line: #d9d5c8;
  --green: #173b35;
  --green-2: #2f735f;
  --green-soft: #dcebe4;
  --gold: #b77b22;
  --gold-soft: #f5e8c8;
  --red: #b54734;
  --red-soft: #f6ded8;
  --blue: #4d6f96;
  --blue-soft: #e0e8f2;
  --shadow: 0 12px 32px rgba(24, 38, 34, 0.08);
  --radius: 8px;
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(214, 168, 79, 0.12), transparent 26rem),
    var(--paper);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: 15px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(47, 115, 95, 0.26);
  outline-offset: 1px;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  font-size: 16px;
  line-height: 1.3;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  min-height: 100dvh;
  padding-bottom: calc(84px + var(--safe-bottom));
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
  border-bottom: 1px solid rgba(217, 213, 200, 0.78);
  background: rgba(244, 241, 232, 0.92);
  backdrop-filter: blur(18px);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(23, 59, 53, 0.16);
}

.eyebrow {
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.view {
  width: min(100%, 1160px);
  min-height: 60dvh;
  margin: 0 auto;
  padding: 16px 16px 36px;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: calc(68px + var(--safe-bottom));
  padding: 6px 8px var(--safe-bottom);
  border-top: 1px solid rgba(217, 213, 200, 0.9);
  background: rgba(255, 253, 247, 0.96);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: flex;
  min-width: 0;
  min-height: 48px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  color: #7b827f;
  background: transparent;
  font-size: 10px;
}

.bottom-nav button.is-active {
  color: var(--green-2);
}

.bottom-nav .nav-primary {
  width: 48px;
  height: 48px;
  justify-self: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 18px rgba(23, 59, 53, 0.26);
}

.bottom-nav .nav-primary .icon {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
}

.icon-button--soft {
  border-color: transparent;
  background: var(--surface-muted);
}

.primary-button,
.secondary-button,
.danger-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--green);
  color: #fff;
  background: var(--green);
}

.primary-button:hover {
  background: #214d45;
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.danger-button {
  border: 1px solid var(--red);
  color: #fff;
  background: var(--red);
}

.text-button {
  min-height: 34px;
  padding: 4px;
  border: 0;
  color: var(--green-2);
  background: transparent;
  font-weight: 700;
}

.text-button .icon {
  width: 16px;
  height: 16px;
}

.text-button--danger {
  color: var(--red);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--green);
  box-shadow: 0 15px 34px rgba(23, 59, 53, 0.2);
}

.hero-card::after {
  position: absolute;
  top: -54px;
  right: -54px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 24px rgba(255, 255, 255, 0.035),
    0 0 0 48px rgba(255, 255, 255, 0.02);
}

.hero-card--light {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card--light::after {
  border-color: rgba(47, 115, 95, 0.12);
  box-shadow:
    0 0 0 24px rgba(47, 115, 95, 0.035),
    0 0 0 48px rgba(47, 115, 95, 0.02);
}

.hero-card--wish {
  color: var(--ink);
  background: var(--gold-soft);
  box-shadow: none;
}

.hero-card--wish::after {
  border-color: rgba(183, 123, 34, 0.18);
  box-shadow:
    0 0 0 24px rgba(183, 123, 34, 0.06),
    0 0 0 48px rgba(183, 123, 34, 0.03);
}

.hero-card__head,
.hero-card__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.hero-card__amount {
  margin-top: 3px;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 800;
  line-height: 1.08;
}

.hero-card__foot {
  align-items: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-card--light .hero-card__foot,
.hero-card--wish .hero-card__foot {
  border-color: rgba(24, 38, 34, 0.12);
}

.hero-card__foot div {
  display: grid;
  gap: 2px;
}

.hero-card__foot span,
.hero-card--wish .eyebrow {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.hero-card--light .hero-card__foot span,
.hero-card--wish .hero-card__foot span,
.hero-card--wish .eyebrow {
  color: var(--ink-soft);
}

.hero-card__foot strong {
  font-size: 14px;
}

.hero-card__note {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  color: #705827;
  font-size: 13px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hero-card--light .status-chip,
.hero-card--wish .status-chip {
  border-color: rgba(24, 38, 34, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.status-chip--positive {
  border-color: rgba(47, 115, 95, 0.18);
  color: var(--green-2);
  background: var(--green-soft);
}

.status-chip--negative {
  border-color: rgba(181, 71, 52, 0.16);
  color: var(--red);
  background: var(--red-soft);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 14px 0;
}

.quick-action {
  display: flex;
  min-width: 0;
  min-height: 84px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.quick-action span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
}

.quick-action strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.quick-action--expense span {
  color: var(--red);
  background: var(--red-soft);
}

.quick-action--income span {
  color: var(--green-2);
  background: var(--green-soft);
}

.quick-action--transfer span {
  color: var(--blue);
  background: var(--blue-soft);
}

.quick-action--camera span {
  color: var(--gold);
  background: var(--gold-soft);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.metric-card {
  display: grid;
  min-height: 88px;
  align-content: space-between;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-card span,
.summary-strip span {
  color: var(--ink-soft);
  font-size: 12px;
}

.metric-card strong {
  font-size: 18px;
  line-height: 1.15;
}

.section-block {
  margin-top: 26px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 19px;
}

.notice-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.notice-card__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  color: var(--gold);
  background: var(--gold-soft);
}

.notice-card strong {
  display: block;
  font-size: 14px;
}

.notice-card p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.composition {
  display: grid;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.donut {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--donut);
}

.donut::after {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: var(--surface);
  content: "";
}

.donut > div {
  position: absolute;
  z-index: 1;
  inset: 38px;
  display: grid;
  align-content: center;
  text-align: center;
}

.donut span {
  color: var(--ink-soft);
  font-size: 10px;
}

.donut strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.composition__legend {
  display: grid;
  gap: 10px;
}

.legend-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.legend-row > span:not(.legend-dot) {
  font-size: 13px;
}

.legend-row strong {
  font-size: 13px;
}

.legend-row small {
  min-width: 42px;
  color: var(--ink-soft);
  font-size: 11px;
  text-align: right;
}

.legend-dot,
.type-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--dot, var(--green-2));
}

.type-dot--green {
  background: var(--green-2);
}

.type-dot--gold {
  background: var(--gold);
}

.type-dot--blue {
  background: var(--blue);
}

.type-dot--red {
  background: var(--red);
}

.entry-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.entry-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 66px;
  padding: 10px 12px;
  border: 0;
  background: var(--surface);
  text-align: left;
}

.entry-item__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.entry-item__mark--expense {
  color: var(--red);
  background: var(--red-soft);
}

.entry-item__mark--income {
  color: var(--green-2);
  background: var(--green-soft);
}

.entry-item__mark--transfer {
  color: var(--blue);
  background: var(--blue-soft);
}

.entry-item__mark--adjustment {
  color: var(--gold);
  background: var(--gold-soft);
}

.entry-item__main {
  min-width: 0;
}

.entry-item__main strong,
.entry-item__main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-item__main strong {
  font-size: 14px;
}

.entry-item__main span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 11px;
}

.entry-item__amount {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.money-positive {
  color: var(--green-2) !important;
}

.money-negative,
.money-expense {
  color: var(--red) !important;
}

.money-income {
  color: var(--green-2) !important;
}

.money-transfer,
.money-adjustment {
  color: var(--blue) !important;
}

.page-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.page-toolbar--end {
  justify-content: flex-end;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  flex: 1;
}

.summary-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.summary-strip > div {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: var(--surface);
}

.summary-strip strong {
  font-size: 14px;
}

.date-groups {
  display: grid;
  gap: 18px;
}

.date-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 7px;
  color: var(--ink-soft);
  font-size: 12px;
}

.date-group__head strong {
  color: var(--ink);
  font-size: 13px;
}

.account-groups,
.snapshot-list {
  display: grid;
  gap: 10px;
}

.account-group,
.snapshot-preview,
.trend-card,
.settings-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.account-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.account-group__head > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.account-row,
.balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 13px;
}

.account-row strong,
.balance-row strong {
  color: var(--ink);
  white-space: nowrap;
}

.snapshot-preview__totals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.snapshot-preview__totals > div {
  display: grid;
  gap: 4px;
}

.snapshot-preview__totals span {
  color: var(--ink-soft);
  font-size: 11px;
}

.snapshot-preview__totals strong {
  font-size: 14px;
}

.snapshot-preview__ratios {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.snapshot-preview__ratios span {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 11px;
}

.snapshot-row {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.snapshot-row div {
  display: grid;
  gap: 2px;
}

.snapshot-row span {
  color: var(--ink-soft);
  font-size: 11px;
}

.snapshot-row > .icon {
  color: var(--ink-soft);
}

.monthly-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.monthly-toolbar > .icon-button {
  transform: rotate(180deg);
}

.monthly-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.monthly-summary > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.monthly-summary span {
  color: var(--ink-soft);
  font-size: 11px;
}

.monthly-summary strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.balance-sheet {
  display: grid;
  gap: 12px;
}

.balance-sheet__side {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.balance-sheet__title {
  padding: 12px 14px;
  color: #fff;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.balance-section {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.balance-section__head,
.balance-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.balance-section__head {
  margin-bottom: 6px;
  font-size: 13px;
}

.balance-section__head span {
  color: var(--ink-soft);
}

.balance-total {
  min-height: 52px;
  padding: 13px 14px;
  color: var(--green);
  background: var(--green-soft);
}

.balance-total strong {
  font-size: 17px;
}

.investment-grid {
  display: grid;
  gap: 10px;
}

.investment-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.investment-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.investment-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.investment-card__grid > div {
  display: grid;
  gap: 3px;
}

.investment-card__grid span,
.reference-price {
  color: var(--ink-soft);
  font-size: 11px;
}

.investment-card__grid strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.reference-price {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.formula-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.formula-list > div {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(120px, 1.2fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 12px;
  background: var(--surface);
}

.formula-list span {
  font-size: 13px;
}

.formula-list code {
  color: var(--ink-soft);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.formula-list strong {
  font-size: 13px;
  text-align: right;
}

.wish-list {
  display: grid;
  gap: 12px;
}

.wish-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.wish-card--completed {
  opacity: 0.72;
}

.wish-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wish-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wish-card__head p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
}

.wish-card__head > strong {
  color: var(--gold);
  font-size: 18px;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  margin: 14px 0;
  border-radius: 4px;
  background: var(--surface-muted);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
}

.wish-card__numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wish-card__numbers > div {
  display: grid;
  gap: 2px;
}

.wish-card__numbers span {
  color: var(--ink-soft);
  font-size: 10px;
}

.wish-card__numbers strong {
  font-size: 12px;
}

.wish-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.wish-card__actions .primary-button,
.wish-card__actions .secondary-button {
  min-height: 38px;
  padding: 7px 11px;
  font-size: 12px;
}

.wish-card__actions .icon-button {
  margin-left: auto;
}

.settings-card {
  display: grid;
  gap: 13px;
}

.settings-card > p {
  color: var(--ink-soft);
  font-size: 12px;
}

.settings-account-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.settings-account-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 61px;
  padding: 10px 12px;
  border: 0;
  background: var(--surface);
  text-align: left;
}

.settings-account-row.is-muted {
  opacity: 0.55;
}

.settings-account-row div {
  display: grid;
  gap: 2px;
}

.settings-account-row div span {
  color: var(--ink-soft);
  font-size: 11px;
}

.security-note,
.warning-note {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius);
}

.security-note {
  color: var(--green);
  background: var(--green-soft);
}

.security-note > div {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.55);
}

.security-note p,
.warning-note {
  font-size: 12px;
}

.warning-note {
  display: block;
  color: #713728;
  background: var(--red-soft);
}

.storage-status,
.muted-label {
  color: var(--ink-soft);
  font-size: 11px;
}

.install-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  font-size: 13px;
}

.danger-zone {
  margin-top: 30px;
}

.empty-state {
  display: grid;
  max-width: 460px;
  justify-items: center;
  gap: 9px;
  margin: 42px auto;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 247, 0.72);
  text-align: center;
}

.empty-state__mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: var(--green-2);
  background: var(--green-soft);
}

.empty-state p {
  color: var(--ink-soft);
  font-size: 13px;
}

.empty-inline,
.empty-line {
  padding: 20px 14px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.field > span {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.field input[readonly] {
  color: var(--ink-soft);
  background: var(--surface-muted);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field--compact {
  gap: 3px;
}

.field--compact select {
  min-height: 38px;
  padding: 7px 9px;
  font-size: 12px;
}

.field--full {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 13px;
}

.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 42px;
  padding: 9px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.check-field input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--green-2);
}

.is-hidden {
  display: none !important;
}

.inline-hint {
  margin-top: 13px;
  padding: 10px 11px;
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 11px;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 12px;
  background: rgba(16, 28, 25, 0.52);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(100%, 620px);
  max-height: min(88dvh, 900px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(16, 28, 25, 0.25);
}

.modal--wide {
  width: min(100%, 860px);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.96);
}

.modal__body {
  max-height: calc(88dvh - 62px);
  overflow-y: auto;
  padding: 16px;
}

.modal__footer {
  position: sticky;
  z-index: 2;
  bottom: -16px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin: 18px -16px -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.96);
  backdrop-filter: blur(12px);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-muted);
}

.segmented button {
  min-height: 38px;
  padding: 6px 4px;
  border: 0;
  border-radius: 6px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.segmented button.is-active {
  color: var(--green);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(24, 38, 34, 0.08);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.action-grid button {
  display: grid;
  min-height: 118px;
  justify-items: start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: left;
}

.action-grid button > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  color: var(--green-2);
  background: var(--green-soft);
}

.action-grid button small {
  color: var(--ink-soft);
  font-size: 11px;
}

.allocation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.allocation-summary > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.allocation-summary span {
  color: var(--ink-soft);
  font-size: 10px;
}

.allocation-summary strong {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.modal-danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.modal-lead {
  margin-bottom: 14px;
  color: var(--ink-soft);
  font-size: 13px;
}

.difference-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.difference-list > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 11px 12px;
  background: var(--surface);
}

.difference-list small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
}

.reconcile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 16px;
}

.snapshot-editor-groups {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.snapshot-editor-group {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.snapshot-editor-group h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  font-size: 13px;
}

.snapshot-input-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-bottom: 1px solid var(--line);
}

.snapshot-input-row:last-child {
  border-bottom: 0;
}

.snapshot-input-row > span {
  color: var(--ink-soft);
  font-size: 12px;
}

.snapshot-input-row input {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  text-align: right;
}

.investment-edit {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.investment-edit__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.investment-edit__head span {
  color: var(--ink-soft);
  font-size: 10px;
}

.trend-card {
  overflow: hidden;
}

.trend-card__value {
  font-size: 26px;
  font-weight: 800;
}

.trend-card > p {
  margin-top: 5px;
  color: var(--ink-soft);
  font-size: 12px;
}

.trend-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--green-2);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-point {
  fill: var(--surface);
  stroke: var(--green-2);
  stroke-width: 3;
}

.chart-label,
.chart-value {
  fill: var(--ink-soft);
  font-family: inherit;
  font-size: 11px;
}

.chart-value {
  fill: var(--green-2);
  font-weight: 700;
}

.ocr-layout {
  display: grid;
  gap: 16px;
}

.ocr-upload {
  display: grid;
  gap: 10px;
}

.ocr-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.ocr-drop {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 20px;
  border: 1px dashed var(--green-2);
  border-radius: var(--radius);
  color: var(--green);
  background: var(--green-soft);
  text-align: center;
  cursor: pointer;
}

.ocr-drop > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.ocr-drop small {
  max-width: 280px;
  color: var(--ink-soft);
}

.ocr-status {
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.ocr-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ocr-result {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ocr-candidates h3 {
  margin-bottom: 11px;
}

.ocr-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.ocr-raw-text {
  width: 100%;
  min-height: 160px;
  margin-top: 13px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  resize: vertical;
}

.toast-root {
  position: fixed;
  z-index: 200;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  left: 12px;
  display: grid;
  justify-items: center;
  gap: 7px;
  pointer-events: none;
}

.toast {
  max-width: min(92vw, 420px);
  padding: 10px 14px;
  border-radius: 7px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  background: var(--green-2);
}

.toast--error {
  background: var(--red);
}

@media (min-width: 640px) {
  .view {
    padding: 22px 24px 52px;
  }

  .quick-action {
    min-height: 94px;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .composition {
    grid-template-columns: 210px 1fr;
    align-items: center;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-backdrop {
    align-items: center;
  }

  .ocr-layout {
    grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  }

  .reconcile-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .topbar {
    padding-right: 28px;
    padding-left: 28px;
  }

  .view {
    padding-bottom: 70px;
  }

  .quick-actions {
    gap: 12px;
  }

  .balance-sheet {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: start;
  }

  .investment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wish-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trend-card {
    padding: 18px;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    padding-bottom: 0;
  }

  .view {
    padding-right: 28px;
    padding-left: 112px;
  }

  .bottom-nav {
    top: 50%;
    right: auto;
    bottom: auto;
    left: max(14px, calc((100vw - 1260px) / 2));
    width: 72px;
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 9px 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transform: translateY(-50%);
  }

  .bottom-nav button {
    min-height: 54px;
  }

  .bottom-nav .nav-primary {
    width: 46px;
    height: 46px;
  }
}

@media (min-width: 1200px) {
  .bottom-nav {
    left: calc((100vw - 1160px) / 2 - 96px);
  }
}

@media (max-width: 390px) {
  .topbar {
    padding-right: 13px;
    padding-left: 13px;
  }

  .view {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-card {
    padding: 18px;
  }

  .hero-card__foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-card__foot > div:last-child {
    grid-column: 1 / -1;
  }

  .quick-action {
    padding: 9px;
  }

  .quick-action strong {
    font-size: 12px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .formula-list > div {
    grid-template-columns: 1fr auto;
  }

  .formula-list code {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .settings-account-row {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* 截图风格界面：浅绿高亮、白色信息卡和浮动底部导航。 */
:root {
  --ink: #121512;
  --ink-soft: #737a75;
  --paper: #f6f7f4;
  --surface: #ffffff;
  --surface-muted: #f0f2ed;
  --line: #e5e8e1;
  --green: #171b18;
  --green-2: #1e9d55;
  --green-soft: #e1f6e9;
  --lime: #c8f45b;
  --lime-soft: #efffd1;
  --gold: #ffad21;
  --gold-soft: #fff1d8;
  --amber: #ffad21;
  --red: #e75e4b;
  --red-soft: #ffe7e2;
  --blue: #4f70ee;
  --blue-soft: #e8ecff;
  --shadow: 0 14px 34px rgba(31, 45, 36, 0.09);
  --radius: 8px;
}

html {
  background: var(--paper);
}

body {
  background:
    linear-gradient(180deg, #d7ff7d 0, #edffd0 150px, #f6f7f4 360px);
}

.app-shell {
  padding-bottom: calc(112px + var(--safe-bottom));
}

.topbar {
  min-height: 86px;
  padding: max(16px, env(safe-area-inset-top)) 18px 10px;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(215, 255, 125, 0.96), rgba(237, 255, 208, 0.82));
  backdrop-filter: blur(18px);
}

.topbar h1 {
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 900;
  line-height: 1;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.top-action {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 6px 18px rgba(31, 45, 36, 0.07);
}

.top-action svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.view {
  width: min(100%, 1040px);
  padding: 12px 16px 38px;
}

.asset-overview-card {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.asset-overview-card--compact {
  background: var(--surface);
}

.asset-overview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.overview-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.overview-title h2 {
  font-size: 20px;
  font-weight: 850;
}

.count-chip,
.local-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 800;
}

.local-badge {
  color: #4b5d13;
  background: var(--lime-soft);
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
  padding-bottom: 18px;
  border-bottom: 1px dashed #dfe3dc;
}

.overview-metrics--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-metrics > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.overview-metrics span {
  color: var(--ink-soft);
  font-size: 13px;
}

.overview-metrics strong,
.overview-single-value {
  overflow-wrap: anywhere;
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 900;
  line-height: 1.06;
}

.overview-single-value {
  margin-top: 4px;
}

.overview-note {
  margin-top: 13px;
  color: var(--ink-soft);
  font-size: 12px;
}

.overview-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.progress-item {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.progress-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.progress-item span {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-item strong {
  font-size: 11px;
}

.progress-track--thin {
  height: 6px;
  margin: 0;
}

.metric-grid--home {
  gap: 12px;
  margin: 14px 0 24px;
}

.metric-card {
  min-height: 108px;
  padding: 15px;
  border-color: transparent;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 45, 36, 0.06);
}

.metric-card span {
  font-size: 13px;
}

.metric-card strong {
  font-size: 21px;
  font-weight: 850;
}

.metric-card--progress .progress-track {
  margin: 2px 0 0;
}

.metric-card--progress .progress-track span,
.wish-card .progress-track span {
  background: var(--lime);
}

.section-block {
  margin-top: 24px;
}

.section-heading h2 {
  font-size: 21px;
  font-weight: 850;
}

.section-heading .eyebrow {
  color: #7d857f;
  text-transform: none;
}

.notice-card,
.composition,
.trend-card,
.snapshot-preview,
.settings-card,
.wish-card,
.investment-card {
  border-color: transparent;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 45, 36, 0.055);
}

.notice-card__icon {
  color: #6b8116;
  background: var(--lime-soft);
}

.filter-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-panel__head h2 {
  font-size: 24px;
  font-weight: 900;
}

.mini-add-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
}

.mini-add-button--light {
  color: var(--ink);
  background: var(--lime);
}

.chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 2px 16px 6px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chip-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 17px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 5px 14px rgba(31, 45, 36, 0.05);
  font-size: 14px;
  font-weight: 750;
}

.filter-chip.is-active {
  color: #fff;
  background: var(--ink);
}

.filter-chip--soft {
  color: #5f6661;
  background: #edf0ea;
  box-shadow: none;
}

.filter-chip.is-active-dark {
  color: #fff;
  background: var(--ink);
}

.summary-strip {
  border: 0;
  background: transparent;
  box-shadow: 0 8px 22px rgba(31, 45, 36, 0.05);
}

.summary-strip > div {
  background: var(--surface);
}

.date-group__head {
  padding-top: 3px;
}

.entry-list {
  gap: 8px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.entry-item {
  min-height: 70px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(31, 45, 36, 0.045);
}

.entry-item__mark {
  border-radius: 50%;
}

.asset-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.asset-type-card {
  display: grid;
  min-height: 142px;
  align-content: space-between;
  gap: 5px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 45, 36, 0.055);
}

.asset-type-card__icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--green-soft);
}

.asset-type-card--gold .asset-type-card__icon {
  background: var(--gold-soft);
}

.asset-type-card--blue .asset-type-card__icon {
  background: var(--blue-soft);
}

.asset-type-card--red .asset-type-card__icon {
  background: var(--red-soft);
}

.asset-type-card--gold .asset-type-card__icon {
  color: var(--gold);
}

.asset-type-card--blue .asset-type-card__icon {
  color: var(--blue);
}

.asset-type-card--red .asset-type-card__icon {
  color: var(--red);
}

.asset-type-card > span,
.asset-type-card small {
  color: var(--ink-soft);
  font-size: 12px;
}

.asset-type-card > strong {
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 850;
}

.account-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.account-card {
  display: grid;
  min-width: 0;
  min-height: 112px;
  align-content: space-between;
  gap: 8px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(31, 45, 36, 0.05);
}

.account-card__top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.account-card__top small {
  color: var(--ink-soft);
  font-size: 11px;
}

.account-card > strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card > span {
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 800;
}

.account-card--gold > span {
  color: var(--gold);
}

.account-card--blue > span {
  color: var(--blue);
}

.account-card--red > span {
  color: var(--red);
}

.wish-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wish-card {
  min-width: 0;
  padding: 14px;
}

.wish-card[data-action="edit-wish"] {
  cursor: pointer;
}

.wish-card__head {
  gap: 8px;
}

.wish-card__head > strong {
  font-size: 16px;
}

.wish-card__numbers {
  gap: 5px;
}

.wish-card__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.wish-card__actions .primary-button,
.wish-card__actions .secondary-button {
  min-width: 0;
  padding: 7px 5px;
  font-size: 11px;
}

.wish-card__actions .icon-button {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
  border-radius: 7px;
}

.search-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 13px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(31, 45, 36, 0.06);
}

.search-field span {
  display: grid;
  place-items: center;
  color: var(--ink-soft);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}

.search-results {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.search-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 6px 16px rgba(31, 45, 36, 0.045);
  text-align: left;
}

.search-result__type {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #5f6a19;
  background: var(--lime-soft);
  font-size: 11px;
  font-weight: 800;
}

.search-result div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.search-result div strong,
.search-result div small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result div small {
  color: var(--ink-soft);
  font-size: 11px;
}

.search-empty {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 30px 18px;
  color: var(--ink-soft);
  text-align: center;
}

.search-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #607418;
  background: var(--lime-soft);
}

.search-empty strong {
  color: var(--ink);
}

.search-empty p {
  font-size: 12px;
}

.bottom-nav {
  top: auto;
  right: auto;
  bottom: calc(10px + var(--safe-bottom));
  left: 50%;
  width: calc(100vw - 154px);
  max-width: 420px;
  min-height: 66px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(229, 232, 225, 0.92);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 42px rgba(31, 45, 36, 0.15);
  transform: translateX(-50%);
}

.bottom-nav button {
  min-width: 0;
  min-height: 50px;
  gap: 2px;
  border-radius: 999px;
  color: #222722;
  font-size: 11px;
  font-weight: 750;
}

.bottom-nav button.is-active {
  color: var(--ink);
  background: var(--lime-soft);
}

.bottom-nav button.is-active .icon,
.bottom-nav button.is-active svg {
  color: #6b8116;
}

.bottom-nav .icon,
.bottom-nav svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.bottom-nav button.is-active svg path:first-child {
  fill: var(--lime);
}

.floating-add {
  position: fixed;
  z-index: 31;
  right: 15px;
  bottom: calc(15px + var(--safe-bottom));
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 16px 42px rgba(31, 45, 36, 0.16);
}

.floating-add svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.section-heading .text-button {
  color: #607418;
}

.avatar,
.brand-mark,
.topbar__brand {
  display: none;
}

@media (min-width: 700px) {
  .view {
    padding: 20px 28px 48px;
  }

  .bottom-nav {
    width: 420px;
  }

  .floating-add {
    right: auto;
    left: calc(50% + 220px);
  }

  .metric-grid--home {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .overview-progress {
    gap: 20px;
  }

  .search-result {
    min-height: 66px;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    padding-bottom: 124px;
  }

  .view {
    padding: 24px 32px 52px;
  }

  .bottom-nav {
    top: auto;
    right: auto;
    bottom: 18px;
    left: 50%;
    width: 440px;
    min-height: 66px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 7px;
    transform: translateX(-50%);
  }

  .floating-add {
    right: auto;
    bottom: 23px;
    left: calc(50% + 232px);
  }
}

@media (max-width: 390px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .top-action {
    width: 44px;
    height: 44px;
  }

  .view {
    padding-right: 12px;
    padding-left: 12px;
  }

  .overview-metrics--three {
    gap: 8px;
  }

  .overview-metrics--three strong {
    font-size: 18px;
  }

  .bottom-nav {
    width: calc(100vw - 148px);
  }

  .wish-card__numbers {
    grid-template-columns: 1fr 1fr;
  }

  .wish-card__numbers > div:last-child {
    grid-column: 1 / -1;
  }
}

.month-bill-header {
  overflow: hidden;
  margin: -12px -16px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(135deg, #d5ff78, #c5f24d 72%, #e9ffad);
  box-shadow: 0 12px 30px rgba(111, 145, 36, 0.12);
}

.month-bill-header__button {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(120px, 1.15fr) 1fr 1fr;
  align-items: end;
  gap: 11px;
  padding: 15px 16px 17px;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.month-bill-date {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.month-bill-date > span {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 700;
}

.month-bill-date > strong {
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.month-bill-date small {
  margin-left: 2px;
  font-size: 15px;
}

.month-bill-date svg {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.month-bill-metric {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.month-bill-metric span {
  font-size: 12px;
}

.month-bill-metric strong {
  overflow: hidden;
  font-size: 18px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-picker {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  height: min(330px, 48dvh);
  overflow: hidden;
}

.month-picker__column {
  display: grid;
  align-content: start;
  gap: 5px;
  overflow-y: auto;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  scroll-snap-type: y proximity;
}

.month-picker__column button {
  min-height: 46px;
  border: 0;
  border-radius: 7px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 17px;
  font-weight: 750;
  scroll-snap-align: center;
}

.month-picker__column button.is-selected {
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 6px 16px rgba(111, 145, 36, 0.16);
}

.period-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 45, 36, 0.05);
}

.segmented--period {
  margin: 0;
}

.period-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.period-nav > strong {
  text-align: center;
}

.period-nav .icon-button {
  width: 38px;
  height: 38px;
}

.period-nav .icon-button:first-child {
  transform: rotate(180deg);
}

.rank-chart-grid,
.chart-stack {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.chart-split {
  display: grid;
  gap: 12px;
}

.chart-card {
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 9px 24px rgba(31, 45, 36, 0.055);
}

.chart-card--wide {
  padding: 15px;
}

.chart-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.chart-card__head h3 {
  font-size: 16px;
}

.chart-card__badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  color: #5f6f1c;
  background: var(--lime-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.chart-canvas {
  width: 100%;
  height: 250px;
}

.chart-canvas--line {
  height: 280px;
}

.chart-canvas--pie {
  height: 285px;
}

.chart-canvas--bar {
  height: 270px;
}

.chart-empty {
  display: grid;
  height: 100%;
  place-items: center;
  border-radius: 7px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-size: 12px;
  text-align: center;
}

.insight-strip {
  margin-top: 10px;
  padding: 10px 11px;
  border-left: 3px solid var(--lime);
  border-radius: 0 7px 7px 0;
  color: #59625c;
  background: #f5f9ec;
  font-size: 12px;
  line-height: 1.55;
}

@media (min-width: 700px) {
  .month-bill-header {
    margin: -20px -28px 20px;
  }

  .month-bill-header__button {
    padding: 18px 28px 20px;
  }

  .month-bill-metric strong {
    font-size: 22px;
  }

  .rank-chart-grid,
  .chart-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .month-bill-header {
    margin-right: -12px;
    margin-left: -12px;
  }

  .month-bill-header__button {
    grid-template-columns: minmax(105px, 1fr) 0.92fr 0.92fr;
    gap: 8px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .month-bill-date > strong {
    font-size: 31px;
  }

  .month-bill-metric strong {
    font-size: 15px;
  }
}

/* 固定资产页面与五项底部导航。 */
.bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-grid--home {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid--home .metric-card {
  min-width: 0;
  padding: 13px 11px;
}

.metric-grid--home .metric-card strong {
  overflow-wrap: anywhere;
  font-size: clamp(15px, 4.2vw, 20px);
}

.fixed-overview-card {
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f4ffe0, #dfffb0);
  box-shadow: 0 12px 30px rgba(104, 139, 35, 0.1);
}

.fixed-overview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fixed-overview-card__head h2 {
  font-size: 21px;
}

.fixed-status-filter {
  margin-top: 15px;
}

.fixed-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.fixed-asset-card {
  display: grid;
  min-width: 0;
  min-height: 186px;
  align-content: space-between;
  gap: 8px;
  padding: 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 9px 24px rgba(31, 45, 36, 0.065);
  text-align: left;
}

.fixed-asset-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fixed-asset-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #6b8116;
  background: var(--lime-soft);
}

.fixed-asset-card__icon .icon {
  width: 26px;
  height: 26px;
}

.fixed-asset-card h3 {
  overflow: hidden;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-asset-card p {
  color: var(--ink-soft);
  font-size: 11px;
}

.fixed-asset-card > strong {
  font-size: 14px;
}

.fixed-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.fixed-status--positive {
  color: #3d7111;
  background: var(--lime-soft);
}

.fixed-status--neutral {
  color: #4d6793;
  background: var(--blue-soft);
}

.fixed-status--negative {
  color: #a94736;
  background: var(--red-soft);
}

.fixed-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fixed-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.fixed-detail-identity {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 16px 22px;
  text-align: center;
}

.fixed-detail-identity__icon {
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 4px;
  place-items: center;
  border: 8px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  color: #6b8116;
  background: var(--lime-soft);
  box-shadow: 0 10px 28px rgba(31, 45, 36, 0.08);
}

.fixed-detail-identity__icon .icon {
  width: 48px;
  height: 48px;
}

.fixed-detail-identity h2 {
  font-size: 27px;
  font-weight: 900;
}

.fixed-detail-identity > strong {
  font-size: 24px;
}

.fixed-detail-identity > strong small {
  font-size: 14px;
}

.fixed-detail-identity > p {
  color: var(--ink-soft);
  font-size: 13px;
}

.fixed-detail-identity > p span {
  margin: 0 5px;
  color: var(--line);
}

.fixed-cost-chart-card {
  margin-top: 6px;
}

.fixed-info-card {
  display: grid;
  margin-top: 12px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 45, 36, 0.05);
}

.fixed-info-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}

.fixed-info-card > div:last-child {
  border-bottom: 0;
}

.fixed-info-card span {
  font-size: 14px;
}

.fixed-info-card strong {
  color: var(--ink-soft);
  font-size: 14px;
  text-align: right;
}

.status-action-sheet {
  display: grid;
  gap: 9px;
}

.status-action-sheet .primary-button,
.status-action-sheet .secondary-button {
  width: 100%;
  min-height: 48px;
}

.sale-editor-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.sale-editor-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(31, 45, 36, 0.05);
}

.sale-editor-summary span {
  color: var(--ink-soft);
  font-size: 11px;
}

.sale-editor-summary strong {
  font-size: 15px;
}

.sale-profit-preview {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.fixed-detail-toolbar .icon-button {
  transform: rotate(180deg);
}

.fixed-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #d5ff78, #eaffb2);
  box-shadow: 0 13px 34px rgba(99, 138, 25, 0.12);
}

.fixed-detail-hero__icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.74);
}

.fixed-detail-hero__icon .icon {
  width: 38px;
  height: 38px;
}

.fixed-detail-hero h2 {
  margin-top: 6px;
  font-size: 23px;
}

.fixed-detail-hero p {
  margin-top: 3px;
  color: #61701f;
  font-size: 12px;
}

.fixed-detail-hero__cost {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.fixed-detail-hero__cost span {
  font-size: 11px;
}

.fixed-detail-hero__cost strong {
  font-size: 19px;
  white-space: nowrap;
}

.fixed-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.fixed-detail-grid article,
.sale-result-card > div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(31, 45, 36, 0.05);
}

.fixed-detail-grid span,
.sale-result-card span {
  color: var(--ink-soft);
  font-size: 11px;
}

.fixed-detail-grid strong,
.sale-result-card strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.sale-result-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.fixed-timeline {
  display: grid;
  gap: 0;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(31, 45, 36, 0.05);
}

.fixed-timeline > div {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-height: 62px;
}

.fixed-timeline > div:not(:last-child)::after {
  position: absolute;
  top: 18px;
  bottom: -2px;
  left: 6px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  margin-top: 3px;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-dot--start,
.timeline-dot--now {
  background: var(--lime);
}

.timeline-dot--end {
  background: var(--coral);
}

.fixed-timeline strong {
  font-size: 14px;
}

.fixed-timeline p {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

.fixed-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 24px;
}

.fixed-detail-actions .danger-button {
  grid-column: 1 / -1;
}

@media (min-width: 700px) {
  .metric-grid--home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fixed-asset-grid {
    gap: 14px;
  }
}

@media (max-width: 390px) {
  .bottom-nav {
    width: calc(100vw - 148px);
  }

  .bottom-nav button {
    font-size: 10px;
  }

  .fixed-asset-card {
    min-height: 176px;
    padding: 12px;
  }

  .fixed-detail-hero {
    grid-template-columns: auto 1fr;
  }

  .fixed-detail-hero__cost {
    grid-column: 1 / -1;
    justify-items: start;
    padding-top: 10px;
    border-top: 1px solid rgba(23, 27, 24, 0.1);
  }

  .sale-result-card {
    grid-template-columns: 1fr;
  }
}

html,
body {
  overflow-x: hidden;
}

@media (max-width: 640px) {
  .wish-list {
    grid-template-columns: 1fr;
  }

  .wish-card {
    width: 100%;
  }

  .wish-card__head p {
    overflow-wrap: anywhere;
  }

  .wish-card__numbers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wish-card__numbers > div:last-child {
    grid-column: auto;
  }

  .wish-card__numbers strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wish-card__actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wish-card__actions .primary-button,
  .wish-card__actions .secondary-button {
    white-space: nowrap;
  }
}
