dialog {
  --sheet-gutter: 24px;
  --radio-edge: #82827b;
  --radio-surface: #fff;
  border: 0;
  border-top: 1px solid #e6e6df;
  border-radius: 23px 23px 0 0;
  padding: 0 0 max(18px, env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top, 0px)));
  box-shadow: 0 -12px 50px #24242414;
  overflow: hidden;
}

dialog[open] {
  display: flex;
  flex-direction: column;
  animation: sheet-enter 240ms cubic-bezier(.2,.8,.25,1) both;
}

dialog::backdrop {
  background: #24242442;
  backdrop-filter: none;
  animation: sheet-backdrop-in 200ms ease-out both;
}

dialog[open].is-closing { animation: sheet-exit 170ms ease-in both; pointer-events: none; }
dialog.is-closing::backdrop { animation: sheet-backdrop-out 170ms ease-in both; }

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

@keyframes sheet-exit {
  to { opacity: 0; transform: translateY(20px); }
}

@keyframes sheet-backdrop-in { from { opacity: 0; } }
@keyframes sheet-backdrop-out { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  dialog[open], dialog[open].is-closing,
  dialog::backdrop, dialog.is-closing::backdrop { animation: none; }
}

.dialog-header {
  margin: 0;
  padding: 17px var(--sheet-gutter) 12px;
  flex-shrink: 0;
}

.dialog-header h2 { font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.dialog-header .icon-button { background: #f5f5f3; color: #555550; margin-right: -6px; }
.dialog-header .icon-button:active { background: #eaeae6; }

#dialog-content {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
  padding: 0 var(--sheet-gutter);
  scroll-padding: 12px 0;
}

dialog:has(#dialog-footer:not([hidden])) #dialog-content { padding-bottom: 12px; }

#dialog-footer {
  padding: 8px var(--sheet-gutter) 0;
  flex-shrink: 0;
}

html:has(dialog[open]) { overflow: hidden; }
#dialog-content form > label:first-child, #dialog-content > .notice:first-child { margin-top: 0; }
.help-step { align-items: center; margin: 0 0 12px; }
.install-guide { margin: 0; padding: 0; list-style: none; }
.install-guide > li + li { margin-block-start: 24px; }
.install-guide h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}
.install-step-number {
  --button-glass-strength: .24;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--coral);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.install-guide p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.install-guide p strong { font-weight: 500; }
.install-guide p a { text-decoration: underline; text-underline-offset: 2px; }

.install-capture {
  position: relative;
  overflow: hidden;
  margin: 10px 0;
  border-radius: 12px;
  background: #1a1c1f;
}
.install-capture img { display: block; width: 100%; height: auto; }
.install-capture::after, .install-capture-chrome-desktop::before {
  position: absolute;
  inset: var(--install-tap-target);
  border: 2px solid #ffbd94;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #1d1d1f;
  pointer-events: none;
  content: '';
}
/* Each inset marks the tap target within the visible screenshot crop. */
.install-capture-more { --install-tap-target: 26.8% 7.2% 23.7% 78.4%; }
.install-capture-share { --install-tap-target: 20% 52.1% 54.8% 12.7%; }
.install-capture-expand { --install-tap-target: 49.4% 5.7% 11.4% 71.7%; }
.install-capture-home { --install-tap-target: 24.5% 2% 47.8% 2.2%; }
.install-capture-add { --install-tap-target: 10.2% 1.8% 60.4% 78.1%; }
.install-capture-chrome-android {
  --install-tap-target: 3.5% 3.4% 56% 3.2%;
  aspect-ratio: 462 / 170;
}
.install-capture-chrome-android img {
  position: absolute;
  top: -702.35%;
  left: -57.36%;
  width: 159.74%;
}
.install-capture-chrome-android-toolbar {
  --install-tap-target: 12% 1.2% 12% 89.4%;
  --install-crop-top: -77.78%;
  aspect-ratio: 738 / 99;
  container-type: inline-size;
}
.install-capture-chrome-android-choice {
  --install-tap-target: 34.5% 6.5% 37% 6.5%;
  --install-crop-top: -279.8%;
  aspect-ratio: 738 / 391;
}
.install-capture-chrome-android-confirm {
  --install-tap-target: 69.6% 8.5% 11.3% 74.4%;
  --install-crop-top: -165.98%;
  aspect-ratio: 738 / 388;
  container-type: inline-size;
}
:is(.install-capture-chrome-android-toolbar, .install-capture-chrome-android-choice, .install-capture-chrome-android-confirm) > img:first-child {
  position: absolute;
  top: var(--install-crop-top);
}
.install-chrome-address, .install-chrome-app-details {
  position: absolute;
  display: flex;
  color: #dfe4df;
  font-family: Roboto, Arial, sans-serif;
  font-weight: 400;
  white-space: nowrap;
}
.install-chrome-address {
  inset: 29% 37.8% 31% 19.4%;
  align-items: center;
  background: #202b25;
  font-size: 3.8cqw;
}
.install-chrome-app-details {
  inset: 36% 46% 42% 20.8%;
  flex-direction: column;
  justify-content: center;
  background: #1e2923;
  font-size: 4.75cqw;
  line-height: 1.22;
}
.install-chrome-app-details span + span { color: #bac3bd; font-size: 3.4cqw; }
.install-capture img.install-chrome-app-icon { position: absolute; width: 10.5%; }
.install-capture-chrome-android-confirm .install-chrome-app-icon { top: 37.4%; left: 8.2%; width: 9.2%; }
.install-chrome-choice-icons .install-chrome-app-icon {
  top: 38.8%;
  left: 8.94%;
  /* Leave Chrome’s original action badge visible in the corner. */
  mask-image: radial-gradient(circle at 79% 79%, transparent 0 18%, #000 19%);
}
.install-chrome-choice-icons .install-chrome-app-icon + .install-chrome-app-icon { top: 71.1%; }
.install-capture-chrome-desktop { --install-tap-target: 56% .5% 22% 60%; }
.install-capture-chrome-desktop::before { inset: 2% 41% 74% .5%; }
.install-capture-chrome-desktop-toolbar {
  --install-tap-target: 62% 9.3% 2% 84%;
  aspect-ratio: 509 / 90;
  container-type: inline-size;
}
.install-capture-chrome-desktop-confirm {
  --install-tap-target: 72.5% 4.7% 9.8% 77.3%;
  aspect-ratio: 914 / 461;
  container-type: inline-size;
}
.install-capture-chrome-desktop-confirm > img:first-child {
  position: absolute;
  top: -37.96%;
  left: -71.12%;
  width: 171.12%;
}
.install-chrome-desktop-name, .install-chrome-desktop-url {
  position: absolute;
  display: flex;
  align-items: center;
  color: #ddd;
  font-family: Arial, sans-serif;
  font-weight: 400;
  white-space: nowrap;
}
.install-capture-chrome-desktop-toolbar .install-chrome-desktop-name {
  inset: 24% 39% 56% 25.8%;
  background: #3c3c3c;
  font-size: 2.55cqw;
}
.install-capture-chrome-desktop-toolbar .install-chrome-desktop-url {
  inset: 71% 20% 6% 32.4%;
  background: #282828;
  font-size: 2.75cqw;
}
.install-capture-chrome-desktop-toolbar img.install-chrome-app-icon {
  top: 25%;
  left: 21.2%;
  width: 3.5%;
  border-radius: 16%;
}
.install-capture-chrome-desktop-confirm .install-chrome-desktop-name {
  inset: 39.2% 57% 53.2% 17.8%;
  background: #1d1d1d;
  font-size: 2.65cqw;
}
.install-capture-chrome-desktop-confirm .install-chrome-desktop-url {
  inset: 55% 59% 38% 15.7%;
  background: #1d1d1d;
  color: #c5c5c5;
  font-size: 2.65cqw;
}
.install-capture-chrome-desktop-confirm img.install-chrome-app-icon {
  top: 35.9%;
  left: 5.15%;
  width: 7.35%;
  border-radius: 14%;
}
.install-capture-more, .install-capture-add { container-type: inline-size; }

/* Match the text fields in the Safari crops at every display size. */
:is(.install-capture-address, .install-capture-name, .install-capture-url) {
  position: absolute;
  display: flex;
  align-items: center;
  color: #f4f4f8;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}
.install-capture-address {
  inset: 42% 32.4% 40% 33.2%;
  justify-content: center;
  background: #202328;
  font-size: clamp(9px, 3.2cqw, 16px);
}
.install-capture-name, .install-capture-url {
  left: 22.4%;
  background: #2a292b;
  font-size: clamp(10px, 4.15cqw, 20px);
}
.install-capture-name { top: 56%; right: 9%; height: 13.5%; }
.install-capture-url { top: 81.5%; right: 2%; height: 13%; color: #89888e; }
.install-capture-app-icon {
  position: absolute;
  top: 59.4%;
  left: 3.25%;
  display: grid;
  place-items: center;
  width: 15.9%;
  aspect-ratio: 1;
  background: #2a292b;
}
.install-capture-app-icon img {
  width: 94%;
  border-radius: 24%;
}

.install-more-help summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 44px;
  padding-block: 6px;
  list-style: none;
  color: var(--coral);
  font-size: 14px;
  cursor: pointer;
}
.install-more-help summary::-webkit-details-marker { display: none; }
.install-more-help summary:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
.install-more-help summary svg { width: 13px; height: 13px; }

.dialog-actions { margin: 0; padding: 0; gap: 12px; }
#dialog-footer .primary { min-height: 52px; }
.form-error:empty { display: none; }
.form-error { margin-bottom: 0; }
#verification-call { width: 100%; margin-top: 12px; }

.settings-menu {
  display: grid;
  gap: 12px;
  min-inline-size: 0;
}

.settings-group { display: grid; min-inline-size: 0; }
.settings-appearance {
  border-block-start: 1px solid var(--line);
  padding-block-start: 5px;
}

.settings-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  text-align: start;
  font-size: 14px;
}
.settings-row[hidden] { display: none; }
[data-action][aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.share-link-status:not(:empty) { margin-top: 10px; color: var(--muted); font-size: 13px; }

.settings-label { min-inline-size: 0; overflow-wrap: anywhere; }
.settings-icon { color: #65655e; }
.settings-icon svg { width: 19px; height: 19px; }
.settings-chevron { color: var(--muted); opacity: .8; }
.settings-chevron svg { width: 13px; height: 13px; }
.settings-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

.theme-background-setting { padding: 0 12px 10px; }

.background-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 24px;
  background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--line);
}

.background-options label { position: relative; flex: 1 0 auto; margin: 0; cursor: pointer; }
.background-options input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.background-options label span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 2px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  overflow-wrap: anywhere;
}
.background-options input:checked + span {
  color: inherit;
  background: var(--background-choice, #fff);
  box-shadow: inset 0 0 0 1px var(--line);
}
.background-options input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: -3px; }

.plan-list { isolation: isolate; border: 0; padding: 0; margin: 0; min-inline-size: 0; }

.plan-list legend {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}

.plan-option {
  position: relative;
  border: 0;
  border-radius: 20px;
  padding: 10px 12px;
  min-height: 56px;
  margin: 0;
}

.plan-option + .plan-option { margin-top: 3px; }
.plan-option:has(input:checked) { background: transparent; }
.plan-selection {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  visibility: hidden;
  background: var(--soft);
  opacity: .6;
}
.plan-option:has(input:checked) .plan-selection { visibility: visible; }
:is(.plan-option, .network-option) input {
  appearance: none;
  order: 2;
  width: 18px;
  height: 18px;
  margin: 0 0 0 2px;
  border: 1px solid var(--radio-edge);
  border-radius: 50%;
  background-color: var(--radio-surface);
}
:is(.plan-option, .network-option) input:checked {
  border-color: var(--coral);
  background-color: var(--coral);
  box-shadow: inset 0 0 0 4px var(--radio-surface);
}
@media (prefers-reduced-motion: no-preference) {
  :is(.plan-option, .network-option) input { transition: border-color 140ms ease-out, background-color 140ms ease-out, box-shadow 140ms ease-out; }
}
.plan-option strong { font-weight: 600; }
.plan-option small { margin-top: 2px; color: #686861; }
.plan-option .price { font-weight: 500; font-variant-numeric: tabular-nums; }

.phone-field { position: relative; }
.phone-field input[type="tel"] {
  min-height: 56px;
  padding-inline-end: 50px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .015em;
}
.phone-network-logo {
  position: absolute;
  inset-inline-end: 10px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.phone-network-logo[hidden] { display: none; }

.network-picker {
  border: 0;
  margin: 18px 0 0;
  padding: 0;
  min-inline-size: 0;
}

.network-picker legend {
  padding: 0;
  margin-block-end: 8px;
  font-size: 13px;
  font-weight: 600;
}

#network-suggestion {
  margin-inline-start: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.network-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.network-option {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 54px;
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--network-field, #fbfaf8);
  cursor: pointer;
}

.network-option:has(input:checked) {
  background: var(--soft);
  border-color: var(--radio-edge);
}

.network-option:has(input:focus-visible) {
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

.network-option input:focus-visible { outline: none; }
.network-name { min-inline-size: 0; overflow-wrap: anywhere; }

.network-logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--soft);
}

[data-theme="day"] :is(.network-option:has([value="MTN"]) .network-logo, .phone-network-logo[data-network="MTN"]) {
  background: color-mix(in srgb, var(--day-ink) 88%, var(--coral));
}
.network-logo img { display: block; object-fit: contain; }

.sheet-select { position: relative; }
.sheet-select select {
  appearance: none;
  padding-inline-end: 42px;
}
.sheet-select-chevron {
  position: absolute;
  inset-inline-end: 15px;
  inset-block-start: 50%;
  transform: translateY(-50%) rotate(90deg);
  pointer-events: none;
  color: var(--muted);
}
.sheet-select-chevron svg { width: 14px; height: 14px; }

.amount-field { position: relative; }
.amount-field > span {
  position: absolute;
  inset-inline-start: 14px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  color: #686861;
  pointer-events: none;
}
.amount-field input[type="number"] {
  appearance: textfield;
  padding-inline-start: 36px;
  font-variant-numeric: tabular-nums;
}

.amount-field input[type="number"]::-webkit-inner-spin-button,
.amount-field input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.amount-shortcuts button {
  flex: 1 0 auto;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.amount-shortcuts button[aria-pressed="true"] {
  border-color: var(--coral);
  background-color: var(--soft);
}

.amount-shortcuts button:active { background-color: var(--soft); }

.icon-credit { margin-top: 16px; font-size: 12px; color: var(--muted); }
.icon-credit a { text-decoration: underline; text-underline-offset: 2px; }
.notice { background: #f6f6f3; }
.notice:last-child { margin-bottom: 0; }
.sheet-confirm { width: 100%; }

.switch-row { min-height: 48px; margin: 0; cursor: pointer; }
.reminder-switch { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; height: 44px; }
.reminder-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.reminder-switch .switch-track { pointer-events: none; }
.reminder-switch input:focus-visible + .switch-track { outline: 3px solid var(--coral); outline-offset: 3px; }

.switch-track {
  --thumb-size: 14px;
  --thumb-inset: 3px;
  --thumb-position: var(--thumb-inset);
  --thumb-color: var(--switch-thumb, #5f5668);
  position: relative;
  display: block;
  width: 38px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--switch-edge, #817789);
  border-radius: 999px;
  background: var(--switch-surface, #f0edf1);
}

.switch-track::after {
  content: '';
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: var(--thumb-position);
  width: var(--thumb-size);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background-color: var(--thumb-color);
}

:is([aria-checked="true"] > .switch-track, input:checked + .switch-track) {
  --thumb-position: calc(100% - var(--thumb-inset) - var(--thumb-size));
  --thumb-color: var(--switch-active-thumb, #fff);
  border-color: var(--switch-active-edge, var(--coral));
  background: var(--switch-active-surface, var(--coral));
}

@media (prefers-reduced-motion: no-preference) {
  .switch-track::after {
    transition: inset-inline-start 160ms cubic-bezier(.2,.75,.3,1), background-color 160ms ease-out;
  }
}

@media (max-width: 360px) {
  dialog { --sheet-gutter: 20px; }
  .dialog-header h2 { font-size: 21px; }
  #dialog-footer .primary { padding-inline: 12px; }
}

@media (max-width: 400px) {
  .background-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-radius: 18px;
  }

  .background-options label span { border-radius: 14px; }
}

@media (hover: hover) and (pointer: fine) {
  .amount-shortcuts button:hover { background-color: var(--soft); }
  .dialog-header .icon-button:hover { background: #eeeee9; }
  .settings-menu button:hover { background-color: var(--soft); }
}

@media (forced-colors: active) {
  .sheet-select select { appearance: auto; padding-inline-end: 13px; }
  .sheet-select-chevron { display: none; }
  :is(.plan-option, .network-option) input { appearance: auto; }
  :is(.plan-option, .network-option) input:checked { box-shadow: none; }
  .switch-track,
  :is([aria-checked="true"] > .switch-track, input:checked + .switch-track) { border-color: ButtonText; }
  .switch-track::after { forced-color-adjust: none; background: ButtonText; }
  .background-options input:checked:not(:focus-visible) + span { outline: 1px solid CanvasText; }
}

.wallet-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #0003;
  opacity: 0;
  pointer-events: none;
}

.wallet-scrim.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.wallet-mascot { display: none; }

@media (min-width: 320px) and (forced-colors: none) {
  :root:not([data-mascot-disabled], :has(dialog[open])) .wallet-mascot {
    display: block;
  }

  .wallet-mascot {
    --helmet-highlight: #fff9e9;
    --helmet-light: color-mix(in srgb, var(--coral) 27%, #fff7e7);
    --helmet-shade: color-mix(in srgb, var(--coral) 65%, #594441);
    --mascot-eyes: color-mix(in srgb, var(--coral) 25%, #fff7dc);
    --mascot-bubble-fill: color-mix(in srgb, var(--app-chrome, #fff) 88%, var(--coral));
    --mascot-bubble-edge: color-mix(in srgb, currentColor 17%, var(--mascot-bubble-fill));
    position: absolute;
    inset-block-start: -34px;
    inset-inline-end: clamp(18px, 6.5vw, 30px);
    /* Under the reflected light and the solid drawer face. */
    z-index: -4;
    inline-size: 42px;
    translate: 0 var(--mascot-dock-depth, 0px);
    pointer-events: none;
  }

  .call-dock[data-wallet-stop="rest"]:not(.is-wallet-dragging, .is-wallet-settling):has(.add-money:not([aria-disabled="true"]))
  .wallet-mascot[data-shortfall]::after {
    content: attr(data-shortfall);
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: calc(100% + 9px);
    padding: 5px 10px;
    border: 1px solid var(--mascot-bubble-edge);
    border-radius: 11px 7px 7px 11px;
    background: var(--mascot-bubble-fill);
    font-size: 11px;
    font-weight: 550;
    line-height: 1.3;
    white-space: nowrap;
  }

  .call-dock[data-wallet-stop="rest"]:not(.is-wallet-dragging, .is-wallet-settling):has(.add-money:not([aria-disabled="true"]))
  .wallet-mascot[data-shortfall]::before {
    content: '';
    position: absolute;
    z-index: 1;
    inset-block-start: calc(.65em + 2.5px);
    inset-inline-end: calc(100% + 6px);
    inline-size: 7px;
    block-size: 7px;
    box-sizing: border-box;
    border-block-start: 1px solid var(--mascot-bubble-edge);
    border-inline-end: 1px solid var(--mascot-bubble-edge);
    border-start-end-radius: 2px;
    background: var(--mascot-bubble-fill);
    font-size: 11px;
    transform: rotate(45deg);
  }

  :root:not([data-mascot-disabled], :has(dialog[open]))
  .call-dock[data-wallet-stop="rest"]:not(.is-wallet-dragging, .is-wallet-settling):has(.add-money:not([aria-disabled="true"]))
  .wallet-shortfall:not(:empty) {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .call-dock:is(:not([data-wallet-stop="rest"]), .is-wallet-dragging, .is-wallet-settling) > .wallet-mascot {
    --mascot-dock-depth: 56px;
    --mascot-dock-duration: 140ms;
  }

  .wallet-mascot-figure {
    position: relative;
    block-size: 60px;
    transform-origin: 50% 62%;
  }

  .wallet-mascot-body {
    position: absolute;
    inset: 31px 8px 0;
    border-radius: 45% 45% 38% 38%;
    background: linear-gradient(120deg, var(--helmet-light), var(--helmet-shade) 78%);
    box-shadow: inset 0 0 0 1px #291a2636;
  }

  .wallet-mascot-helmet {
    position: absolute;
    inset: 9px 0 auto;
    display: grid;
    place-items: center;
    block-size: 30px;
    border-radius: 52% 52% 44% 44% / 58% 58% 42% 42%;
    background: linear-gradient(150deg, var(--helmet-highlight), var(--helmet-light) 38%, var(--helmet-shade));
    box-shadow: inset 0 1px 1px #fff5, inset 0 -1px 1px #32201940, 0 2px 5px #22181e26;
  }

  .wallet-mascot-helmet::before,
  .wallet-mascot-helmet::after {
    content: '';
    position: absolute;
  }

  .wallet-mascot-helmet::before {
    inset: -6px 10px auto auto;
    width: 2px;
    height: 8px;
    border-radius: 2px;
    background: var(--helmet-shade);
    transform: rotate(18deg);
  }

  .wallet-mascot-helmet::after {
    inset: -8px 8px auto auto;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--helmet-light);
    box-shadow: inset 0 0 0 1px var(--helmet-shade);
  }

  .wallet-mascot-visor {
    display: grid;
    place-items: center;
    width: 29px;
    height: 16px;
    margin-top: 2px;
    border-radius: 46% 46% 39% 39%;
    background: linear-gradient(155deg, #493e3d, #211c21 64%);
    box-shadow: 0 1px 0 #fff6, inset 0 1px 2px #181319a6;
  }

  .wallet-mascot-eyes { display: flex; gap: 7px; }

  .wallet-mascot-visor span {
    width: 3px;
    height: 5px;
    border-radius: 3px;
    background: var(--mascot-eyes);
    box-shadow: 0 0 3px var(--mascot-eyes);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .wallet-mascot {
    animation: wallet-mascot-peek 34s ease-in-out infinite;
    transition: translate var(--mascot-dock-duration, 260ms) cubic-bezier(.2,.7,.3,1);
  }
  .wallet-mascot[data-shortfall] { animation: none; }
  .wallet-mascot-visor span { animation: wallet-mascot-blink 23s infinite; }
  .call-dock[data-wallet-shortfall]:has(.add-money:not([aria-disabled="true"])) .wallet-mascot-eyes {
    animation: wallet-mascot-glance 2s ease-in-out 250ms;
  }
}

@keyframes wallet-mascot-glance {
  0%, 15%, 100% { transform: translate(0, 0); }
  34%, 74% { transform: translate(-1.5px, 2px); }
}

@keyframes wallet-mascot-peek {
  0%, 45%, 52.5%, 100% { transform: translateY(0); }
  48%, 49.5% { transform: translateY(48px); }
}

@keyframes wallet-mascot-blink {
  0%, 31%, 32.4%, 79%, 80.4%, 100% { transform: scaleY(1); }
  31.6%, 79.6% { transform: scaleY(.18); }
}

.call-dock {
  --wallet-stop-offset: var(--wallet-rest-top);
  --wallet-gutter: 26px;
  --wallet-rise: clamp(14px, 4.5vw, 20px);
  --wallet-radius: 50% 50% 0 0 / var(--wallet-rise) var(--wallet-rise) 0 0;
  --wallet-body-surface: none;
  --wallet-body-color: #fff;
  position: absolute;
  inset: 0;
  z-index: 2;
  border-top: 1px solid transparent;
  border-radius: var(--wallet-radius);
  transform: translate3d(0, var(--wallet-stop-offset), 0);
  will-change: transform;
}

.call-dock::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  --shadow-rgb: var(--wallet-rim-shadow-rgb, 51, 35, 30);
  --shadow-strength: var(--wallet-rim-shadow-strength, .105);
  --wallet-rim-shade: linear-gradient(to bottom,
    rgba(var(--shadow-rgb), var(--shadow-strength)),
    rgba(var(--shadow-rgb), calc(var(--shadow-strength) * .82)) 18%,
    rgba(var(--shadow-rgb), calc(var(--shadow-strength) * .45)) 40%,
    rgba(var(--shadow-rgb), calc(var(--shadow-strength) * .15)) 65%,
    rgba(var(--shadow-rgb), calc(var(--shadow-strength) * .035)) 84%,
    rgba(var(--shadow-rgb), 0));
  border-radius: inherit;
  background:
    var(--wallet-rim-shade) top / 100% calc(var(--wallet-rise) + 48px) no-repeat,
    var(--wallet-body-surface) var(--wallet-body-color);
  pointer-events: none;
}

.call-dock::after {
  content: '';
  position: absolute;
  inset: -1px 0 auto;
  block-size: calc(var(--wallet-rise) + 12px);
  border-radius: inherit;
  box-shadow: inset 0 1.5px 1.5px var(--wallet-rim-light, #fffbe1a6);
  mask-image: radial-gradient(ellipse 67% 118% at 50% 0%, #000 26%, #000d 53%, #0005 79%, transparent);
  pointer-events: none;
}

.call-dock[data-wallet-stop="middle"] {
  --wallet-stop-offset: calc((var(--wallet-rest-top) + var(--wallet-full-top)) * .5);
}

.call-dock[data-wallet-stop="full"] {
  --wallet-stop-offset: var(--wallet-full-top);
}

.wallet-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  block-size: calc(100% - var(--wallet-full-top));
}

.call-dock.is-wallet-dragging {
  transition: none;
  user-select: none;
  -webkit-user-select: none;
}

.wallet-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior-y: contain;
  padding: 0 var(--wallet-gutter) calc(18px + max(env(safe-area-inset-bottom, 0px), var(--home-gesture-height, 0px)));
}

.home-gesture-edge { display: none; }
[data-apple-standalone] .app-shell { --home-gesture-height: max(16px, env(safe-area-inset-bottom, 0px)); }

/* Keep the system gesture outside the wallet's drag and scroll targets without painting over the sheet. */
[data-apple-standalone] .home-gesture-edge {
  display: block;
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  block-size: var(--home-gesture-height);
  touch-action: auto;
}

.wallet-scroll.is-scrollable { overflow-y: auto; }

.call-dock:not([data-wallet-stop="full"]),
.call-dock:not([data-wallet-stop="full"]) .wallet-scroll { touch-action: none; }

.wallet-older-history {
  border-block-start: 1px solid var(--line);
  opacity: 1;
}
.call-dock[data-wallet-stop="rest"]:not(.is-wallet-dragging) .wallet-older-history { opacity: 0; }

.wallet-history {
  margin-block: 18px 4px;
}

.wallet-history-grip {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 80px;
  min-height: 44px;
  margin-inline: auto;
  padding: 0 0 8px;
  border-radius: 10px;
  cursor: grab;
  touch-action: none;
}

.wallet-history-grip::before {
  content: '';
  width: 38px;
  height: 5px;
  border-radius: 999px;
  background: var(--wallet-grip-recess, #8b8a8170);
  box-shadow: inset 0 1px 1px var(--wallet-grip-shadow, #2c211b32),
    0 1px 0 var(--wallet-grip-lip, #fffc);
}

.wallet-summary { padding-top: 0; border-top: 0; }
button[aria-busy="true"] { cursor: progress; }
button[aria-busy="true"]::before {
  content: '';
  display: inline-block;
  inline-size: .9em;
  block-size: .9em;
  flex: none;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  vertical-align: -.08em;
}
#verification-call[aria-busy="true"]::before,
#app-update-button[aria-busy="true"]::before { margin-inline-end: .45em; }
.settings-row[aria-busy="true"]::before { grid-area: 1 / 3; justify-self: center; }
.settings-row[aria-busy="true"] .settings-chevron { visibility: hidden; grid-area: 1 / 3; }
@media (prefers-reduced-motion: no-preference) {
  button[aria-busy="true"]::before { animation: button-request-spin .8s linear infinite; }
}
@keyframes button-request-spin { to { transform: rotate(360deg); } }
.wallet-balance-status {
  display: none;
  min-block-size: 1.65rem;
  margin-block-start: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
[data-service-mode]:not([data-customer-loaded]) .wallet-balance-field { min-block-size: 46px; }
[data-service-mode]:not([data-customer-loaded]) .wallet-balance-field:not(:has(.wallet-balance-status:not([hidden]))) {
  visibility: hidden;
}
[data-service-mode]:not([data-customer-loaded]) .wallet-balance-status:not([hidden]) { display: flex; }
.wallet-funding { display: flex; flex-direction: column; align-items: flex-end; }
.wallet-shortfall { font-size: 12px; color: var(--muted); text-align: end; }
.wallet-shortfall:not(:empty) { margin-top: 5px; }
.wallet-history-grip:active { background: transparent; cursor: grabbing; }
.wallet-history-grip:is(:active, :focus-visible)::before {
  background: color-mix(in srgb, var(--coral) 44%, var(--wallet-grip-recess, #8b8a8170));
}

@media (forced-colors: active) {
  .call-dock { border-top-color: CanvasText; }
  .wallet-history-grip::before { background: ButtonText; box-shadow: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .call-dock:not(.is-wallet-dragging) { transition: transform 330ms cubic-bezier(.22, .85, .27, 1); }
  .wallet-older-history, .wallet-scrim { transition: opacity 160ms ease-out; }
  .wallet-history-grip:not(:disabled):is(:active, :hover) { transform: none; }
}

@media (max-width: 360px) {
  .call-dock { --wallet-gutter: 22px; }
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-row { padding-block: 11px; min-height: 56px; }
.activity-row:last-child { border-bottom: 0; }
.transaction-icon {
  display: grid;
  flex: 0 0 24px;
  place-items: center;
  color: var(--muted);
}
.transaction-icon svg { width: 18px; height: 18px; }
.transaction-description { min-width: 0; gap: 3px; overflow-wrap: anywhere; }
.transaction-description strong, .transaction-value { font-size: 13px; font-weight: 600; }
.transaction-description span { font-size: 11px; }
.transaction-value { display: block; flex: none; font-variant-numeric: tabular-nums; }
.history-empty { padding: 8px 0 12px; color: var(--muted); font-size: 13px; }

@media (max-width: 600px) {
  dialog { width: 100%; max-width: none; }
}
