@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/plusjakarta-400.woff") format("woff");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/plusjakarta-400.woff") format("woff");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/plusjakarta-600.woff") format("woff");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/plusjakarta-700.woff") format("woff");
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/plusjakarta-700.woff") format("woff");
}
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/static/fonts/material-symbols.woff") format("woff");
}

:root {
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ink: #121c2a;
  --muted: #424751;
  --primary: #003b73;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: #d0daee;
  font-family: var(--font);
  color: var(--ink);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
body {
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.pb-safe { padding-bottom: env(safe-area-inset-bottom, 0px); }
.pt-safe { padding-top: max(8px, env(safe-area-inset-top, 0px)); }
::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.material-symbols-outlined {
  font-family: "Material Symbols Outlined" !important;
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: hidden;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga", "rlig", "rclt";
  -webkit-font-feature-settings: "liga", "rlig", "rclt";
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
}
html:not(.fonts-ready) .material-symbols-outlined {
  color: transparent;
}
.material-symbols-outlined.fill {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}
.tabular {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Stitch type scale — size lives here so Tailwind font-* tokens stay readable */
.font-headline-xl, .text-headline-xl {
  font-family: var(--font);
  font-size: 32px;
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.font-headline-lg, .text-headline-lg {
  font-family: var(--font);
  font-size: 26px;
  line-height: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.font-headline-md, .text-headline-md {
  font-family: var(--font);
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.font-headline-sm, .text-headline-sm {
  font-family: var(--font);
  font-size: 17px;
  line-height: 24px;
  font-weight: 600;
}
.font-body-lg, .text-body-lg {
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}
.font-body-md, .text-body-md {
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}
.font-body-sm, .text-body-sm {
  font-family: var(--font);
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}
.font-label-lg, .text-label-lg {
  font-family: var(--font);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.font-label-md, .text-label-md {
  font-family: var(--font);
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.font-label-sm, .text-label-sm {
  font-family: var(--font);
  font-size: 11px;
  line-height: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.font-numeric-balance, .text-numeric-balance {
  font-family: var(--font);
  font-size: clamp(22px, 7.2vw, 30px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.num-sm { font-size: 12px; font-weight: 700; }
.num-md { font-size: 13px; font-weight: 700; }
.num-stat { font-size: 12px; font-weight: 700; }
.label-tight {
  font-size: 10px;
  line-height: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

label > span {
  display: block;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 4px;
}
input, select, textarea {
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: var(--ink);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select, textarea {
  display: block;
  width: 100%;
  min-height: 28px;
}
button, .app-nav a {
  font-family: inherit;
}

:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --header-bar: 56px;
  --nav-bar: 48px;
  --nav-pad: 4px;
  --header-h: 0px;
  --nav-h: 0px;
  --surface: #f8f9ff;
}
body.has-header { --header-h: calc(var(--sat) + var(--header-bar)); }
body.has-nav { --nav-h: calc(var(--nav-bar) + var(--nav-pad)); }

html, body {
  height: 100%;
}
html.is-ios,
html.is-standalone {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}
html.is-ios body,
html.is-standalone body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: auto;
  background: var(--surface);
  padding: 0;
  overflow: hidden;
}

.app-shell {
  width: 100%;
  max-width: 430px;
  height: 100%;
  min-height: 100%;
  margin: 0 auto;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}
html.is-ios .app-shell,
html.is-standalone .app-shell {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
}
.app-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  padding-top: var(--sat);
  background: rgba(248, 249, 255, 0.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 -0.5px 0 rgba(18, 28, 42, 0.12);
}
.app-header-bar {
  height: var(--header-bar);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.app-header .font-label-md {
  font-size: 15px;
  line-height: 18px;
  font-weight: 700;
}
.app-header .font-body-sm {
  font-size: 12px;
  line-height: 16px;
}
.app-icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #424751;
  -webkit-tap-highlight-color: transparent;
}
.app-icon-btn:active { background: rgba(0, 82, 156, 0.08); }
.app-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ba1a1a;
  box-shadow: 0 0 0 2px #f8f9ff;
}
.app-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #003b73;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-left: 2px;
}
.app-main {
  position: absolute;
  top: var(--header-h);
  bottom: var(--nav-h);
  left: 0;
  right: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: var(--surface);
}
body:not(.has-header) .app-main {
  padding-top: var(--sat);
  padding-bottom: max(16px, var(--sab));
}
.app-header, .app-nav {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.app-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding-bottom: 4px;
  background: rgba(248, 249, 255, 0.92);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0.5px 0 rgba(18, 28, 42, 0.12);
}
.app-nav-bar {
  height: var(--nav-bar);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 4px 0;
}
.app-tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #62748d;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.app-tab .material-symbols-outlined { font-size: 24px; }
.app-tab-label {
  font-size: 10px;
  line-height: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.app-tab.is-active { color: #003b73; }
.app-tab:active { opacity: 0.65; }
.app-tab-add .app-add {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #003b73, #00658d);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(0, 82, 156, 0.45);
}
.app-tab-add .app-add .material-symbols-outlined { font-size: 20px; color: #fff; }
.app-tab-add:active .app-add { transform: scale(0.94); }

a, button, .app-tab, .app-icon-btn, .wallet-card, .cat-card, .member-btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
button { border: 0; }
html.is-ios .app-header,
html.is-standalone .app-header,
html.is-ios .app-nav,
html.is-standalone .app-nav {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: #f8f9ff;
}
.app-tab {
  min-height: 44px;
  padding-top: 4px;
}

@keyframes ksk-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes ksk-in {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.sk {
  background: linear-gradient(90deg, #e4ebf6 0%, #f4f7fc 45%, #e4ebf6 90%);
  background-size: 200% 100%;
  animation: ksk-shimmer 1.15s ease-in-out infinite;
}
.page-transition {
  position: absolute;
  top: var(--header-h);
  bottom: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  background: #f8f9ff;
  overflow: hidden;
}
html.is-ios .page-transition,
html.is-standalone .page-transition {
  position: fixed;
}
.page-transition.is-active,
html.nav-enter .page-transition {
  opacity: 1;
  pointer-events: auto;
}
.page-transition__scaffold {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 430px;
  margin: 0 auto;
}
.sk-hero { height: 148px; border-radius: 16px; }
.sk-row { display: flex; gap: 10px; }
.sk-card { flex: 1; height: 72px; border-radius: 12px; }
.sk-line { height: 12px; border-radius: 8px; width: 58%; }
.sk-line--short { width: 38%; height: 10px; }
.sk-item { height: 64px; border-radius: 16px; }
body.nav-busy .app-header,
body.nav-busy .app-nav {
  pointer-events: none;
}
html.nav-enter-done .app-main {
  animation: ksk-in 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
html.nav-lite .sk { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .sk, html.nav-enter-done .app-main {
    animation: none !important;
  }
}

@media (min-width: 480px) {
  html:not(.is-standalone) body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background:
      radial-gradient(1200px 600px at 50% -10%, #eff4ff, transparent 55%),
      #c5d4ea;
    position: static;
    overflow: auto;
  }
  html:not(.is-standalone) .app-shell {
    max-width: 430px;
    width: 100%;
    height: min(900px, calc(100dvh - 48px));
    min-height: min(900px, calc(100dvh - 48px));
    border-radius: 28px;
    box-shadow:
      0 24px 60px -16px rgba(0, 82, 156, 0.28),
      0 0 0 1px rgba(226, 232, 240, 0.8);
  }
}
html.is-standalone body,
html.is-ios.is-standalone body,
html.is-ios body {
  display: block;
  padding: 0;
  background: var(--surface);
  position: fixed;
  inset: 0;
  height: auto;
}
html.is-standalone .app-shell,
html.is-ios.is-standalone .app-shell,
html.is-ios .app-shell {
  max-width: 100%;
  width: 100%;
  border-radius: 0;
  box-shadow: none;
}
html.is-ios .app-header,
html.is-standalone .app-header,
html.is-ios .app-nav,
html.is-standalone .app-nav,
html.is-ios .app-main,
html.is-standalone .app-main {
  position: fixed;
}

@media (display-mode: standalone) {
  html {
    --nav-pad: 4px;
  }
  .app-header,
  .app-nav,
  .app-main {
    position: fixed;
  }
  .app-nav {
    bottom: 0;
    padding-bottom: 4px;
  }
  .app-shell {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 0;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
  }
}
