:root {
  --ink: #1b1b1b;
  --muted: #6b635e;
  --accent-2: #f4b860;
  --card: #ffffff;
  --danger: #b93b3b;
  --ok: #0f7d4d;
  --shadow: 0 18px 40px rgba(15, 12, 8, 0.12);
}

.surface-box {
  --surface-radius: 14px;
  --surface-background: #fff;
  --surface-shadow: 0 10px 20px rgba(15, 12, 8, 0.08);
  background: var(--surface-background);
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
  overflow: hidden;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: radial-gradient(120% 120% at 20% -10%, #f4e2c5 0%, #f0ece5 50%, #e4e9e6 100%);
  color: var(--ink);
  font-family: "Space Grotesk", "IBM Plex Sans", "Avenir Next", sans-serif;
  overflow-x: hidden;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app.is-welcome {
  min-height: 100vh;
}

.app.is-welcome header {
  display: none;
}

.app.is-subpage {
}

.app.is-subpage header {
  display: none;
}

body.is-welcome nav {
  display: none;
}

header {
  padding: 24px 20px 10px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--muted);
}

.balance-hero {
  margin: 16px 20px 0;
  background: var(--card);
  border-radius: 28px;
  padding: 26px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.balance-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 184, 96, 0.65), rgba(244, 184, 96, 0));
}

.trust-hero::after {
  display: none;
}

.hero-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 600;
}

.hero-amount {
  font-weight: 700;
  margin: 8px 0 12px;
}

.hero-number {
  font-size: 40px;
}

.hero-amount span:not(.hero-number) {
  font-size: 18px;
  color: var(--muted);
  margin-left: 4px;
}

.section {
  padding: 22px 20px 8px;
}

.section h2 {
  margin: 0 0 10px;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.empty {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
  color: var(--muted);
  font-size: 14px;
}

nav {
  padding: 12px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}

.nav-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.nav-item {
  appearance: none;
  border: none;
  background: transparent;
  text-align: center;
  padding: 8px 6px;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.nav-icon {
  width: 22px;
  height: 22px;
  margin: 0 auto;
}

.nav-badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 15px);
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e5a632;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  padding: 0 2px;
  pointer-events: none;
}

.nav-item.active {
  background: #111;
  color: #fff;
}

.nav-item.active .nav-icon {
  color: var(--accent-2);
}

@media (min-width: 600px) {
  .app {
    max-width: 420px;
    margin: 0 auto;
    border-radius: 40px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
  }

  nav {
    width: min(420px, 100%);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
  }
}
