/* ==========================================================================
   Vela — dashboard (app.html)
   Builds on style.css: tokens, buttons, brand, virtual card, ribbons, motion.
   --------------------------------------------------------------------------
    1. Base
    2. Forms
    3. Sign up / log in
    4. Shell & navigation
    5. Overview
    6. Lists
    7. Cards
    8. Rewards
    9. Modals
   10. Connect wallet
   11. Flows
   12. Toasts
   13. Motion
   14. Responsive
   ========================================================================== */


/* 1. Base
   ========================================================================== */

.app-body [hidden] {
  display: none !important;
}

.app-body {
  --danger: #c2372b;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn--primary:disabled {
  box-shadow: none;
}

.btn--block {
  width: 100%;
}

.btn--sm {
  height: 2.4rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}

.btn--dark {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
}

.btn--dark:hover {
  --btn-bg: #2a2147;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.4s var(--ease-out);
}

.icon-btn:hover {
  background: var(--mist);
}

.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.link-btn {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--violet);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: 0;
}


/* 2. Forms
   ========================================================================== */

.field {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.field__label {
  font-size: var(--text-sm);
  font-weight: 600;
}

.field__input {
  width: 100%;
  height: 3.25rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink);
  font: inherit;
  transition: box-shadow 0.2s;
}

.field__input::placeholder {
  color: rgb(26 20 48 / 0.35);
}

.field__input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 4px rgb(91 61 245 / 0.12);
}

.field__input--key {
  height: auto;
  padding: 0.85rem 1rem;
  resize: none;
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-all;
}

.field.is-invalid .field__input {
  box-shadow: inset 0 0 0 2px #e5484d;
}

.field__error {
  font-size: var(--text-sm);
  color: var(--danger);
}

.field__hint {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.switch {
  position: relative;
  width: 2.9rem;
  height: 1.75rem;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: #dcd7ee;
  cursor: pointer;
  transition: background-color 0.25s;
}

.switch::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(26 20 48 / 0.25);
  transition: transform 0.35s var(--ease-out);
}

.switch[aria-checked="true"] {
  background: var(--violet);
}

.switch[aria-checked="true"]::after {
  transform: translateX(1.15rem);
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0.3rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.seg button {
  height: 2.6rem;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.seg button[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
}


/* 3. Sign up / log in
   ========================================================================== */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 100svh;
  padding: 0.75rem;
}

.auth__art {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 36rem;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--mist);
}

.auth__art .ribbons {
  z-index: -2;
}

.auth__art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(55% 45% at 30% 32%, rgb(235 230 255 / 0.85), rgb(235 230 255 / 0) 80%);
  pointer-events: none;
}

.auth__headline {
  margin-top: clamp(2.5rem, 8vh, 5rem);
  font-size: clamp(2.75rem, 1rem + 4.4vw, 5.5rem);
  font-weight: 600;
  line-height: 0.93;
  letter-spacing: -0.045em;
}

.auth__cards {
  --cw: clamp(14rem, 9rem + 12vw, 21rem);
  position: relative;
  height: calc(var(--cw) / 1.586 + 4rem);
  margin-top: auto;
}

.auth__card {
  position: absolute;
  left: 50%;
  bottom: 0;
}

.auth__card .vcard {
  --w: var(--cw);
}

.auth__card--back {
  transform: translate(calc(-50% - var(--cw) * 0.3), -2.5rem) rotate(-12deg);
}

.auth__card--front {
  transform: translate(calc(-50% + var(--cw) * 0.18), 0) rotate(6deg);
}

.auth__card--front .vcard {
  animation: bob 6s ease-in-out infinite alternate;
}

.auth__panel {
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 2.5vw, 2rem);
}

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

.auth__brand-mobile {
  visibility: hidden;
}

.auth__back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: auto;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}

.auth__back:hover {
  color: var(--ink);
}

.auth__back .icon {
  width: 1rem;
  height: 1rem;
}

.auth__box {
  width: min(100%, 27rem);
  margin: auto;
  padding-block: 2rem;
}

.auth__title {
  margin-top: 2rem;
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.auth__text {
  margin-top: 0.6rem;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.auth__step .btn--block {
  margin-top: 1.5rem;
}

.auth__stepper {
  margin-top: 2rem;
}

.auth__stepper + .auth__title {
  margin-top: 1.25rem;
}

.auth__alt {
  display: block;
  margin: 0.75rem auto 0;
  padding: 0.5rem 0.75rem;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.auth__alt:hover {
  color: var(--violet);
}

/* The access key, shown once, on a plain white card */
.keycard {
  margin-top: 1.5rem;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-1);
}

.keycard__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-soft);
}

.keycard__who {
  min-width: 0;
  overflow: hidden;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.keycard__key {
  display: block;
  min-height: 3.1em;
  padding: 0.5rem 1.15rem 1.1rem;
  font-family: var(--mono);
  font-size: 1.02rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--ink);
  word-break: break-all;
  user-select: all;
}

.keycard__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.keycard__actions button {
  height: 3rem;
  border: 0;
  background: none;
  color: var(--violet);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.keycard__actions button + button {
  border-left: 1px solid var(--line);
}

.keycard__actions button:hover {
  background: var(--paper);
}

.keyfacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.35rem 0 0;
  font-size: var(--text-sm);
  line-height: 1.45;
}

.keyfacts dt {
  font-weight: 600;
}

.keyfacts dd {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
}

.auth__safety {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--ink-soft);
}


/* 4. Shell & navigation
   ========================================================================== */

.shell {
  min-height: 100svh;
  padding-bottom: 3rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
  height: 4.5rem;
  padding-inline: var(--gutter);
  background: rgb(244 242 251 / 0.84);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
}

.topbar .brand {
  justify-self: start;
}

.topnav {
  display: flex;
  gap: 0.125rem;
  padding: 0.3125rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}

.topnav button {
  padding: 0.55rem 1.05rem;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s, color 0.25s;
}

.topnav button:hover {
  color: var(--ink);
}

.topnav button[aria-current="page"] {
  background: var(--mist);
  color: var(--ink);
  font-weight: 600;
}

.topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 2.75rem;
  padding: 0 1rem 0 0.4rem;
  border: 0;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.8);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s, transform 0.4s var(--ease-out);
}

.wallet-chip:hover {
  background: var(--surface);
  transform: translateY(-1px);
}

.wallet-chip img {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 0.6rem;
}

.wallet-chip small {
  font-size: inherit;
  font-weight: 500;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.wallet-chip--connect {
  padding: 0 1.15rem 0 0.95rem;
  background: var(--violet);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), 0 10px 24px -12px rgb(91 61 245 / 0.75);
}

.wallet-chip--connect:hover {
  background: var(--violet-hover);
}

/* The landing's mini Vela card (.btn-card), in pearl when it sits on violet */
.wallet-chip--connect .btn-card,
.btn--primary .btn-card {
  background:
    radial-gradient(90% 120% at 100% 0%, #fff, transparent 60%),
    linear-gradient(155deg, #fdfcff, #ded7f8);
  box-shadow: 0 0.15em 0.35em -0.1em rgb(20 10 70 / 0.55), inset 0 0 0 1px rgb(255 255 255 / 0.9);
}

.wallet-chip--connect .btn-card svg,
.btn--primary .btn-card svg {
  color: var(--violet);
}

.wallet-chip:hover .btn-card {
  transform: rotate(0deg) translateY(-1px);
}

.account {
  position: relative;
}

.avatar {
  display: block;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background: var(--mist);
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--surface), 0 8px 18px -8px rgb(26 20 48 / 0.45);
  transition: transform 0.35s var(--ease-out);
}

.avatar:hover {
  transform: scale(1.05);
}

.avatar img,
.menu-pop__avatar {
  display: block;
  width: 100%;
  height: 100%;
}

.menu-pop {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 16.5rem;
  padding: 0.5rem;
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: 0 24px 60px -24px rgb(26 20 48 / 0.45), 0 0 0 1px var(--line);
  animation: pop 0.3s var(--ease-out);
}

.menu-pop__who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  padding: 0.6rem 0.75rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.menu-pop__who > div {
  min-width: 0;
}

.menu-pop__avatar {
  width: 2.6rem;
  height: 2.6rem;
  flex: none;
  border-radius: 50%;
}

.menu-pop__name {
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.menu-pop__meta {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.menu-pop__meta b {
  font-family: var(--mono);
  font-weight: 500;
}

.menu-pop button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 0.8rem;
  background: none;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.menu-pop button:hover {
  background: var(--paper);
}

.menu-pop .icon {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink-soft);
}

.menu-pop .is-danger,
.menu-pop .is-danger .icon {
  color: var(--danger);
}

.page {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  padding-top: 1.5rem;
}

.view__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: 1rem 0 1.75rem;
}

.view__title {
  font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
}

.mobnav {
  display: none;
}

/* 5. Overview
   ========================================================================== */

.hero-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  min-height: 23rem;
  padding: clamp(1.5rem, 3.5vw, 3rem);
  overflow: hidden;
  border-radius: var(--r-panel);
  background: var(--mist);
}

.hero-panel__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-panel__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(55% 75% at 18% 50%, rgb(235 230 255 / 0.9), rgb(235 230 255 / 0) 78%);
  pointer-events: none;
}

.hero-panel__hello {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero-panel__label {
  margin-top: 1.25rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
}

.hero-panel__total {
  margin-top: 0.2rem;
  font-size: clamp(3rem, 1.4rem + 5.2vw, 5.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}

.hero-panel__split {
  margin-top: 0.7rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.hero-panel__split b {
  font-weight: 600;
  color: var(--ink);
}

.hero-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.hero-panel__card {
  --w: clamp(15rem, 25vw, 22rem);
  padding: 1rem 1.5rem 1rem 0;
}

.hero-panel__card .vcard {
  --w: inherit;
  transform: rotate(-6deg);
  animation: bob 6s ease-in-out infinite alternate;
}

.ghost-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  width: var(--w);
  aspect-ratio: 1.586;
  border: 2px dashed rgb(91 61 245 / 0.35);
  border-radius: calc(var(--w) * 0.052);
  background: rgb(255 255 255 / 0.45);
  color: var(--violet);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transform: rotate(-6deg);
  transition: background-color 0.3s, transform 0.6s var(--ease-out);
}

.ghost-card:hover {
  background: rgb(255 255 255 / 0.75);
  transform: rotate(-3deg) translateY(-3px);
}

.ghost-card .icon {
  width: 2rem;
  height: 2rem;
  padding: 0.4rem;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.tile {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 15rem;
  padding: 1.5rem;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
}

.tile__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
}

.tile__label .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.tile__value {
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.tile__sub {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.tile__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.tile--bonus {
  background:
    radial-gradient(70% 90% at 100% 100%, rgb(91 61 245 / 0.55), transparent 70%),
    var(--violet-deep);
  color: #fff;
  box-shadow: none;
}

.tile--bonus .tile__label,
.tile--bonus .tile__sub {
  color: rgb(255 255 255 / 0.72);
}

.tile--bonus .tile__value {
  font-size: 1.6rem;
  letter-spacing: -0.035em;
}

.progress {
  height: 0.5rem;
  overflow: hidden;
  border-radius: var(--r-pill);
  background: var(--line);
}

.tile--bonus .progress {
  background: rgb(255 255 255 / 0.14);
}

.progress span {
  display: block;
  width: calc(var(--p, 0) * 100%);
  height: 100%;
  border-radius: inherit;
  background: var(--mint);
  transition: width 1.2s var(--ease-out);
}

.wallet-id {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wallet-id img {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
}

.wallet-id b {
  display: block;
  font-weight: 600;
}

.addr {
  padding: 0.15rem 0.5rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: var(--text-xs);
  cursor: pointer;
}

.addr:hover {
  color: var(--ink);
}

.logos {
  display: flex;
  padding-left: 0.4rem;
}

.logos img {
  width: 2.2rem;
  height: 2.2rem;
  margin-left: -0.4rem;
  border-radius: 0.65rem;
  box-shadow: 0 0 0 2.5px var(--surface);
}

.block {
  margin-top: 2.5rem;
}

.block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.block__title {
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.03em;
}


/* 6. Lists
   ========================================================================== */

.txlist {
  padding: 0.25rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.txday {
  padding: 1.1rem 0 0.2rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-soft);
}

.txrow {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 0;
  animation: rise 0.5s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}

.txrow + .txrow {
  border-top: 1px solid var(--line);
}

.txrow__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  overflow: hidden;
  border-radius: 0.85rem;
  background: var(--mist);
  color: var(--violet);
}

.txrow__icon svg {
  width: 55%;
  height: 55%;
}

.txrow__icon img {
  width: 100%;
  height: 100%;
}

.txrow__icon.tx__logo svg {
  width: 58%;
  height: 58%;
}

.txrow__icon.tx__logo--uber svg,
.txrow__icon.tx__logo--starbucks svg {
  width: 72%;
  height: 72%;
}

.txrow__icon.tx__logo--spotify { background: #191414; color: #1ed760; }
.txrow__icon.tx__logo--uber { background: #000; color: #fff; }
.txrow__icon.tx__logo--starbucks { background: #00704a; color: #fff; }

.txrow__icon--mint {
  background: var(--mint-ice);
  color: var(--mint-ink);
}

.txrow__icon--deep {
  background: var(--violet-deep);
  color: #fff;
}

.txrow__main {
  min-width: 0;
}

.txrow__main b {
  display: block;
  overflow: hidden;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.txrow__main small,
.txrow__amt small {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.txrow__amt {
  text-align: right;
}

.txrow__amt b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.txrow__amt .is-pos {
  color: var(--mint-ink);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 2.75rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--mist);
  color: var(--violet);
}

.empty__icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.empty__card {
  margin: 0.5rem 0 1rem;
  transform: rotate(-4deg);
}

.empty__card .vcard {
  --w: min(16rem, 68vw);
  animation: card-in 0.9s var(--ease-out) both;
}

.empty__badge {
  display: grid;
  place-items: center;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: var(--mint-ice);
  box-shadow: inset 0 0 0 1px rgb(7 118 85 / 0.12);
  color: var(--mint-ink);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.empty h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.empty p {
  max-width: 36ch;
  color: var(--ink-soft);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filters button {
  height: 2.4rem;
  padding: 0 1rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}

.filters button[aria-pressed="true"] {
  background: var(--ink);
  box-shadow: none;
  color: #fff;
}


/* 7. Cards
   ========================================================================== */

.cardman {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 1.25rem;
  align-items: start;
}

.cardman__stage {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 1.5rem;
  padding: clamp(2rem, 4vw, 3.5rem) 1.5rem 1.75rem;
  overflow: hidden;
  border-radius: var(--r-panel);
  background:
    radial-gradient(60% 55% at 50% 35%, rgb(255 255 255 / 0.75), transparent 72%),
    var(--mist);
}

.cardman__stage .vcard {
  --w: clamp(16rem, 32vw, 25rem);
  animation: card-in 0.9s var(--ease-out) both;
}

.card-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.card-switch button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.4rem;
  padding: 0 0.9rem 0 0.45rem;
  border: 0;
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.7);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.card-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--violet);
}

.swatch-dot {
  width: 1.7rem;
  height: 1.1rem;
  border-radius: 0.3rem;
}

.swatch-dot--pearl,
.swatch--pearl {
  background: linear-gradient(155deg, #fdfcff, #ded7f8);
  box-shadow: inset 0 0 0 1px rgb(91 61 245 / 0.18);
}

.swatch-dot--violet,
.swatch--violet {
  background: linear-gradient(155deg, #4b30e3, #1f1170);
}

.swatch-dot--ink,
.swatch--ink {
  background: linear-gradient(155deg, #2b1c64, #150c36);
}

.cardman__side {
  display: grid;
  gap: 1rem;
}

.panel {
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-1);
}

.panel--flush {
  padding: 0.25rem 0;
}

.panel__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
}

.panel__value {
  margin-top: 0.2rem;
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.panel__sub {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

.action__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color 0.25s, transform 0.4s var(--ease-out);
}

.action__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.action:hover .action__icon {
  background: var(--mist);
  transform: translateY(-2px);
}

.action--primary .action__icon {
  background: var(--violet);
  box-shadow: none;
  color: #fff;
}

.action--primary:hover .action__icon {
  background: var(--violet-hover);
}

.action.is-on .action__icon {
  background: var(--ink);
  color: #fff;
}

.srow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.25rem;
}

.srow + .srow {
  border-top: 1px solid var(--line);
}

.srow__icon {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: 0.8rem;
  background: var(--paper);
  color: var(--violet);
}

.srow__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.srow__text {
  flex: 1;
  min-width: 0;
}

.srow__text b {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
}

.srow__text small {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.srow .paymark {
  height: 2rem;
}

.in-wallet {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--mint-ink);
}

.in-wallet svg {
  width: 1rem;
  height: 1rem;
}

/* Frozen card */
.vcard.is-frozen > *:not(.vcard__frost) {
  filter: blur(1.5px) saturate(0.6);
}

.vcard__frost {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.5cqw;
  background: linear-gradient(160deg, rgb(235 245 255 / 0.55), rgb(214 204 255 / 0.4));
  color: var(--violet-deep);
  font-size: 4.5cqw;
  font-weight: 600;
}

.vcard__frost svg {
  width: 9cqw;
  height: 9cqw;
}


/* 8. Rewards
   ========================================================================== */

.rewards {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 1rem;
  align-items: start;
}

.rewards__hero {
  display: flex;
  flex-direction: column;
  min-height: 19rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: var(--r-panel);
  background: var(--mint-ice);
  color: var(--mint-ink);
}

.rewards__figure {
  font-size: clamp(4rem, 2rem + 7vw, 8rem);
  font-weight: 600;
  font-stretch: 75%;
  line-height: 0.85;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
}

.rewards__caption {
  margin-top: 1rem;
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.rewards__note {
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.how {
  margin-top: 0.5rem;
}

.how li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem 0;
}

.how li + li {
  border-top: 1px solid var(--line);
}

.how__num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--mist);
  color: var(--violet);
  font-size: var(--text-sm);
  font-weight: 600;
}

.how p {
  padding-top: 0.2rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.how b {
  color: var(--ink);
}

/* 9. Modals
   ========================================================================== */

.modal {
  width: min(28rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100svh - 1.5rem);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}

.modal::backdrop {
  background: rgb(26 20 48 / 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.modal[open] {
  animation: dialog-in 0.45s var(--ease-out);
}

.modal[open]::backdrop {
  animation: fade-in 0.3s ease-out;
}

.modal__card {
  position: relative;
  max-height: calc(100svh - 1.5rem);
  padding: 1.5rem;
  overflow: auto;
  border-radius: 1.9rem;
  background: var(--surface);
  box-shadow: 0 40px 80px -30px rgb(26 20 48 / 0.5);
  overscroll-behavior: contain;
}


/* 10. Connect wallet
   ========================================================================== */

.wm-view {
  animation: view-in 0.4s var(--ease-out) both;
}

.wm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.wm-head--center {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 2.25rem;
  align-items: center;
  text-align: center;
}

.wm-head--end {
  justify-content: flex-end;
}

.wm-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.wm-head--center .wm-title {
  font-size: 1.3rem;
}

.wm-sub {
  margin-top: 0.2rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.wm-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  height: 3.3rem;
  margin-top: 1.5rem;
  border: 0;
  border-radius: 1.1rem;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.wm-social:hover {
  background: #f7f6fb;
}

.wm-social:hover .btn-card {
  transform: rotate(0deg) translateY(-1px);
}

.wm-socials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.wm-social--sm {
  height: 2.9rem;
  margin: 0;
  font-size: var(--text-sm);
}

.wm-social--sm svg {
  width: 1.1rem;
  height: 1.1rem;
}

.wm-or {
  position: relative;
  margin: 1.1rem 0 0.8rem;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.wm-or::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--line);
}

.wm-or span {
  position: relative;
  padding: 0 0.6rem;
  background: var(--surface);
}

.wm-list {
  display: grid;
  gap: 0.5rem;
}

.wm-head + .wm-list {
  margin-top: 1.25rem;
}

.wm-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  height: 3.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 1.05rem;
  background: #f4f3f8;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.3s var(--ease-out);
}

.wm-item:hover {
  background: #ebe9f3;
}

.wm-item:active {
  transform: scale(0.985);
}

.wm-item > img {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 0.55rem;
}

.wm-item > span:not(.wm-cluster) {
  flex: 1;
}

.wm-item .icon {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--ink-soft);
  transition: transform 0.35s var(--ease-out), color 0.2s;
}

.wm-item:hover .icon {
  color: var(--ink);
  transform: translateX(3px);
}

.wm-cluster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 1.95rem;
  height: 1.95rem;
  flex: none;
}

.wm-cluster img {
  width: 100%;
  height: 100%;
  border-radius: 0.25rem;
}

.wm-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.5rem;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
}

.wm-foot:hover {
  color: var(--violet);
}

.wm-text {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--ink-soft);
}

.wm-text--center {
  max-width: 34ch;
  margin-inline: auto;
  text-align: center;
}

.wm-hint {
  margin-top: 0.85rem;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.otp input {
  min-width: 0;
  height: 3.5rem;
  border: 0;
  border-radius: 0.9rem;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--ink);
  font: inherit;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

.otp input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--violet);
}

/* "Get a wallet": four pills hang from the top, logos resting at the tips */
.wm-pills {
  display: grid;
  grid-template-columns: repeat(4, 3.9rem);
  justify-content: center;
  gap: 0.9rem;
  height: 17rem;
  margin-top: 0.5rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
  mask-image: linear-gradient(to bottom, transparent, #000 30%);
}

.wm-pill {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: var(--h);
  padding-bottom: 0.55rem;
  border-radius: 0 0 99px 99px;
  background: linear-gradient(to bottom, transparent, var(--tint));
  animation: pill-drop 1s var(--ease-out) both;
}

.wm-pill:nth-child(1) { --h: 74%; --tint: #fde3d2; animation-delay: 0.05s; }
.wm-pill:nth-child(2) { --h: 64%; --tint: #e3defb; animation-delay: 0.15s; }
.wm-pill:nth-child(3) { --h: 80%; --tint: #d4e0ff; animation-delay: 0.25s; }
.wm-pill:nth-child(4) { --h: 88%; --tint: #d3f2e3; animation-delay: 0.35s; }

.wm-pill > img,
.wm-pill > .wm-cluster {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 0.8rem;
  animation: pill-float 3.2s ease-in-out infinite alternate;
}

.wm-pill:nth-child(2) > img { animation-delay: -0.8s; }
.wm-pill:nth-child(3) > img { animation-delay: -1.6s; }
.wm-pill:nth-child(4) > .wm-cluster { animation-delay: -2.4s; }

.wm-big {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.wm-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 3.4rem;
  margin-top: 1.5rem;
  border: 0;
  border-radius: 1.1rem;
  background: #f4f3f8;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.wm-cta:hover {
  background: #ebe9f3;
}

.wm-cta .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.wm-get {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 1.05rem;
  background: #f4f3f8;
}

.wm-get img {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
}

.wm-get b {
  display: block;
  font-weight: 600;
}

.wm-get small {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.wm-get__btn {
  padding: 0.5rem 1rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
}

.wm-get__btn:hover {
  background: #2a2147;
}

.wm-connect {
  position: relative;
  display: grid;
  place-items: center;
  width: 7rem;
  height: 7rem;
  margin: 1rem auto 0;
}

.wm-connect__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--mist);
  border-top-color: var(--violet);
  animation: spin 0.9s linear infinite;
}

.wm-connect__ring::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgb(91 61 245 / 0.25);
  animation: halo 1.6s ease-out infinite;
}

.wm-connect__logo {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.3rem;
  box-shadow: 0 14px 30px -14px rgb(26 20 48 / 0.55);
}

.wm-progress {
  display: grid;
  gap: 0.7rem;
  width: fit-content;
  margin: 1.5rem auto 0.5rem;
}

.wm-progress li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--text-sm);
  color: rgb(26 20 48 / 0.4);
  transition: color 0.3s;
}

.wm-progress__dot {
  position: relative;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: background-color 0.3s, box-shadow 0.3s;
}

.wm-progress li.is-active {
  color: var(--ink);
}

.wm-progress li.is-active .wm-progress__dot {
  box-shadow: inset 0 0 0 2px var(--violet);
  animation: halo-sm 1.2s ease-out infinite;
}

.wm-progress li.is-done {
  color: var(--ink);
}

.wm-progress li.is-done .wm-progress__dot {
  background: var(--mint-ink);
  box-shadow: none;
}

.wm-progress li.is-done .wm-progress__dot::after {
  content: "";
  position: absolute;
  top: 0.32rem;
  left: 0.42rem;
  width: 0.3rem;
  height: 0.52rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.wm-done {
  display: grid;
  justify-items: center;
  margin: 0.5rem 0 1.5rem;
  text-align: center;
}

.wm-done__logo {
  position: relative;
  animation: pop 0.5s var(--ease-out) both;
}

.wm-done__logo img {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 1.35rem;
  box-shadow: 0 14px 30px -14px rgb(26 20 48 / 0.55);
}

.wm-done__tick {
  position: absolute;
  right: -0.45rem;
  bottom: -0.45rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--mint-ink);
  color: #fff;
  box-shadow: 0 0 0 3px var(--surface);
  animation: check-in 0.45s var(--ease-out) 0.25s both;
}

.wm-done__tick svg {
  width: 1.15rem;
  height: 1.15rem;
}

.wm-address {
  margin-top: 0.6rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-pill);
  background: var(--paper);
  font-family: var(--mono);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.wm-balance {
  display: grid;
  margin-top: 1rem;
}

.wm-balance span {
  font-size: 2.25rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.wm-balance small {
  font-size: var(--text-sm);
  color: var(--ink-soft);
}


/* 11. Flows (new card, top up, card details, demo purchase)
   ========================================================================== */

.flow {
  animation: view-in 0.4s var(--ease-out) both;
}

.stepper {
  display: flex;
  gap: 0.35rem;
  margin-top: 1rem;
}

.stepper span {
  flex: 1;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  transition: background-color 0.4s;
}

.stepper .is-on {
  background: var(--violet);
}

.flow__title {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.flow__text {
  margin-top: 0.4rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}

.flow__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.flow__actions .btn {
  flex: 1;
}

.flow__error {
  margin-top: 0.85rem;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--danger);
}

.preview {
  display: grid;
  place-items: center;
  margin-top: 1.25rem;
  padding: 1.75rem 1rem;
  border-radius: 1.4rem;
  background:
    radial-gradient(60% 60% at 50% 40%, rgb(255 255 255 / 0.8), transparent 72%),
    var(--mist);
}

.preview .vcard {
  --w: min(19rem, 70vw);
}

.swatches {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.swatch {
  width: 3.4rem;
  height: 2.2rem;
  padding: 0;
  border: 0;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.3s var(--ease-out);
}

.swatch[aria-checked="true"] {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--violet);
  transform: translateY(-2px);
}

.swatch-label {
  margin-top: 0.5rem;
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--ink-soft);
}

.range-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.range-row output {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.range {
  width: 100%;
  margin-top: 0.6rem;
  accent-color: var(--violet);
}

.opts {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
}

.opt {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.opt .srow__icon {
  width: 2.2rem;
  height: 2.2rem;
}

.choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice label {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.45rem;
  min-height: 4.6rem;
  padding: 0.7rem 0.4rem;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: box-shadow 0.2s, background-color 0.2s;
}

.choice label .paymark {
  height: 1.7rem;
  padding: 0 0.45rem;
}

.choice label .paymark svg {
  height: 0.9rem;
}

.choice .paymark--apple svg { width: calc(0.9rem * 2.284); }
.choice .paymark--google svg { width: calc(0.9rem * 2.44); }

.choice input:checked + label {
  background: var(--paper);
  box-shadow: inset 0 0 0 2px var(--violet);
}

.choice input:focus-visible + label {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

.summary {
  margin-top: 1rem;
  border-radius: 1.2rem;
  background: var(--paper);
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  font-size: var(--text-sm);
}

.summary div + div {
  border-top: 1px solid var(--line);
}

.summary dt {
  color: var(--ink-soft);
}

.summary dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.75rem;
  border-radius: 1.1rem;
  background: var(--paper);
}

.route__end {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.route__end:last-child {
  justify-content: flex-end;
  text-align: right;
}

.route__end img {
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 0.6rem;
}

.route__end small {
  display: block;
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.route__end > span {
  min-width: 0;
}

.route .icon {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink-soft);
}

.mini-card {
  width: 2.6rem;
  height: 1.65rem;
  flex: none;
  border-radius: 0.3rem;
}

/* A tiny Vela card (design gradient + sail mark), wherever a card glyph would go */
.minivela {
  --mw: 2.6rem;
  display: grid;
  place-items: start;
  width: var(--mw);
  height: calc(var(--mw) / 1.586);
  flex: none;
  padding: calc(var(--mw) * 0.09) calc(var(--mw) * 0.1);
  border-radius: calc(var(--mw) * 0.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16), 0 3px 8px -4px rgb(26 20 48 / 0.45);
}

.minivela.swatch-dot--pearl {
  color: var(--violet);
  box-shadow: inset 0 0 0 1px rgb(91 61 245 / 0.18), 0 3px 8px -4px rgb(26 20 48 / 0.3);
}

.minivela svg {
  width: calc(var(--mw) * 0.24);
  height: calc(var(--mw) * 0.24);
}

.srow__icon .minivela,
.txrow__icon .minivela {
  --mw: 1.85rem;
}

.txrow__icon--card {
  background: var(--paper);
}

.progress--thin {
  display: block;
  height: 0.3rem;
  margin-top: 0.55rem;
}

.progress--thin span {
  background: var(--violet);
}

.amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 1.5rem;
}

.amount span {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.amount input {
  width: 5.2ch;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: clamp(3rem, 12vw, 4.25rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.amount input:focus {
  outline: none;
}

.amount__sol {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.quick {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.quick button {
  height: 2.3rem;
  padding: 0 0.95rem;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

.quick button:hover {
  background: var(--mist);
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.8rem 0.95rem;
  border-radius: 1rem;
  background: var(--mint-ice);
  color: var(--mint-ink);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.45;
}

.callout svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  margin-top: 0.1rem;
}

.callout--violet {
  background: var(--mist);
  color: var(--violet-deep);
}

.signing {
  display: grid;
  justify-items: center;
  padding: 1rem 0 0.5rem;
  text-align: center;
}

.success {
  display: grid;
  justify-items: center;
  padding-top: 0.5rem;
  text-align: center;
}

.success .confirm {
  margin-top: 0.5rem;
}

.success .confirm__progress {
  animation: ring-fill 1s var(--ease-soft) 0.1s both;
}

.success .confirm__check {
  animation: check-in 0.45s var(--ease-out) 0.95s both;
}

.success__amount {
  margin-top: 0.75rem;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.creating {
  display: grid;
  justify-items: center;
  text-align: center;
}

.creating .preview {
  width: 100%;
}

.creating .vcard {
  animation: card-in 1.1s var(--ease-out) both;
}

.creating .vcard::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: sweep 1.4s var(--ease-soft) 0.6s infinite;
  pointer-events: none;
}

.creating__step {
  min-height: 1.5em;
  margin-top: 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
}

.details {
  margin-top: 1rem;
}

.details .srow {
  padding-inline: 0;
}

.details .srow__text b {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.merchants {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.merchant {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0;
  border-radius: 1.05rem;
  background: #f4f3f8;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.merchant:hover {
  background: #ebe9f3;
}

.merchant .tx__logo {
  width: 2.6rem;
  height: 2.6rem;
}

.merchant b {
  display: block;
  font-weight: 600;
}

.merchant small {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}

.merchant strong {
  font-variant-numeric: tabular-nums;
}

.tap {
  position: relative;
  display: grid;
  place-items: center;
  width: 7rem;
  height: 7rem;
  margin: 1rem auto 0;
  border-radius: 50%;
  background: var(--paper);
}

.tap svg {
  width: 2.75rem;
  height: 2.75rem;
  color: var(--violet);
}

.tap i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgb(91 61 245 / 0.6);
  animation: tap-ring 1.6s var(--ease-out) infinite;
}

.tap i:nth-child(2) {
  animation-delay: 0.8s;
}


/* 12. Toasts
   ========================================================================== */

.toasts {
  position: fixed;
  z-index: 200;
  right: 1.25rem;
  bottom: 1.25rem;
  display: grid;
  gap: 0.5rem;
  width: min(23rem, calc(100% - 2rem));
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  border-radius: 1.15rem;
  background: var(--ink);
  color: #fff;
  font-size: var(--text-sm);
  line-height: 1.35;
  box-shadow: var(--shadow-2);
  animation: toast-in 0.5s var(--ease-out) both;
  pointer-events: auto;
}

.toast-item.is-leaving {
  animation: toast-out 0.3s ease-in forwards;
}

.toast-item__icon {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  flex: none;
  overflow: hidden;
  border-radius: 0.7rem;
  background: rgb(255 255 255 / 0.12);
  color: var(--mint);
}

.toast-item__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.toast-item__icon img {
  width: 100%;
  height: 100%;
}

.toast-item b {
  display: block;
  font-weight: 600;
}

.toast-item small {
  color: rgb(255 255 255 / 0.7);
}


/* 13. Motion
   ========================================================================== */

.view {
  animation: rise 0.55s var(--ease-out) both;
}

.auth__step {
  animation: view-in 0.5s var(--ease-out) both;
}

.reveal-1 { animation: rise 0.7s var(--ease-out) 0.05s both; }
.reveal-2 { animation: rise 0.7s var(--ease-out) 0.12s both; }
.reveal-3 { animation: rise 0.7s var(--ease-out) 0.19s both; }

@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes halo {
  from { box-shadow: 0 0 0 0 rgb(91 61 245 / 0.28); }
  to { box-shadow: 0 0 0 1.25rem rgb(91 61 245 / 0); }
}

@keyframes halo-sm {
  from { box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 0 rgb(91 61 245 / 0.3); }
  to { box-shadow: inset 0 0 0 2px var(--violet), 0 0 0 0.5rem rgb(91 61 245 / 0); }
}

@keyframes pill-drop {
  from { transform: translateY(-100%); }
  to { transform: none; }
}

@keyframes pill-float {
  from { transform: translateY(-3px); }
  to { transform: translateY(4px); }
}

@keyframes sweep {
  to { transform: translateX(120%); }
}

@keyframes tap-ring {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(1.6); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}


/* 14. Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tile--bonus {
    grid-column: 1 / -1;
    order: -1;
    min-height: auto;
  }
}

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: 1fr auto;
    height: 4rem;
  }

  .topnav {
    display: none;
  }

  .mobnav {
    position: fixed;
    z-index: 40;
    inset: auto 0.75rem max(0.75rem, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0.35rem;
    border-radius: 1.5rem;
    background: rgb(255 255 255 / 0.88);
    box-shadow: 0 0 0 1px var(--line), var(--shadow-2);
    -webkit-backdrop-filter: saturate(1.5) blur(16px);
    backdrop-filter: saturate(1.5) blur(16px);
  }

  .mobnav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.45rem 0;
    border: 0;
    border-radius: 1.15rem;
    background: none;
    color: var(--ink-soft);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
  }

  .mobnav svg {
    width: 1.4rem;
    height: 1.4rem;
  }

  .mobnav button[aria-current="page"] {
    background: var(--mist);
    color: var(--violet);
  }

  .shell {
    padding-bottom: 7rem;
  }

  .cardman,
  .rewards {
    grid-template-columns: minmax(0, 1fr);
  }

  .cardman__stage .vcard {
    --w: min(22rem, 78vw);
  }

  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth__art {
    min-height: 15rem;
  }

  .auth__cards {
    display: none;
  }

  .auth__headline {
    margin-top: 2rem;
    font-size: clamp(2.25rem, 1.2rem + 5vw, 3.5rem);
  }

  .auth__brand-mobile {
    visibility: visible;
  }

  .auth__art .auth__brand {
    display: none;
  }
}

@media (max-width: 720px) {
  .hero-panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }

  .hero-panel__card {
    --w: min(17rem, 68vw);
    justify-self: center;
    padding: 0.5rem 0 1rem;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile {
    min-height: auto;
  }

  .wallet-chip > span:not(.wallet-chip__bal, .btn-card) {
    display: none;
  }

  .wallet-chip--connect > span:not(.btn-card) {
    display: inline !important;
  }
}

@media (max-width: 640px) {
  .auth {
    padding: 0.5rem;
  }

  .auth__art {
    min-height: 12rem;
  }

  .auth__panel {
    padding-inline: 0.5rem;
  }

  .modal {
    width: 100%;
    max-height: 94svh;
    margin: auto auto 0;
  }

  .modal__card {
    max-height: 94svh;
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    border-radius: 1.75rem 1.75rem 0 0;
  }

  .modal[open] {
    animation: sheet-up 0.45s var(--ease-out);
  }

  .toasts {
    top: 0.75rem;
    right: 50%;
    bottom: auto;
    transform: translateX(50%);
  }

  .actions {
    gap: 0.25rem;
  }

  .txlist {
    padding-inline: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-panel__actions .btn {
    flex: 1 1 100%;
    height: 3.25rem;
  }

  .hero-panel__total {
    font-size: clamp(2.6rem, 14vw, 3.5rem);
  }

  .route .mini-card {
    display: none;
  }

  .view__title {
    font-size: 2.25rem;
  }

  .actions .action__icon {
    width: 2.9rem;
    height: 2.9rem;
  }
}

@media (max-width: 400px) {
  .keyfacts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
  }
}

@keyframes sheet-up {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-panel__card .vcard,
  .auth__card--front .vcard,
  .wm-pill > img,
  .wm-pill > .wm-cluster {
    animation: none !important;
  }
}
