/* Shared by the wallet and the server-rendered sign-in page. */
:root {
  --brand-green: #20483c;
  --duck-size: clamp(5.5rem, 9vw, 6.5rem);
  --brand-inset: .65rem;
  --brand-type: clamp(2.75rem, 5vw, 3.4rem);
  --balance-type: clamp(3.75rem, 7vw, 4.6rem);
  --brand-height: calc(var(--duck-size) + 2 * var(--brand-inset));
  scroll-padding-block-start: calc(var(--brand-height) + .75rem);
  font-family: "DM Sans", system-ui, sans-serif;
  color: #203f36;
  background-color: #edf2e9;
  background-image: radial-gradient(#b9caba 1px, transparent 1px);
  background-size: 16px 16px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
.wallet-shell {
  --gutter: clamp(1rem, 4vw, 2.25rem);
  width: min(calc(100% - 3rem), 46rem);
  margin: clamp(1.5rem, 4vw, 3.5rem) auto;
  background: #fffdf6;
  border: 1px solid #b4c5b8;
  border-radius: 1.65rem;
  box-shadow: 0 6px 0 #d7e1d2, 0 16px 50px -26px #304e3a44;
}
.brand-header {
  position: sticky;
  top: 0;
  z-index: 3;
  isolation: isolate;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
  padding: var(--brand-inset) var(--gutter);
  color: #fffdf6;
  background: var(--brand-green);
}
/* Only the backdrop clips its ripples; tall mascot art can overlap the card. */
.brand-ripples {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}
.brand-ripples::before,
.brand-ripples::after {
  content: "";
  position: absolute;
  width: 11rem;
  height: 3.5rem;
  border: 1px solid #54806b;
  border-radius: 50%;
  box-shadow: 0 0 0 10px #20483c, 0 0 0 11px #416c58, 0 0 0 24px #20483c, 0 0 0 25px #375f50;
  transform: rotate(-12deg);
}
.brand-ripples::before { left: -3.6rem; bottom: -2.9rem; }
.brand-ripples::after { left: 44%; top: -3.7rem; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: clamp(.25rem, .8vw, .7rem);
  font-family: ui-rounded, "DM Sans", system-ui, sans-serif;
  font-weight: 850;
  font-size: var(--brand-type);
  line-height: 1;
  letter-spacing: -.065em;
}
.wordmark img {
  width: var(--duck-size);
  height: auto;
  transform: rotate(-6deg);
}
.wallet-balance {
  container-type: inline-size;
  min-width: 0;
  text-align: end;
}
.wallet-balance small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: .18rem;
  color: #e0eddc;
  font-size: clamp(.75rem, 1.8vw, .875rem);
  line-height: 1.25;
  font-weight: 550;
}
.wallet-balance strong {
  display: block;
  overflow-wrap: anywhere;
  color: #ffe078;
  font-family: ui-rounded, "DM Sans", system-ui, sans-serif;
  font-size: var(--balance-type);
  /* Fit long balances in their own column without rounding the amount. */
  font-size: clamp(1rem, calc(144cqi / var(--balance-characters, 1)), var(--balance-type));
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.balance-currency {
  font-size: var(--brand-type);
  font-weight: 850;
  letter-spacing: -.065em;
}
@media (max-width: 620px) {
  :root {
    --duck-size: clamp(4.25rem, 18vw, 5.25rem);
    --brand-inset: .55rem;
    --brand-type: clamp(2.125rem, 9vw, 2.75rem);
    --balance-type: clamp(3rem, 13vw, 3.75rem);
    background: #fffdf6;
  }
  .wallet-shell { width: 100%; min-height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
}
@media (max-height: 480px) {
  :root {
    --duck-size: 3.5rem;
    --brand-inset: .25rem;
    --brand-type: 2.25rem;
    --balance-type: 2.625rem;
  }
}
@media print {
  .brand-header { position: relative; }
}
