/* Quiet hierarchy, grouped content and a single primary value per screen. */
:root {
  --page: #f5f5f7;
  --accent: #007aff;
  --accent-soft: #eaf2ff;
  --accent-ink: #fff;
  --radius-lg: 20px;
  --radius-md: 16px;
  --wa-font-family-body:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Helvetica Neue", sans-serif;
}
:root[data-mode="dark"] {
  --page: #000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --ink: #f5f5f7;
  --ink-soft: #b8b8be;
  --ink-mute: #9999a2;
  --line: #38383a;
  --accent: #0a84ff;
  --accent-soft: #182c42;
  --accent-ink: #fff;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  -webkit-appearance: none;
}
button:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
input[type="checkbox"] {
  appearance: auto;
  accent-color: var(--blue);
}
.planner-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(16px + var(--safe-top)) 24px 16px;
  flex-shrink: 0;
  gap: 12px;
}
.planner-nav h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 6px 0 0;
  font-weight: 720;
}
.date-line {
  font-size: 13px;
  margin: 0;
  gap: 8px;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--blue);
  font-size: 23px;
  flex-shrink: 0;
}
.icon-button:disabled {
  opacity: 0.25;
}
.icon-button:active {
  background: var(--surface-2);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.planner-nav .nav-actions i {
  width: auto;
  height: auto;
  color: inherit;
  font-size: 22px;
}
.planner-scroll {
  min-height: 0;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
  padding: 0 24px 28px;
  scrollbar-width: thin;
}
.cash-hero {
  padding: 17px 0 30px;
}
.eyebrow {
  display: block;
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
}
.cash-number {
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: -1.8px;
  font-weight: 690;
  font-variant-numeric: tabular-nums;
  margin: 9px 0 8px;
  overflow-wrap: anywhere;
}
.balance-breakdown {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  min-height: 32px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: left;
}
.planner-muted {
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-mute);
  margin: 8px 0 14px;
}
.planner-warning {
  display: block;
  color: var(--warn);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
}
.negative {
  color: var(--red) !important;
}
.planner-section {
  margin: 0 0 25px;
}
.section-head {
  margin: 0 0 8px;
  min-height: 30px;
}
.section-head h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.2px;
}
.section-head > span {
  font-size: 13px;
}
.text-button {
  font-size: 14px;
  color: var(--blue);
  min-height: 36px;
  gap: 3px;
}
.text-button i {
  font-size: 15px;
}
.planner-group {
  border-radius: 17px;
  background: var(--surface);
  overflow: hidden;
}
.planner-row {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  min-height: 73px;
  text-align: left;
  background: none;
  border: 0;
}
.planner-row:not(:last-child):after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 56px;
  right: 0;
  height: 0.5px;
  background: var(--line);
}
.planner-row:active {
  background: var(--surface-2);
}
.planner-icon {
  width: 28px;
  font-size: 22px;
  display: grid;
  place-items: center;
  color: var(--blue);
  flex-shrink: 0;
}
.planner-info {
  flex: 1;
  min-width: 0;
}
.planner-info strong {
  display: block;
  font-size: 15px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.planner-info small {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 5px;
  color: var(--ink-mute);
  overflow-wrap: anywhere;
}
.planner-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 550;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.planner-value i {
  font-size: 13px;
  color: var(--ink-mute);
  font-weight: 400;
}
.quiet-empty {
  padding: 20px 17px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-mute);
}
.planner-foot {
  font-size: 12px;
  line-height: 1.8;
  color: var(--ink-mute);
  margin: 4px 0 14px;
}
.planner-primary,
.planner-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 550;
  padding: 12px 20px;
  background: var(--blue);
  color: #fff;
}
.planner-primary:disabled {
  opacity: 0.5;
}
.cash-hero .planner-primary {
  margin-top: 17px;
}
.planner-secondary {
  background: var(--surface-2);
  color: var(--blue);
  width: 100%;
}
.forecast-brief {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 12px;
}
.forecast-brief strong {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cash-chart {
  margin: 6px 0 0;
}
.cash-chart svg {
  display: block;
  width: 100%;
  height: 90px;
}
.chart-dates {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-mute);
}
.planner-group .tx-row {
  margin: 0 16px;
  padding: 14px 0;
  min-height: 76px;
}
.tx-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 18px;
}
.tx-title {
  font-size: 15px;
}
.tx-sub {
  font-size: 12px;
  line-height: 1.5;
}
.tx-amount {
  font-size: 16px;
  font-weight: 550;
}
.ledger-tabs {
  display: flex;
  margin: 0 24px 18px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 10px;
  gap: 3px;
  flex-shrink: 0;
}
.ledger-tabs button {
  flex: 1;
  font-size: 14px;
  background: transparent;
  border: 0;
  border-radius: 7px;
  min-height: 36px;
}
.ledger-tabs button[aria-selected="true"] {
  background: var(--surface);
  box-shadow: 0 1px 3px #0001;
  font-weight: 600;
}
.ledger-month {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 23px;
}
.ledger-month span {
  display: block;
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 7px;
}
.ledger-month strong {
  font-size: 15px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.ledger-month > div:first-child strong {
  font-size: 23px;
  font-weight: 650;
}
.ledger-caption {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-mute);
}
.list-section {
  padding: 0;
}
.list-date {
  font-size: 12px;
}
.planner-scroll #txList {
  margin-top: 3px;
}
.asset-summary {
  padding: 14px 0 30px;
}
.asset-summary > strong {
  display: block;
  font-size: 41px;
  font-weight: 680;
  letter-spacing: -1.1px;
  margin: 10px 0 13px;
  font-variant-numeric: tabular-nums;
}
.asset-summary > div {
  display: flex;
  gap: 22px;
  font-size: 13px;
  color: var(--ink-soft);
  flex-wrap: wrap;
}
.settled-debts > summary {
  font-size: 14px;
  color: var(--ink-mute);
  padding: 4px 0 16px;
  cursor: pointer;
}
.planner-notice {
  display: block;
  border: 0;
  width: 100%;
  border-radius: 10px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 13px;
  text-align: center;
  padding: 10px 12px;
  margin: 0 0 9px;
}
.tabbar {
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}
.tab-item {
  min-height: 46px;
}
.tab-item span {
  font-size: 11px;
  margin-top: 3px;
}
.tab-item i {
  font-size: 23px;
}
.fab {
  margin: 0 4px 0 12px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: none;
}
.compose-body {
  position: relative;
}
.compose-close {
  position: absolute;
  top: 9px;
  right: 11px;
  z-index: 2;
  color: var(--ink-mute);
}
.compose-body .quick-card {
  margin: 0;
  border: 0;
  box-shadow: none;
  padding: 25px 24px 20px;
}
.compose-body .section-head {
  padding-right: 38px;
  margin-bottom: 20px;
}
.compose-body .section-head h2 {
  font-size: 20px;
}
.compose-body .quick-hint {
  font-size: 13px;
}
.compose-body .quick-keypad button {
  font-size: 25px;
  min-height: 52px;
}
.compose-body .quick-preview {
  font-size: 14px;
}
.compose-body #quickSave {
  width: 100%;
}
.sheet {
  border-radius: 24px 24px 0 0;
}
.sheet-title {
  font-size: 18px;
}
.sheet-body {
  font-size: 15px;
}
.sheet-desc {
  font-size: 14px;
}
.opt {
  font-size: 16px;
  min-height: 54px;
}
.btn-solid,
.btn-ghost {
  font-size: 16px;
  min-height: 46px;
}
.planner-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.planner-form > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}
.planner-form input,
.planner-form select {
  width: 100%;
  min-width: 0;
  font-size: 16px;
  min-height: 47px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  background: var(--surface-2);
  color: var(--ink);
}
.planner-form input[readonly] {
  color: var(--ink-mute);
}
.planner-form > .form-check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 36px;
}
.form-check input {
  width: 20px;
  min-height: 20px;
  height: 20px;
}
.form-error {
  margin: 0;
  color: var(--red);
  font-size: 14px;
}
.planner-form .planner-primary {
  width: 100%;
}
.planner-form .planner-muted {
  margin: 0 0 2px;
}
.breakdown > div,
.forecast-days > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.breakdown strong,
.forecast-days strong {
  font-size: 15px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.breakdown .breakdown-total {
  font-size: 17px;
  border: 0;
  margin-top: 5px;
}
.breakdown-total strong {
  font-size: 22px;
}
.bill-detail {
  padding: 8px 0 18px;
}
.bill-detail > strong {
  display: block;
  font-size: 38px;
  font-weight: 650;
  margin: 10px 0;
}
.bill-detail p {
  font-size: 14px;
  color: var(--ink-mute);
}
.date-quick {
  display: flex;
  gap: 9px;
  margin-bottom: 18px;
}
.date-quick button {
  min-height: 44px;
  flex: 1;
  border: 0;
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 15px;
}
.date-quick button.selected,
.date-days button.selected {
  background: var(--blue);
  color: #fff;
}
.date-month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.date-month input {
  font-size: 17px;
  font-weight: 600;
  width: 160px;
  min-height: 44px;
  text-align: center;
  padding: 0 5px;
  background: none;
  border: 0;
}
.date-week,
.date-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}
.date-week {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.date-days button {
  font-size: 17px;
  min-height: 44px;
  aspect-ratio: 1;
  max-height: 48px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  justify-self: center;
  width: 44px;
  padding: 0;
}
.date-days button:disabled {
  color: var(--ink-mute);
  opacity: 0.25;
}
.date-days button.today:not(.selected) {
  color: var(--blue);
  font-weight: 700;
}
.date-pick-help {
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
  margin: 12px 0 18px;
}
.date-time {
  border-top: 1px solid var(--line);
}
.date-time summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  padding: 16px 0;
  cursor: pointer;
}
.date-time summary span {
  display: flex;
  gap: 8px;
  color: var(--ink-mute);
}
.date-time > div {
  display: flex;
  gap: 15px;
  align-items: center;
}
.date-time input {
  font-size: 17px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 10px;
}
.finance-action {
  padding: 12px 14px;
  border-radius: 13px;
  margin: 8px 0;
}
.finance-action h3 {
  font-size: 15px;
  margin: 6px 0;
}
.finance-action > strong {
  font-size: 24px;
}
.finance-action p {
  font-size: 13px;
  line-height: 1.55;
  margin: 5px 0;
}
.action-state {
  font-size: 11px;
}
.action-due {
  padding: 7px 0;
  font-size: 12px;
}
.action-buttons {
  margin-top: 8px;
  padding-top: 8px;
}
.action-buttons button {
  font-size: 13px;
  min-height: 34px;
}
.debt-total {
  padding: 0 0 20px;
  background: none;
}
.debt-total > strong {
  font-size: 36px;
}
.plan-title > strong {
  font-size: 34px;
}
.finance-foot {
  font-size: 12px;
}
.assistant-payroll {
  display: none;
}
.assistant-tools {
  display: none;
}
.brand-dot {
  display: none;
}
@media (min-width: 760px) {
  #app {
    max-width: 920px;
  }
  .planner-nav {
    padding-left: 40px;
    padding-right: 40px;
  }
  .planner-scroll {
    padding-left: 40px;
    padding-right: 40px;
  }
  .planner-section {
    margin-bottom: 30px;
  }
  .cash-hero {
    padding-top: 25px;
  }
  .cash-number {
    font-size: 56px;
  }
  .ledger-tabs {
    margin-left: 40px;
    margin-right: 40px;
  }
  .view-entry {
    left: 0;
    right: 0;
  }
  .compose-body {
    max-width: 480px;
  }
  .planner-row {
    min-height: 78px;
  }
  .tabbar {
    justify-content: center;
    gap: 35px;
  }
  .tab-item {
    flex: 0 1 145px;
  }
  .cash-chart svg {
    height: 110px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
@media (min-width: 900px) {
  .tabbar {
    justify-content: flex-start;
    gap: 6px;
    padding: 36px 16px;
  }
  .tabbar::before {
    margin-bottom: 22px;
  }
  .tab-item {
    flex: 0 0 auto;
    height: 52px;
    min-height: 52px;
    width: 100%;
  }
  .tab-item span {
    font-size: 14px;
  }
  .fab {
    width: 100%;
    height: 46px;
    min-height: 46px;
    border-radius: 12px;
    margin: 18px 0 0;
  }
  .fab::after {
    font-size: 14px;
  }
  .view-entry,
  .sheet-mask,
  .view-lock {
    left: 0;
    right: 0;
  }
}
@media (max-width: 359px) {
  .planner-nav {
    padding-left: 18px;
    padding-right: 18px;
  }
  .planner-scroll {
    padding-left: 18px;
    padding-right: 18px;
  }
  .ledger-tabs {
    margin-left: 18px;
    margin-right: 18px;
  }
  .cash-number {
    font-size: 41px;
  }
  .planner-row {
    gap: 8px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .planner-value {
    font-size: 14px;
  }
  .date-days button {
    width: 38px;
    min-height: 44px;
    aspect-ratio: auto;
  }
}
/* Amount is the only required input. */
.simple-amount-label{font-size:14px;color:var(--ink-mute)}
.simple-amount{display:flex;align-items:center;gap:10px;padding:12px 0 22px;font-size:30px;color:var(--ink)}
.planner-form .simple-amount input{border:0;border-radius:0;background:none;box-shadow:none;font-size:42px;font-weight:650;padding:0;min-height:58px;width:100%;letter-spacing:-1px}
.simple-date{border-top:1px solid var(--line)}
.simple-date summary{display:flex;align-items:center;justify-content:space-between;min-height:48px;font-size:14px;cursor:pointer;color:var(--ink-soft)}
.simple-date summary>span{display:flex;gap:8px;color:var(--ink-mute)}
.simple-date input{margin-bottom:12px}
.simple-repay{width:100%;margin-top:12px}
#view-entry .entry-body{padding-top:4px}
#view-entry .entry-amount{padding-top:26px;padding-bottom:28px}
#view-entry .util-row{justify-content:flex-end;gap:12px}
#view-entry .entry-guess,#view-entry .cat-strip-wrap,#accountChip{display:none!important}
#view-entry .keypad{margin-top:20px}
#view-entry .entry-submit wa-button{width:100%}
#quickHint{font-size:13px;color:var(--ink-mute)}
#quickPreview,#quickSuggestions{display:none!important}
.debt-total{padding:12px 0 30px}.debt-total>strong{font-size:44px;letter-spacing:-1.3px}.liability-card{min-height:68px;padding:16px;border-radius:0;border:0;border-bottom:1px solid var(--line);background:var(--surface)}.liability-info strong{font-size:16px}.liability-info span{font-size:13px}.liability-balance{font-size:18px;font-weight:550}.liability-list{gap:0;border-radius:16px;overflow:hidden}.liability-card:last-child{border-bottom:0}
