@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #0a0a0a;
  --muted: #737373;
  --soft: #a3a3a3;
  --line: #e7e7e4;
  --paper: #f5f5f2;
  --white: #fff;
  --radius-lg: 26px;
  --radius-md: 18px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.12), 0 4px 18px rgba(0, 0, 0, 0.05);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.stage {
  width: 100%;
  height: 100svh;
  min-height: 0;
  display: block;
  padding: 0;
  background: var(--paper);
  overflow: hidden;
  position: relative;
}

.stage::before {
  display: none;
}

.intro {
  display: none;
}

.intro-mark {
  width: 46px;
  height: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  transform: rotate(45deg);
  margin: 0 0 70px 6px;
}

.intro-mark span {
  border: 2px solid var(--ink);
  border-radius: 4px;
}

.intro-mark span:last-child {
  background: var(--ink);
}

.eyebrow,
.section-label,
.field label {
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow {
  font-size: 11px;
  line-height: 1.6;
  margin: 0 0 20px;
  color: var(--muted);
}

.intro h1 {
  font-size: clamp(54px, 6vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.075em;
  margin: 0;
  max-width: 720px;
}

.intro h1 em {
  font-weight: 400;
  font-style: normal;
  color: #868680;
}

.intro-copy {
  max-width: 420px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin: 34px 0 48px;
}

.trust-row {
  display: flex;
  gap: 24px;
  font-size: 10px;
  font-family: "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.trust-row span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-row span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink);
}

.phone {
  width: 100%;
  height: 100svh;
  min-height: 0;
  background: var(--white);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

.phone::after {
  display: none;
}

.topbar {
  height: 78px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
}

.brand,
.profile-button,
.icon-button,
.nav-item,
.text-button {
  border: 0;
  background: none;
  cursor: pointer;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
  padding: 7px 0;
}

.brand-mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 17px;
  height: 17px;
  transform: rotate(45deg);
}

.brand-mark i {
  display: block;
  border: 1.7px solid var(--ink);
  border-radius: 2px;
}

.brand-mark i:last-child {
  background: var(--ink);
}

.profile-button {
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: 180ms ease;
}

.profile-button span {
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: -0.05em;
}

.profile-button:hover {
  background: var(--ink);
  color: white;
  transform: rotate(-8deg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.connect-stripe-button,
.profile-connect {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
}

.connect-stripe-button {
  min-height: 35px;
  padding: 0 13px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.connect-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
}

.connect-stripe-button.connected {
  background: var(--ink);
  color: white;
}

.connect-stripe-button.connected .connect-dot {
  background: white;
}

.profile-menu {
  position: absolute;
  top: calc(100% - 7px);
  right: 22px;
  width: min(320px, calc(100vw - 28px));
  padding: 14px;
  border: 1px solid rgba(10, 10, 10, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
}

.profile-menu[hidden] {
  display: none;
}

.profile-menu-header {
  padding: 5px 5px 15px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.profile-menu-header div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-menu-header strong {
  font-size: 11px;
}

.profile-menu-header div span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-status {
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
}

.profile-status span {
  color: var(--muted);
}

.profile-status strong {
  font-size: 9px;
  text-align: right;
}

.profile-connect {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border-radius: 11px;
}

.profile-connect:hover:not(:disabled) {
  background: var(--paper);
}

.profile-connect:disabled {
  color: var(--muted);
  cursor: default;
}

.profile-links {
  margin: 10px 0;
  padding: 7px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
}

.profile-links a {
  min-height: 34px;
  padding: 0 7px;
  border-radius: 9px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

.profile-links a:hover {
  background: var(--paper);
}

.profile-links a span {
  color: var(--muted);
}

.profile-logout {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 700;
}

.view-stack {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 28px 24px 40px;
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  pointer-events: none;
  transition: opacity 280ms ease, transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: none;
}

.view::-webkit-scrollbar {
  display: none;
}

.view.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.bottom-nav {
  height: 76px;
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 10px 8px;
  position: relative;
  z-index: 5;
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #aaa;
  font-size: 9px;
  font-weight: 700;
  transition: color 220ms ease, transform 220ms ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: -7px;
  width: 0;
  height: 2px;
  background: var(--ink);
  transition: width 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item.active {
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-item.active::before {
  width: 30px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 2px 0 30px;
}

.page-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.06em;
}

.page-header p {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.date-chip {
  font: 500 9px/1 "DM Mono", monospace;
  letter-spacing: 0.08em;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
}

.section-label {
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0 0 12px;
}

.monthly-overview {
  min-height: 150px;
  border-radius: var(--radius-md);
  padding: 21px;
  background: var(--ink);
  color: white;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.monthly-overview .tiny {
  display: block;
  font: 400 8px/1 "DM Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.55;
}

.monthly-main div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 18px;
}

.monthly-main strong {
  font-size: 42px;
  letter-spacing: -0.065em;
  line-height: 1;
}

.monthly-main small {
  font-size: 11px;
  opacity: 0.5;
}

.monthly-overview::after {
  content: "";
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  position: absolute;
  right: -85px;
  top: -95px;
}

.monthly-income {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 21px;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.monthly-income span {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 8px;
  color: #aaa;
}

.monthly-income i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.monthly-income strong {
  font-size: 11px;
}

.portfolio {
  margin-bottom: 27px;
}

.portfolio-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.portfolio-header .section-label {
  margin-bottom: 5px;
  color: var(--ink);
  font-weight: 500;
}

.portfolio-description {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.portfolio-total {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex: 0 0 auto;
}

.portfolio-total strong {
  font-size: 13px;
  letter-spacing: -0.04em;
}

.portfolio-total span {
  color: var(--muted);
  font-size: 8px;
}

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

.portfolio-empty {
  width: 100%;
  min-height: 78px;
  border: 1px dashed #d5d5d0;
  border-radius: var(--radius-md);
  background: #fafaf8;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: 200ms ease;
}

.portfolio-empty:hover {
  border-color: var(--ink);
  background: white;
}

.portfolio-empty strong,
.portfolio-empty small {
  display: block;
}

.portfolio-empty strong {
  font-size: 11px;
  margin-bottom: 4px;
}

.portfolio-empty small {
  color: var(--muted);
  font-size: 8px;
}

.empty-plus {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
}

.empty-plus svg,
.integration-icon svg {
  width: 17px;
  height: 17px;
}

.split-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 250ms ease, border-color 250ms ease;
}

.split-card:hover {
  transform: translateY(-3px);
  border-color: #d2d2ce;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.07);
}

.split-top,
.split-bottom,
.notification-top,
.wallet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.split-service {
  display: flex;
  gap: 11px;
  align-items: center;
}

.service-icon {
  width: 35px;
  height: 35px;
  border-radius: 11px;
  color: white;
  background: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.05em;
}

.service-icon.alt {
  color: var(--ink);
  background: #ededeb;
}

.split-card h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.035em;
}

.split-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f1ee;
  display: grid;
  place-items: center;
  transition: 200ms ease;
}

.split-card:hover .arrow {
  color: white;
  background: var(--ink);
  transform: rotate(-45deg);
}

.split-bottom {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}

.split-bottom strong {
  font-size: 11px;
  color: var(--ink);
}

.form-card,
.wallet-panel,
.notification-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.integration-empty {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 22px 22px;
  text-align: center;
}

.integration-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
}

.integration-empty h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -0.04em;
}

.integration-empty > p:not(.section-label),
.empty-state p {
  max-width: 280px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.field {
  margin-bottom: 19px;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 8px;
  margin: 0 0 8px 2px;
}

.field input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  padding: 0 14px;
  font-size: 13px;
  background: #fafaf8;
  transition: 200ms ease;
}

.field input:focus {
  border-color: var(--ink);
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.field-note {
  margin: -9px 2px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.primary-button {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  margin-top: 16px;
  transition: 200ms ease;
  position: relative;
  overflow: hidden;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
}

.primary-button:active {
  transform: scale(0.985);
}

.wallet-hero {
  background: var(--ink);
  color: white;
  padding: 24px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.wallet-hero::before,
.wallet-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.wallet-hero::before {
  width: 180px;
  height: 180px;
  right: -100px;
  top: -110px;
}

.wallet-hero::after {
  width: 110px;
  height: 110px;
  right: -50px;
  top: -70px;
}

.balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 38px 0 26px;
}

.balance strong {
  font-size: 55px;
  letter-spacing: -0.085em;
  line-height: 0.9;
}

.balance span {
  font-size: 13px;
  opacity: 0.6;
}

.wallet-stats {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.wallet-stats span,
.wallet-row span {
  font-size: 9px;
  color: #aaa;
}

.wallet-stats strong {
  display: block;
  font-size: 11px;
  margin-top: 4px;
}

.wallet-panel {
  margin-top: 12px;
  border-radius: var(--radius-md);
}

.stripe-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.stripe-status {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.stripe-status strong {
  display: block;
  font-size: 11px;
  margin-bottom: 4px;
}

.stripe-status p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  margin: 0;
}

.stripe-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  margin-top: 4px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.07);
}

.stripe-button {
  width: 100%;
  height: 45px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafaf8;
  margin-top: 17px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: 200ms ease;
}

.stripe-button span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
}

.stripe-button:hover {
  background: white;
  border-color: var(--ink);
}

.wallet-row {
  gap: 9px;
}

.wallet-row input {
  min-width: 0;
  flex: 1;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 13px;
  outline: none;
}

.mini-button {
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  padding: 0 17px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.wallet-panel p {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
  margin: 14px 0 0;
}

.text-button {
  padding: 5px 0;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
}

.notification-card {
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
}

.notification-card:hover {
  background: #fafaf8;
}

.notification-top {
  align-items: flex-start;
  gap: 12px;
}

.notification-symbol {
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
}

.notification-copy {
  flex: 1;
}

.notification-copy h3 {
  margin: 1px 0 5px;
  font-size: 12px;
}

.notification-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  margin-top: 5px;
}

.empty-state {
  text-align: center;
  padding: 75px 10px 20px;
}

.empty-state h3 {
  font-size: 15px;
  margin: 0 0 7px;
}

.empty-state p {
  color: var(--muted);
  font-size: 10px;
}

.empty-state.compact {
  padding: 34px 10px;
  border: 1px dashed #d5d5d0;
  border-radius: var(--radius-md);
}

.collected-list {
  display: grid;
  gap: 8px;
}

.collected-row {
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
}

.collected-row strong {
  font-size: 11px;
}

.auth-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(245, 245, 242, 0.9);
  backdrop-filter: blur(18px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-overlay.hidden,
.modal-overlay[hidden] {
  display: none;
}

.auth-card,
.modal-card {
  width: min(100%, 430px);
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  background: white;
  border: 1px solid rgba(10, 10, 10, 0.13);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-card > .brand-mark {
  width: 24px;
  height: 24px;
  margin: 0 0 35px 4px;
}

.auth-card h2,
.modal-header h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.06em;
}

.auth-copy,
.modal-copy {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  margin: 8px 0 25px;
}

.auth-switch {
  width: 100%;
  margin-top: 14px;
}

.terms-consent {
  margin: 18px 2px 2px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  cursor: pointer;
}

.terms-consent[hidden] {
  display: none;
}

.terms-consent input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--ink);
}

.terms-consent a {
  color: var(--ink);
  font-weight: 700;
  text-underline-offset: 2px;
}

.legal-links {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 18px;
}

.legal-links a {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease;
}

.legal-links a:hover {
  color: var(--ink);
}

.form-error {
  min-height: 14px;
  color: #a00000;
  font-size: 9px;
  line-height: 1.4;
  margin: 8px 2px 0;
}

.modal-overlay {
  z-index: 60;
  background: rgba(10, 10, 10, 0.35);
}

.modal-card {
  width: min(100%, 560px);
}

.connect-card {
  width: min(100%, 720px);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

#connect-onboarding {
  min-height: 300px;
}

.connect-fallback {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.connect-fallback[hidden] {
  display: none;
}

.connect-fallback h3 {
  margin: 0 0 7px;
  font-size: 14px;
  letter-spacing: -0.03em;
}

.connect-fallback p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

#payment-element {
  padding: 4px 0 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 25px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: white;
  border-radius: 99px;
  padding: 12px 17px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: 250ms ease;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Desktop application */
@media (min-width: 1200px) {
  .stage {
    display: block;
    min-height: 100svh;
    padding: 0;
    background: var(--paper);
    overflow: hidden;
  }

  .stage::before,
  .intro,
  .phone::after {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100svh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    grid-template-rows: 78px minmax(0, 1fr);
    background: var(--paper);
  }

  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 78px;
    padding: 0 30px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 19px;
    height: 19px;
  }

  .bottom-nav {
    grid-column: 1;
    grid-row: 2;
    height: auto;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: white;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 28px 18px;
  }

  .nav-item {
    width: 100%;
    min-height: 52px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 13px;
    padding: 0 15px;
    border-radius: 13px;
    font-size: 11px;
  }

  .nav-item::before {
    display: none;
  }

  .nav-item.active {
    background: var(--ink);
    color: white;
    transform: none;
  }

  .nav-icon,
  .nav-icon svg {
    width: 19px;
    height: 19px;
  }

  .view-stack {
    grid-column: 2;
    grid-row: 2;
    background: var(--paper);
  }

  .view {
    padding: 52px clamp(42px, 6vw, 94px) 70px;
  }

  .view[data-view="home"].active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    align-content: start;
  }

  .view[data-view="home"] > .page-header,
  .view[data-view="home"] > .monthly-overview {
    grid-column: 1 / -1;
  }

  .page-header {
    margin-bottom: 36px;
  }

  .page-header h2 {
    font-size: 42px;
  }

  .page-header p {
    font-size: 13px;
  }

  .monthly-overview {
    min-height: 190px;
    padding: 28px;
    margin-bottom: 36px;
    border-radius: 24px;
  }

  .monthly-main strong {
    font-size: 58px;
  }

  .monthly-income {
    margin-top: 26px;
    padding-top: 19px;
  }

  .monthly-income span,
  .monthly-income strong {
    font-size: 11px;
  }

  .portfolio {
    min-width: 0;
    margin-bottom: 0;
  }

  .portfolio-empty {
    min-height: 110px;
    padding: 20px;
  }

  .portfolio-empty strong {
    font-size: 13px;
  }

  .portfolio-empty small,
  .portfolio-description {
    font-size: 10px;
  }

  .view[data-view="create"] .form-card {
    max-width: 680px;
  }

  .view[data-view="wallet"].active {
    display: grid;
    grid-template-columns: minmax(380px, 0.85fr) minmax(340px, 1.15fr);
    column-gap: 24px;
    align-content: start;
  }

  .view[data-view="wallet"] > .page-header {
    grid-column: 1 / -1;
  }

  .wallet-hero {
    min-height: 280px;
    margin: 0;
  }

  .balance strong {
    font-size: 72px;
  }

  .collected-list {
    align-content: start;
  }

  .view[data-view="notifications"] > * {
    max-width: 860px;
  }

  .notification-card + .notification-card {
    margin-top: 10px;
  }

  .auth-card {
    width: min(100%, 480px);
    padding: 38px;
  }
}

/* Tablet application */
@media (min-width: 701px) and (max-width: 1199px) {
  .stage {
    display: block;
    padding: 0;
    background: var(--paper);
    overflow: hidden;
  }

  .stage::before,
  .intro,
  .phone::after {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100svh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: 76px minmax(0, 1fr);
    background: var(--paper);
  }

  .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 76px;
    padding: 0 26px;
    background: white;
  }

  .bottom-nav {
    grid-column: 1;
    grid-row: 2;
    height: auto;
    border-top: 0;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 9px;
    background: white;
  }

  .nav-item {
    width: 100%;
    min-height: 60px;
    border-radius: 14px;
  }

  .nav-item::before {
    display: none;
  }

  .nav-item.active {
    background: #f0f0ed;
    transform: none;
  }

  .view-stack {
    grid-column: 2;
    grid-row: 2;
    background: var(--paper);
  }

  .view {
    padding: 42px clamp(28px, 6vw, 64px) 60px;
  }

  .page-header h2 {
    font-size: 38px;
  }

  .monthly-overview {
    min-height: 175px;
    padding: 25px;
  }

  .monthly-main strong {
    font-size: 50px;
  }

  .portfolio-empty {
    min-height: 96px;
    padding: 18px;
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .view[data-view="home"].active {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
    align-content: start;
  }

  .view[data-view="home"] > .page-header,
  .view[data-view="home"] > .monthly-overview {
    grid-column: 1 / -1;
  }

  .portfolio {
    min-width: 0;
  }

  .view[data-view="create"] .form-card {
    max-width: 650px;
  }

  .view[data-view="wallet"].active {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(280px, 1.1fr);
    column-gap: 20px;
    align-content: start;
  }

  .view[data-view="wallet"] > .page-header {
    grid-column: 1 / -1;
  }

  .wallet-hero {
    margin: 0;
  }
}

/* Mobile application */
@media (max-width: 700px) {
  .stage {
    display: block;
    padding: 0;
    background: white;
  }

  .intro {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100svh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .phone::after {
    display: none;
  }

  .topbar {
    height: 68px;
    padding: 0 18px;
  }

  .profile-menu {
    top: calc(100% - 3px);
    right: 14px;
  }

  .connect-stripe-button {
    width: 35px;
    padding: 0;
    justify-content: center;
  }

  .connect-stripe-button span:last-child {
    display: none;
  }

  .view {
    padding: 24px 18px calc(34px + env(safe-area-inset-bottom));
  }

  .bottom-nav {
    height: calc(72px + env(safe-area-inset-bottom));
    padding: 5px 7px calc(7px + env(safe-area-inset-bottom));
  }

  .page-header {
    margin-bottom: 26px;
  }

  .page-header h2 {
    font-size: clamp(27px, 8vw, 32px);
  }

  .monthly-overview {
    margin-bottom: 26px;
  }

  .monthly-main strong {
    font-size: clamp(38px, 12vw, 46px);
  }

  .portfolio-header {
    gap: 10px;
  }

  .portfolio-description {
    max-width: 180px;
  }

  .auth-overlay,
  .modal-overlay {
    padding: 0;
    align-items: end;
  }

  .auth-card,
  .modal-card,
  .connect-card {
    width: 100%;
    max-height: 94svh;
    border-radius: 26px 26px 0 0;
    border-bottom: 0;
    padding: 26px 20px calc(26px + env(safe-area-inset-bottom));
  }
}
