*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green: #00d632;
  --green-dark: #00b82b;
  --bg: #ffffff;
  --surface: #f2f2f7;
  --surface-elevated: #ffffff;
  --text: #000000;
  --text-secondary: #8e8e93;
  --text-muted: #636366;
  --border: #e5e5ea;
  --pill-bg: #e5e5ea;
  --badge-green: #00d632;
  --badge-blue: #0a84ff;
  --badge-purple: #bf5af2;
  --badge-yellow: #ffd60a;
  --tab-inactive: #8e8e93;
  --phone-w: 390px;
  --phone-h: 844px;
}

html,
body {
  height: 100%;
  background: #e8e8ed;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 12px;
}

.app {
  width: 100%;
  max-width: var(--phone-w);
  height: min(100dvh, var(--phone-h));
  max-height: var(--phone-h);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.screen--active {
  display: flex;
}

.app--money {
  background: #fff;
}

.app--money .tabbar {
  background: #fff;
  border-top: 1px solid var(--border);
}

.app--money .home-indicator {
  background: #000;
}

@media (min-width: 420px) {
  .app {
    border-radius: 0;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.08),
      0 24px 64px rgba(0, 0, 0, 0.18);
  }
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 8px;
  flex-shrink: 0;
  background: var(--bg);
  z-index: 2;
}

.header-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  line-height: 1.1;
}

.header-camera {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px 24px;
  scrollbar-width: thin;
  scrollbar-color: #c7c7cc transparent;
}

.content::-webkit-scrollbar {
  width: 4px;
}

.content::-webkit-scrollbar-thumb {
  background: #c7c7cc;
  border-radius: 4px;
}

.balance-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 20px 18px 16px;
  margin-bottom: 14px;
}

.balance-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: -0.1px;
}

.balance-amount {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 20px;
  margin-top: 4px;
}

.pill-btn {
  height: 46px;
  border: none;
  border-radius: 24px;
  background: var(--pill-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.pill-btn:active {
  opacity: 0.75;
}

.balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.balance-routing {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.1px;
  cursor: pointer;
}

.chevron-sm {
  font-size: 14px;
  font-weight: 500;
}

.balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pill-dollar {
  font-size: 16px;
  font-weight: 700;
  margin-right: 2px;
}

.pill-card-icon {
  margin-right: 4px;
}

.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.tile {
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 16px 14px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  border: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
  width: 100%;
}

.tile:active {
  opacity: 0.85;
}

.list-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: 12px;
  padding: 16px 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  min-height: 72px;
  border: none;
  font: inherit;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.list-card:active {
  opacity: 0.85;
}

.tile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tile-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

.tile-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.tile-badge--green {
  background: var(--badge-green);
}

.tile-badge--blue {
  background: var(--badge-blue);
}

.tile-badge--purple {
  background: var(--badge-purple);
}

.tile-badge--yellow {
  background: var(--badge-yellow);
}

.tile-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.1px;
  margin-bottom: auto;
  padding-top: 2px;
}

.tile-value {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  margin-top: 8px;
}

.tile-value--green {
  color: var(--green);
  font-size: 16px;
  font-weight: 600;
}

.list-card--invite {
  text-decoration: none;
}

.list-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-icon--card {
  background: var(--green);
}

.list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.list-body--solo {
  padding-left: 2px;
}

.list-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.2;
}

.list-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.1px;
  line-height: 1.3;
}

.list-chevron {
  font-size: 18px;
  font-weight: 500;
  color: #c7c7cc;
  flex-shrink: 0;
  line-height: 1;
  padding-right: 2px;
}

.invite-btn {
  border: none;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  padding: 10px 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.tabbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 6px 8px 4px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 2;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--tab-inactive);
  min-width: 56px;
  padding-bottom: 2px;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.tab--active {
  color: var(--green);
}

.tab-icon {
  width: 24px;
  height: 24px;
}

.tab-icon--home path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.tab--active .tab-icon--home path {
  fill: currentColor;
  stroke: none;
}

.tab-icon--profile circle,
.tab-icon--profile path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab--active .tab-icon--profile circle,
.tab--active .tab-icon--profile path {
  fill: currentColor;
  stroke: none;
}

.tab-money-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1px;
}

.tab--active .tab-money-circle {
  background: var(--green);
}

.tab-money-glyph {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: var(--tab-inactive);
  letter-spacing: -0.5px;
}

.tab--active .tab-money-glyph {
  color: #fff;
}

.tab-icon--money {
  transform: translateY(1px);
}

.tab-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: -0.1px;
}

.home-indicator {
  width: 134px;
  height: 5px;
  background: #000;
  border-radius: 100px;
  margin: 6px auto 8px;
  flex-shrink: 0;
  opacity: 0.85;
}

@media (max-width: 419px) {
  body {
    padding: 0;
  }

  .app {
    max-width: 100%;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
}

.screen--search {
  background: #fff;
}

.search-header {
  padding: 14px 20px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid #e5e5ea;
}

.search-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 14px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: 12px;
  padding: 0 14px;
  height: 44px;
}

.search-field-icon {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.search-input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  width: 100%;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-body {
  flex: 1;
  overflow-y: auto;
  background: #ececf0;
  scrollbar-width: thin;
  scrollbar-color: #8e8e93 transparent;
}

.search-body::-webkit-scrollbar {
  width: 4px;
}

.search-body::-webkit-scrollbar-thumb {
  background: #8e8e93;
  border-radius: 4px;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 28px 32px;
}

.search-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #d1d1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.search-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.search-empty-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 280px;
}

.search-suggestions {
  padding: 20px 20px 32px;
  border-top: 1px solid #d8d8de;
}

.search-suggestions-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.search-suggestions-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.search-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e5e5ea;
  flex-shrink: 0;
}

.search-action {
  height: 48px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.search-action--gray {
  background: var(--surface);
  color: var(--text);
}

.search-action--green {
  background: var(--green);
  color: #fff;
}

.screen--money {
  background: var(--green);
  padding: max(8px, env(safe-area-inset-top, 0px)) 0 0;
  justify-content: flex-start;
  border-radius: 0;
  flex: 1;
  min-height: 0;
}

.money-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  min-height: 44px;
  padding: 4px 20px 0;
}

.money-cashtag,
.money-cashtag-btn {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.2px;
}

.money-cashtag-btn {
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  padding: 10px 0;
  -webkit-tap-highlight-color: transparent;
}

.money-add {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.money-add:active {
  background: rgba(255, 255, 255, 0.15);
}

.money-display {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app--overlay .screen {
  pointer-events: none;
}

.money-amount {
  font-size: 56px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
  max-width: 100%;
}

.money-amount--long {
  font-size: 44px;
  letter-spacing: -1.5px;
}

.money-amount--xl {
  font-size: 34px;
  letter-spacing: -1px;
}

.money-hint {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  margin-top: 14px;
  letter-spacing: -0.2px;
  padding: 10px 28px;
  border-radius: 100px;
  transition: background 0.15s ease, color 0.15s ease;
}

.money-display--ready .money-hint {
  background: #fff;
  color: var(--green);
  padding: 11px 36px;
  font-size: 16px;
}

.money-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  flex: 1 1 0;
  min-height: 220px;
  width: 100%;
  padding: 0 6px 4px;
  margin-top: auto;
}

.money-key {
  border: none;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 32px;
  font-weight: 500;
  width: 100%;
  height: 100%;
  min-height: 52px;
  margin: 0;
  cursor: pointer;
  letter-spacing: -0.5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s ease;
}

.money-key:active {
  background: rgba(255, 255, 255, 0.16);
}

.money-key--back {
  font-size: 0;
}

.money-key--back svg {
  display: block;
  width: 30px;
  height: 30px;
}

.money-keypad-spacer {
  display: block;
}

@media (max-width: 419px) {
  .money-top {
    padding-left: 16px;
    padding-right: 16px;
  }

  .money-display {
    padding: 20px 16px 12px;
  }

  .money-amount {
    font-size: 52px;
  }

  .money-amount--long {
    font-size: 40px;
  }

  .money-amount--xl {
    font-size: 30px;
  }

  .money-keypad {
    padding: 0 2px 2px;
  }

  .money-key {
    font-size: 34px;
    font-weight: 500;
    min-height: 54px;
    border-radius: 8px;
  }

  .money-key--back svg {
    width: 32px;
    height: 32px;
  }
}

@media (max-height: 700px) {
  .money-display {
    padding: 12px 16px 8px;
  }

  .money-amount {
    font-size: 44px;
  }

  .money-amount--long {
    font-size: 34px;
  }

  .money-amount--xl {
    font-size: 26px;
  }

  .money-hint {
    margin-top: 10px;
    padding: 8px 24px;
  }

  .money-key {
    min-height: 46px;
    font-size: 28px;
  }
}

.screen--activity {
  background: #fff;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid #e5e5ea;
}

.activity-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.activity-tools {
  display: flex;
  gap: 10px;
}

.activity-tool {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.activity-filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  flex-shrink: 0;
  border-bottom: 1px solid #e5e5ea;
  overflow-x: auto;
}

.filter-pill {
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.1px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-pill--active {
  background: var(--green);
  color: #fff;
}

.activity-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ececf0;
}

.activity-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 28px 40px;
}

.activity-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #d1d1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.activity-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.activity-empty-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
  max-width: 300px;
}

.screen--profile {
  background: #f2f2f7;
  flex-direction: column;
  min-height: 0;
}

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  flex-shrink: 0;
  background: #f2f2f7;
}

.profile-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.profile-settings {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #e5e5ea;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 24px;
  scrollbar-width: thin;
  scrollbar-color: #c7c7cc transparent;
}

.profile-scroll::-webkit-scrollbar {
  width: 4px;
}

.profile-scroll::-webkit-scrollbar-thumb {
  background: #c7c7cc;
  border-radius: 4px;
}

.profile-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px 16px 16px;
  margin-bottom: 20px;
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d1d1d6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-identity {
  min-width: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.profile-cashtag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
}

.profile-copy {
  border: none;
  background: none;
  color: var(--text-secondary);
  padding: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-action {
  height: 44px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.profile-action--gray {
  background: #e5e5ea;
  color: var(--text);
}

.profile-action--green {
  background: var(--green);
  color: #fff;
}

.profile-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  margin: 0 4px 8px;
}

.profile-group {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #ececf0;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font: inherit;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.profile-row:active {
  background: #f8f8fa;
}

.profile-row--last {
  border-bottom: none;
}

.profile-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f7;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-row-text {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text);
}

.profile-row-chevron {
  font-size: 18px;
  font-weight: 500;
  color: #c7c7cc;
  flex-shrink: 0;
}

.profile-signout {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: #e5e5ea;
  color: #ff3b30;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  cursor: pointer;
  margin-bottom: 16px;
}

.profile-version {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  padding-bottom: 8px;
}

.overlay:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.overlay-panel:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  background: var(--surface);
}

#editModePanel:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.editmode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: var(--surface);
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.editmode-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #e5e5ea;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.editmode-back {
  border: none;
  background: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
  padding: 0;
}

.editmode-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 16px 24px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.editmode-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  margin: 16px 4px 8px;
}

.editmode-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 8px;
}

.editmode-field {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.editmode-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 44px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}

.editmode-cashtag-wrap {
  display: flex;
  align-items: center;
  margin-top: 6px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.editmode-cashtag-prefix {
  padding: 0 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.editmode-input--cashtag {
  border: none;
  margin-top: 0;
  border-radius: 0;
}

.editmode-save {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.editmode-save--stop {
  background: #ff3b30;
}

.editmode-group {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
}

.editmode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #ececf0;
  background: #fff;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.editmode-row--last {
  border-bottom: none;
}

.editmode-row:active {
  background: #f8f8fa;
}

.editmode-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.editmode-row-text {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}

.editmode-row-chevron {
  color: #c7c7cc;
  font-size: 18px;
}

.editmode-botter-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.editmode-botter-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  background: #e5e5ea;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.editmode-botter-status--on {
  background: rgba(0, 214, 50, 0.15);
  color: var(--green);
}

.editmode-botter-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.editmode-botter-fields .editmode-field {
  margin-bottom: 0;
}

.editmode-botter-fields .editmode-input {
  margin-top: 4px;
  height: 40px;
  font-size: 14px;
  padding: 0 8px;
}

.editmode-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  cursor: pointer;
}

.editmode-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  cursor: pointer;
}

.botter-terminal {
  display: flex;
  flex-direction: column;
  height: 156px;
  margin-top: 8px;
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid #222;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.botter-terminal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: #161616;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.botter-terminal-dots {
  display: flex;
  gap: 5px;
}

.botter-terminal-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3a3a3c;
}

.botter-terminal-dots span:nth-child(1) { background: #ff5f57; }
.botter-terminal-dots span:nth-child(2) { background: #febc2e; }
.botter-terminal-dots span:nth-child(3) { background: #28c840; }

.botter-terminal-title {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  color: #8e8e93;
  letter-spacing: 0.3px;
}

.botter-terminal-uptime {
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
}

.botter-terminal-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: #222;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}

.botter-stat {
  background: #111;
  padding: 8px 6px;
  text-align: center;
}

.botter-stat span {
  display: block;
  font-size: 9px;
  color: #636366;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
}

.botter-stat strong {
  font-size: 13px;
  font-weight: 700;
  color: #f2f2f7;
}

.botter-terminal-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 12px 8px;
  font-size: 10px;
  line-height: 1.45;
}

.botter-log-line {
  color: #d1d1d6;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.botter-log-line--dim { color: #636366; }
.botter-log-line--out { color: #ff6b6b; }
.botter-log-line--in { color: var(--green); }
.botter-log-line--sys { color: #5ac8fa; }

.edit-list {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}

.edit-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #ececf0;
  font-size: 15px;
}

.edit-list-item:last-child {
  border-bottom: none;
}

.edit-list-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.edit-del {
  border: none;
  background: #ffebea;
  color: #ff3b30;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.activity-list {
  padding: 0;
  overflow-y: auto;
  flex: 1;
  background: #fff;
}

.activity-tx {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.activity-tx-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.activity-tx-main {
  flex: 1;
  min-width: 0;
}

.activity-tx-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.activity-tx-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.activity-tx-amount {
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.activity-tx--sent .activity-tx-amount {
  color: var(--text);
}

.activity-tx--received .activity-tx-amount {
  color: var(--green);
}

.search-contacts {
  padding: 8px 16px 16px;
}

.contacts-section-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 12px;
  padding-top: 4px;
}

.contacts-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #ececf0;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: background 0.15s ease;
}

.contact-row:last-child {
  border-bottom: none;
}

.contact-row:active {
  background: #f2f2f7;
}

.contact-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: -0.5px;
}

.contact-avatar--sm {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

.contact-tag {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.2;
}

.contact-chevron {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: #c7c7cc;
  flex-shrink: 0;
}

.contact-edit-item {
  align-items: center;
}

.contact-edit-item .contact-info {
  flex: 1;
  min-width: 0;
}

.contact-edit-item .contact-name {
  font-size: 16px;
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px 12px;
  background: var(--surface);
  position: relative;
  flex-shrink: 0;
}

.settings-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.settings-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #e5e5ea;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 24px;
  -webkit-overflow-scrolling: touch;
}

.settings-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.4px;
  margin: 16px 4px 8px;
}

.settings-group {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 4px;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid #ececf0;
  background: #fff;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.settings-row--last {
  border-bottom: none;
}

.settings-row:active {
  background: #f8f8fa;
}

.settings-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
}

.settings-row-text {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.settings-row-chevron {
  font-size: 18px;
  color: #c7c7cc;
  flex-shrink: 0;
}

.settings-signout {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 14px;
  background: #e5e5ea;
  color: #ff3b30;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin: 24px 0 16px;
}

.settings-version {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.subheader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px 12px;
  background: #fff;
  border-bottom: 1px solid #ececf0;
  flex-shrink: 0;
  position: relative;
}

.subheader-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  max-width: 60%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subheader-back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 28px;
  line-height: 1;
  color: var(--green);
  cursor: pointer;
  font-weight: 400;
}

.subheader-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: #e5e5ea;
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.subbody {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 32px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.detail-p {
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.detail-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.detail-card--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ececf0;
  font-size: 15px;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-btn {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #e5e5ea;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 10px;
}

.detail-btn--green {
  background: var(--green);
  color: #fff;
}

.detail-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.detail-input {
  display: block;
  width: 100%;
  margin-top: 6px;
  height: 44px;
  border: 1px solid #d1d1d6;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}

.detail-note {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.detail-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 14px;
  cursor: pointer;
}

.detail-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-amounts button {
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.detail-camera {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
  background: #fff;
  border-radius: 14px;
  margin-bottom: 16px;
}

.detail-camera--qr .qr-frame {
  width: 120px;
  height: 120px;
  border: 3px solid var(--text);
  border-radius: 8px;
  position: relative;
}

.detail-qr-box {
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  background:
    linear-gradient(90deg, #000 2px, transparent 2px) 0 0 / 20px 20px,
    linear-gradient(#000 2px, transparent 2px) 0 0 / 20px 20px;
  background-color: #fff;
  border-radius: 8px;
}

[hidden] {
  display: none !important;
}

.toast:not([hidden]) {
  position: absolute;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(0, 0, 0, 0.82);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal:not([hidden]) {
  position: absolute;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 20px 16px;
  width: 100%;
  max-width: 300px;
  text-align: center;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-text {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: #e5e5ea;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.modal-btn--danger {
  background: #ff3b30;
  color: #fff;
}
