.rig {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
  }

.phone {
    width: 375px;
    height: 780px;
    border-radius: 44px;
    background: var(--ink);
    padding: 12px;
    box-shadow: var(--shadow);
    position: relative;
  }

.phone-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--paper);
    border-radius: 34px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

.statusbar {
    height: 46px;
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0 22px 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: var(--paper);
  }

.screens {
    flex: 1 1 auto;
    position: relative;
    overflow: hidden;
  }

.screen {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    padding: 0 20px 100px;
    display: none;
  }

.screen.active { display: block; }

.screen::-webkit-scrollbar { width: 0; }

.screen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 8px;
    position: sticky;
    top: 0;
    background: var(--paper);
    z-index: 5;
  }

.screen-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.header-balance-btn {
    all: unset;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
    border-radius: 8px;
  }

.icon-btn {
    all: unset;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }

.capture-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d03b3b;
    border: 1.5px solid var(--paper);
  }

.tabbar {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
    z-index: 10;
    display: flex;
    background: var(--glass-bg);
    border-radius: 999px;
    padding: 6px;
  }

.tab {
    all: unset;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 0;
    cursor: pointer;
    color: var(--muted);
    border-radius: 12px;
  }

.tab i { font-size: 22px; }

.tab span { display: none; }

.tab.active { color: var(--accent-strong); }

.future-plans-pull {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 2px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: opacity 0.28s ease;
    animation: future-pull-hint 2.6s ease-in-out infinite;
  }

@keyframes future-pull-hint {
  0%, 55%, 100% { transform: translateY(0); }
  15% { transform: translateY(4px); }
  30% { transform: translateY(0); }
  40% { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .future-plans-pull { animation: none; }
}

.future-plans-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
    transition: color 0.15s ease;
  }

.day-label {
    position: sticky;
    top: 52px;
    z-index: 4;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    background: var(--paper);
    padding: 5px 20px 8px;
    margin: 12px -20px 0;
  }

.tx-list { display: flex; flex-direction: column; gap: 2px; }

.tx-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 -20px;
    padding: 8px 20px;
  }

.tx-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-strong);
  }

.tx-mid { flex: 1 1 auto; min-width: 0; }

.tx-mid .name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

.tx-mid .tx-from-account { color: var(--muted); margin-top: 2px; }

.tx-detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
  }

.tx-detail i { width: 11px; text-align: center; flex: 0 0 auto; font-size: 9.5px; }

.tx-detail.tx-note { min-width: 0; }

.tx-detail.tx-note span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tx-amt-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; }

.tx-amt { font-size: 14px; font-weight: 600; color: var(--ink); }

.tx-amt.pos { color: rgb(12, 163, 12); }

.tx-time { font-size: 11px; font-weight: 400; color: var(--muted); }

.tx-amt-sent { color: var(--muted); }

.tabular { font-variant-numeric: tabular-nums; }

.settings-group-label {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin: 16px 0 8px;
  }

.acct-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

.acct-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 -20px;
    padding: 7px 20px;
    cursor: pointer;
  }

.acct-icon {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent-strong);
    flex: 0 0 auto;
  }

.acct-mid { flex: 1 1 auto; min-width: 0; }

.acct-mid .name { font-size: 14.5px; font-weight: 600; }

.acct-mid .meta { font-size: 12px; color: var(--muted); margin-top: 1px; }

.acct-amt { font-size: 15px; font-weight: 600; }

.acct-amt.neg { color: rgb(208, 59, 59); }

.debts-card { display: flex; flex-direction: column; gap: 5px; }

.ledger-group { display: flex; flex-direction: column; gap: 0; }

.ledger-group.owe .ledger-amt { color: rgb(208, 59, 59); }

.ledger-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 4px; }

.ledger-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -20px;
    padding: 6px 20px;
    cursor: pointer;
  }

.ledger-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }

.ledger-person {
    font-size: 14.5px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

.ledger-amt { flex: 0 0 auto; }

.ledger-amt { font-size: 15px; font-weight: 600; }

.cat-tree { margin-top: 2px; }

.cat-tree-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 4px;
    border-radius: 12px;
  }

.cat-children {
    margin-left: 15px;
    border-left: 1px solid var(--line);
    padding-left: 3px;
    overflow: hidden;
    max-height: 1000px;
    transition: max-height 0.2s ease;
  }

.drag-handle {
    color: var(--muted);
    opacity: 0.55;
    flex: 0 0 auto;
    cursor: grab;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
  }

.tree-chevron {
    all: unset;
    flex: 0 0 auto;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    cursor: pointer;
    transition: transform 0.15s ease;
  }

.tree-icon {
    width: 28px; height: 28px;
    border-radius: 9px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 auto;
  }

.tree-name {
    flex: 1 1 auto;
    font-size: 13.5px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

.tree-actions { display: flex; gap: 1px; flex: 0 0 auto; }

.tree-action {
    all: unset;
    cursor: pointer;
    width: 30px; height: 30px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
  }

.tree-spacer { flex: 0 0 auto; width: 22px; height: 22px; }

.tree-action-spacer { display: block; width: 30px; height: 30px; flex: 0 0 auto; }

.sub-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0 10px;
    position: sticky;
    top: 0;
    background: var(--paper);
    z-index: 5;
  }

.back-btn {
    all: unset;
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink);
    background: var(--surface);
    border: none;
    flex: 0 0 auto;
  }

.sub-header h2 { flex: 1 1 auto; margin: 0; font-size: 18px; letter-spacing: -0.01em; min-width: 0; }

.show-archived-btn {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 2px 2px;
    padding: 6px 2px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
  }

.depth-note {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    margin: 14px 6px 4px;
    line-height: 1.5;
  }

.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }

.stat-tile { padding: 0; }

.stat-tile .k {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

.stat-tile .k i { font-size: 10px; }

.stat-tile .v {
    font-size: 22px;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

.stat-tile.income .k i { color: rgb(12, 163, 12); }

.stat-tile.income .v { color: rgb(12, 163, 12); }

.stat-tile.expense .k i { color: rgb(208, 59, 59); }

.stat-tile.expense .v { color: rgb(208, 59, 59); }

.section-title {
    font-size: 13px;
    font-weight: 700;
    margin: 16px 2px 8px;
    display: flex;
    justify-content: space-between;
    color: var(--ink);
  }

.cat-row { box-sizing: border-box; min-height: 44px; padding: 10px 20px; margin: 0 -20px; border-radius: 12px; display: flex; flex-direction: column; justify-content: center; }

.cat-row.drillable { cursor: pointer; }

.cat-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; margin-bottom: 5px; }

.cat-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; font-size: 13px; color: var(--muted); flex: 0 0 auto; }

.cat-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.cat-track { height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }

.cat-track > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }

.cat-head .nums { color: var(--muted); }

.cat-head .nums b { color: var(--ink); font-weight: 700; }

.section-title:has(+ .trend) { margin-bottom: 32px; }

.trend {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 60px;
    padding: 8px 4px 0;
  }

.trend .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }

.trend .bar .col { width: 100%; border-radius: 6px 6px 3px 3px; background: var(--accent-soft); }

.trend .bar.now .col { background: var(--accent); }

.trend .bar .m { font-size: 10.5px; color: var(--muted); }

.month-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%; }

.month-label {
    justify-self: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
  }

.month-nav-btn {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
  }

.month-nav-btn[data-dash-month-prev] { justify-self: start; }

.month-nav-btn[data-dash-month-next] { justify-self: end; }

.month-nav-btn i { font-size: 13px; }

.month-nav-btn:disabled { opacity: 0.35; cursor: default; }

.tree-icon i { font-size: 14px; }

.drag-handle i { font-size: 13px; }

.tree-chevron i { font-size: 14px; }

.tree-action i { font-size: 16px; }

.fab {
    position: absolute;
    right: 20px;
    bottom: 72px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 20;
  }

.fab i { font-size: 22px; }

.io-compare { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }

.io-bar-row { display: flex; align-items: center; gap: 8px; }

.io-bar-label { font-size: 11px; font-weight: 600; color: var(--muted); width: 52px; flex: 0 0 auto; }

.io-bar-track { flex: 1 1 auto; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }

.io-bar { display: block; height: 100%; border-radius: 999px; background: var(--ink); }

.io-bar.income { background: var(--accent-strong); }

.segmented {
    display: flex;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 12px;
  }

[data-dash-kind-toggle] { background: var(--surface-2); margin-top: 20px; }

.segmented button {
    all: unset;
    flex: 1;
    text-align: center;
    padding: 7px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-radius: 9px;
    cursor: pointer;
  }

.segmented button.active { background: var(--accent-strong); color: var(--paper); }

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 4px;
  }

.heat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 4px; }

.heat-day {
    all: unset;
    box-sizing: border-box;
    position: relative;
    cursor: pointer;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
  }

.heat-day-blank { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); opacity: 0.5; }

.heat-day-num {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
  }

.heat-detail {
    margin: 8px 0 4px;
    min-height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12.5px;
  }

.heat-detail-empty { margin: 0; color: var(--muted); }

