:root {
  --terracotta-900: #5C1F0F;
  --terracotta-800: #8C3A28;
  --terracotta-700: #A84535;
  --terracotta-600: #BF5540;
  --terracotta-200: #F5CEBC;
  --terracotta-100: #FBE9E1;
  --terracotta-50: #FEF5F2;
  --amber-500: #D4915A;
  --amber-100: #F5E6D3;
  --amber-50: #FCF6EE;
  --sand-300: #E8D4BF;
  --sand-200: #F0E2D2;
  --sand-100: #F7EDE0;
  --sand-50: #FBF3EA;
  --bg: #FDF8F3;
  --surface: #FFFFFF;
  --text-1: #2A1A12;
  --text-2: #6B4C3E;
  --text-3: #A87D6E;
  --text-4: #C9A898;
  --income: #3E8A5E;
  --income-bg: #EEF8F3;
  --savings: #4A6FA5;
  --savings-bg: #EEF3FB;
  --card-shadow: 0 2px 8px rgba(42, 26, 18, 0.07);
  --elevated-shadow: 0 4px 16px rgba(42, 26, 18, 0.11);
  --overlay-shadow: 0 8px 32px rgba(42, 26, 18, 0.18);
  --fab-shadow: 0 4px 20px rgba(191, 85, 64, 0.35);
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "DM Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: 0;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  appearance: textfield;
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.workspace {
  min-height: inherit;
}

.workspace-main {
  min-width: 0;
}

.desktop-sidebar {
  display: none;
}

@media (min-width: 540px) {
  body {
    background: var(--sand-300);
    padding: 24px 0;
  }

  .app-shell {
    min-height: min(900px, calc(100dvh - 48px));
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(42, 26, 18, 0.08), 0 24px 64px rgba(42, 26, 18, 0.22);
  }
}

@media (min-width: 900px) {
  body {
    padding: 20px;
    background: var(--sand-200);
  }

  .app-shell {
    max-width: 1280px;
    height: calc(100dvh - 40px);
    min-height: 680px;
    border-radius: 20px;
    box-shadow: 0 0 0 1px rgba(42, 26, 18, 0.08), 0 18px 54px rgba(42, 26, 18, 0.16);
  }

  .workspace {
    height: 100%;
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .workspace-main {
    height: 100%;
    overflow: auto;
    background: var(--bg);
  }

  .desktop-sidebar {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 24px 16px 18px;
    background: var(--surface);
    border-right: 1px solid var(--sand-200);
  }

  .desktop-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 0 6px 22px;
  }

  .desktop-brand-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: white;
    background: var(--terracotta-600);
    font-family: var(--font-display);
    font-size: 24px;
  }

  .desktop-brand strong,
  .desktop-brand span {
    display: block;
    min-width: 0;
  }

  .desktop-brand strong {
    font-size: 14px;
  }

  .desktop-brand span {
    margin-top: 2px;
    color: var(--text-3);
    font-size: 10px;
  }

  .desktop-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 18px;
  }

  .desktop-add span {
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
  }

  .desktop-nav {
    display: grid;
    gap: 4px;
  }

  .desktop-nav-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 0 12px;
    color: var(--text-2);
    background: transparent;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    cursor: pointer;
  }

  .desktop-nav-item:hover {
    background: var(--sand-50);
  }

  .desktop-nav-item.active {
    color: var(--terracotta-800);
    background: var(--terracotta-100);
  }

  .desktop-nav-icon {
    width: 20px;
    color: currentColor;
    font-size: 18px;
    text-align: center;
  }

  .desktop-sidebar-status {
    margin-top: auto;
    display: grid;
    grid-template-columns: 8px 1fr;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-2);
    background: var(--sand-50);
    font-size: 11px;
    font-weight: 700;
  }

  .desktop-sidebar-status small {
    grid-column: 2;
    color: var(--text-3);
    font-size: 9px;
  }

  .online-dot,
  .offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--income);
  }

  .offline-dot {
    background: var(--amber-500);
  }

  .screen {
    min-height: 100%;
    padding-bottom: 44px;
  }

  .top-pad {
    padding: 32px 34px 0;
  }

  .screen-title {
    font-size: 25px;
  }

  .balance {
    font-size: 48px;
  }

  .home-action-card,
  .install-banner,
  .setup-card {
    margin-left: 34px;
    margin-right: 34px;
  }

  .home-action-card {
    max-width: 540px;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr);
  }

  .summary-grid {
    padding: 24px 34px 6px;
    gap: 12px;
  }

  .summary-card {
    min-height: 88px;
    padding: 16px;
  }

  .summary-amount {
    font-size: 15px;
  }

  .chip-row,
  .tabs {
    padding-left: 34px;
    padding-right: 34px;
  }

  .section-head {
    padding-left: 34px;
    padding-right: 34px;
  }

  .card {
    margin-left: 34px;
    margin-right: 34px;
  }

  .wallet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 34px;
    padding-right: 34px;
  }

  .wallet-card {
    min-height: 142px;
  }

  .sheet-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .bottom-nav {
    display: none;
  }

  .bottom-sheet {
    top: 50%;
    bottom: auto;
    width: min(560px, calc(100% - 48px));
    max-width: 560px;
    max-height: min(820px, calc(100dvh - 48px));
    transform: translate(-50%, -50%);
    border-radius: 20px;
    padding-bottom: 12px;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-title-row {
    padding: 24px 24px 16px;
  }

  .toast {
    bottom: 28px;
  }
}

.boot-screen,
.pin-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}

.brand-mark {
  width: 74px;
  height: 74px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: var(--terracotta-600);
  color: white;
  font-family: var(--font-display);
  font-size: 42px;
  box-shadow: var(--fab-shadow);
}

.boot-title {
  margin-top: 16px;
  font-weight: 700;
  font-size: 24px;
}

.boot-copy,
.muted {
  color: var(--text-3);
  font-size: 13px;
}

.screen {
  min-height: 100dvh;
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
}

.top-pad {
  padding: 22px 20px 0;
}

.screen-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.15;
}

.screen-subtitle {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 12px;
}

.balance {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
  margin-top: 10px;
  letter-spacing: 0;
  color: var(--text-1);
  overflow-wrap: anywhere;
}

.balance-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.currency-line {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}

.currency-line small {
  color: currentColor;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 800;
  opacity: 0.62;
}

.home-action-card {
  margin: 16px 16px 0;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 10px;
  background: white;
  border-radius: 18px;
  box-shadow: var(--card-shadow);
}

.home-add-button,
.home-sync-button {
  width: 100%;
}

.home-sync-button {
  color: var(--text-2);
  background: var(--sand-50);
}

.row {
  display: flex;
  align-items: center;
}

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

.stack {
  display: flex;
  flex-direction: column;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 18px 16px 4px;
}

.summary-card {
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}

.summary-card.income {
  background: var(--income-bg);
  color: var(--income);
}

.summary-card.expense {
  background: var(--terracotta-50);
  color: var(--terracotta-600);
}

.summary-card.net {
  background: var(--amber-50);
  color: var(--amber-500);
}

.summary-label,
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-amount {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-amount-list {
  display: grid;
  gap: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.section-head {
  padding: 18px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
}

.text-action {
  color: var(--terracotta-600);
  background: transparent;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.card {
  margin: 0 16px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.card-pad {
  padding: 16px;
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 4px;
  scrollbar-width: none;
}

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

.chip,
.pill-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 9999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  background: var(--sand-50);
  color: var(--text-2);
  border: 1.5px solid var(--sand-300);
  cursor: pointer;
  white-space: nowrap;
}

.chip.active,
.pill-button.active {
  color: white;
  background: var(--terracotta-600);
  border-color: var(--terracotta-600);
}

.wallet-chip.active {
  background: var(--text-1);
  border-color: var(--text-1);
}

.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--sand-200);
  cursor: pointer;
}

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

.tx-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--sand-50);
  font-size: 19px;
  flex: 0 0 auto;
}

.tx-icon.income {
  background: var(--income-bg);
}

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

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

.tx-meta {
  margin-top: 2px;
  color: var(--text-3);
  font-size: 11px;
}

.tx-amount {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--terracotta-600);
}

.tx-amount.income {
  color: var(--income);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  background: white;
  box-shadow: 0 -2px 16px rgba(42, 26, 18, 0.09);
  border-radius: 20px 20px 0 0;
  padding: 8px 10px calc(12px + env(safe-area-inset-bottom));
}

@media (min-width: 540px) {
  .bottom-nav {
    position: absolute;
  }
}

.nav-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: transparent;
  color: var(--text-4);
  padding: 6px 4px;
  cursor: pointer;
  min-width: 0;
  min-height: 58px;
}

.nav-emoji {
  font-size: 22px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
}

.nav-item.active {
  color: var(--terracotta-600);
}

.nav-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.nav-add {
  padding-top: 0;
  transform: translateY(-1px);
}

.fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--terracotta-600);
  color: white;
  display: grid;
  place-items: center;
  margin: -30px auto 0;
  box-shadow: var(--fab-shadow);
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

.nav-add .nav-label {
  color: var(--terracotta-600);
  font-weight: 800;
}

.sheet-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(42, 26, 18, 0.42);
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow: auto;
  z-index: 101;
  background: white;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 32px rgba(42, 26, 18, 0.15);
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  margin: 12px auto 8px;
  background: var(--sand-300);
}

.sheet-section {
  padding: 0 20px 14px;
}

.sheet-title-row {
  padding: 0 20px 16px;
}

.form-label {
  display: block;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1.5px solid var(--sand-300);
  background: var(--sand-50);
  color: var(--text-1);
  border-radius: 12px;
  outline: 0;
  padding: 12px 14px;
  font-size: 15px;
}

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

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--terracotta-600);
  background: white;
  box-shadow: 0 0 0 3px rgba(191, 85, 64, 0.12);
}

.amount-input {
  width: 100%;
  text-align: center;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  padding: 0;
}

.amount-wrap {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  align-items: center;
  min-height: 76px;
  border-radius: 20px;
  background: var(--sand-50);
  border: 1.5px solid var(--sand-200);
  padding: 6px 10px;
}

.amount-currency {
  justify-self: start;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.currency-help {
  margin-top: 7px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.4;
}

.currency-code {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--text-3);
  background: var(--sand-50);
  font-size: 9px;
  font-weight: 800;
  vertical-align: 1px;
}

.sheet-actions {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  background: linear-gradient(to top, white 82%, rgba(255, 255, 255, 0));
}

.type-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: var(--sand-200);
}

.type-toggle button {
  border-radius: 10px;
  background: transparent;
  color: var(--text-3);
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.type-toggle button.active {
  background: white;
  color: var(--terracotta-600);
  box-shadow: 0 1px 4px rgba(42, 26, 18, 0.1);
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  color: white;
  background: var(--terracotta-600);
  box-shadow: 0 4px 16px rgba(191, 85, 64, 0.25);
}

.primary-button:disabled {
  color: var(--text-4);
  background: var(--sand-300);
  box-shadow: none;
  cursor: not-allowed;
}

.secondary-button {
  color: var(--terracotta-800);
  background: var(--terracotta-100);
}

.ghost-button {
  color: var(--text-2);
  background: transparent;
  border: 1.5px solid var(--sand-300);
}

.danger-button {
  color: white;
  background: var(--terracotta-700);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.wallet-grid {
  display: grid;
  gap: 12px;
  padding: 0 16px;
}

.wallet-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 18px;
}

.wallet-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  background: var(--amber-50);
  color: var(--terracotta-800);
}

.wallet-balance {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sand-200);
}

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

.bar-track {
  height: 8px;
  background: var(--sand-200);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--terracotta-600);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
}

.tab {
  flex: 1;
  border-radius: 12px;
  padding: 10px 8px;
  background: transparent;
  border: 1.5px solid var(--sand-300);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.tab.active {
  background: var(--text-1);
  border-color: var(--text-1);
  color: white;
}

.pin-card {
  width: 100%;
  max-width: 340px;
  background: white;
  border-radius: 24px;
  padding: 26px 22px 22px;
  box-shadow: var(--elevated-shadow);
}

.pin-status-pill {
  width: fit-content;
  margin: 14px auto 8px;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--terracotta-800);
  background: var(--terracotta-100);
  font-size: 11px;
  font-weight: 800;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0;
}

.pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sand-300);
}

.pin-dot.filled {
  background: var(--terracotta-600);
}

.pin-error {
  margin: -6px 0 14px;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--terracotta-800);
  background: var(--terracotta-50);
  border: 1px solid var(--terracotta-200);
  font-size: 12px;
  font-weight: 700;
}

.pin-help {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.45;
}

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

.pin-key {
  height: 54px;
  border-radius: 16px;
  background: var(--sand-50);
  color: var(--text-1);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 420px) {
  .top-pad {
    padding-left: 18px;
    padding-right: 18px;
  }

  .summary-grid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .summary-card {
    padding: 10px 8px;
  }

  .summary-amount {
    font-size: 12px;
  }

  .home-action-card {
    margin-left: 14px;
    margin-right: 14px;
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    padding-left: 8px;
    padding-right: 8px;
  }

  .nav-label {
    font-size: 9px;
  }
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 111;
  width: min(440px, calc(100% - 32px));
  max-height: 86dvh;
  overflow: auto;
  background: white;
  border-radius: 22px;
  box-shadow: var(--overlay-shadow);
  padding: 18px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 140;
  width: min(420px, calc(100% - 32px));
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--text-1);
  color: white;
  box-shadow: var(--overlay-shadow);
  font-size: 13px;
}

.empty {
  padding: 28px 20px;
  color: var(--text-4);
  text-align: center;
  font-size: 14px;
}

.danger-zone {
  border: 1.5px solid var(--terracotta-200);
  background: var(--terracotta-50);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.install-banner {
  margin: 14px 16px 0;
  background: var(--terracotta-50);
  border: 1px solid var(--terracotta-200);
  color: var(--terracotta-800);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.setup-card {
  margin: 16px 16px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--terracotta-50);
  border: 1px solid var(--terracotta-200);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
  padding: 10px 0 0;
}

.chart-bar {
  flex: 1;
  min-width: 12px;
  border-radius: 6px 6px 0 0;
  background: var(--savings);
}

.nowrap {
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.family-sharing-card {
  border: 1px solid var(--sand-200);
}

.share-link {
  margin-top: 10px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border-radius: 8px;
  color: var(--text-2);
  background: var(--sand-50);
  font-family: var(--font-mono);
  font-size: 11px;
}

.share-wallet-grid,
.share-options {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.share-wallet {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--sand-200);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.share-wallet input,
.share-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--terracotta-600);
}

.share-wallet span {
  font-size: 13px;
  font-weight: 700;
}

.share-wallet small {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
}

.share-toggle {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--sand-100);
  cursor: pointer;
}

.share-toggle:first-child {
  padding-top: 0;
}

.share-toggle:last-child {
  border-bottom: 0;
}

.share-toggle strong,
.share-toggle small {
  display: block;
}

.share-toggle strong {
  font-size: 13px;
}

.share-toggle small {
  margin-top: 3px;
  color: var(--text-3);
  font-size: 10px;
  line-height: 1.35;
}

.viewer-preview {
  margin-top: 16px;
}

.preview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.viewer-badge {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--income);
  background: var(--income-bg);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-warning {
  margin: 12px 0 0;
}

@media (min-width: 720px) {
  .share-wallet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .screen {
    min-height: 100%;
    padding-bottom: 44px;
  }

  .top-pad {
    padding: 32px 34px 0;
  }

  .screen-title {
    font-size: 25px;
  }

  .balance {
    font-size: 48px;
  }

  .home-action-card,
  .install-banner,
  .setup-card {
    margin-left: 34px;
    margin-right: 34px;
  }

  .home-action-card {
    max-width: 540px;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr);
  }

  .summary-grid {
    padding: 24px 34px 6px;
    gap: 12px;
  }

  .summary-card {
    min-height: 88px;
    padding: 16px;
  }

  .summary-amount {
    font-size: 15px;
  }

  .chip-row,
  .tabs {
    padding-left: 34px;
    padding-right: 34px;
  }

  .section-head {
    padding-left: 34px;
    padding-right: 34px;
  }

  .card {
    margin-left: 34px;
    margin-right: 34px;
  }

  .wallet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 34px;
    padding-right: 34px;
  }

  .wallet-card {
    min-height: 142px;
  }

  .sheet-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .bottom-nav {
    display: none;
  }

  .bottom-sheet {
    top: 50%;
    bottom: auto;
    width: min(560px, calc(100% - 48px));
    max-width: 560px;
    max-height: min(820px, calc(100dvh - 48px));
    transform: translate(-50%, -50%);
    border-radius: 20px;
    padding-bottom: 12px;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-title-row {
    padding: 24px 24px 16px;
  }

  .toast {
    bottom: 28px;
  }
}
