.credit-borrow-form input, #credit-amount, #credit-amount input {
  box-sizing: border-box; width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid #9584b8; border-radius: 12px; background: var(--surface,Canvas);
  color: inherit; font-size: 16px;
}
.credit-borrow-form input:focus, .loan-application-fields input:focus {
  outline: 2px solid #8056cd; outline-offset: 1px;
}
.support-faq-list {padding: 0 4px; margin: 22px 0;}
.support-faq-list h2 {font-size: 1.1rem;}
.support-faq-list a {display:flex;justify-content:space-between;gap:12px;align-items:center;
  min-height:46px;padding:6px 0;color:inherit;text-decoration:none;border-bottom:1px solid #9688ae55;}
.support-faq-list svg {flex:none;width:16px;}
dialog.finance-screen-modal[open] {
  position:fixed!important; inset:auto!important; top:var(--visible-top,0px)!important; left:var(--visible-left,0px)!important;
  width:var(--visible-width,100vw)!important;height:100vh!important;height:var(--visible-height,100dvh)!important;
  max-width:none!important; max-height:none!important; min-width:0; min-height:0;
  margin:0!important; border:0!important;border-radius:0!important; box-sizing:border-box;display:block!important;
  padding:8px max(16px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));
  color:inherit;background:#fbf8ff;overflow:auto!important;overscroll-behavior:contain;touch-action:pan-y;
  z-index:10000; scroll-padding-block:16px;
}
dialog.finance-screen-modal::backdrop {background:rgba(36,26,54,.14);}
html[data-theme="dark"] dialog.finance-screen-modal {background:#201d29;}
.finance-screen-modal .finance-flow-content {
  position:static!important;transform:none!important;display:block!important;inset:auto!important;
  box-sizing:border-box;width:100%!important;max-width:680px;height:auto!important;max-height:none!important;
  overflow:visible!important;margin:0 auto!important;border:0;box-shadow:none;background:transparent;
}
.finance-flow-content input {font-size:16px;scroll-margin-block:24px;}
.finance-flow-content form,.finance-flow-content .micro-confirm-actions {position:static;}
.finance-flow-content .purchase-scroll-body {overflow:visible!important;max-height:none!important;}
@layer mobileScreenFix {
  html body .phone.mobile-v2 dialog.finance-screen-modal[open] {
    max-inline-size:none!important;max-block-size:none!important;max-width:none!important;max-height:none!important;
    margin:0!important;border:0!important;border-radius:0!important;outline:0;
    padding:8px max(18px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-left,0px))!important;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal .finance-flow-content,
  html .phone.mobile-v2 dialog.finance-screen-modal .finance-purchase-panel {
    padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;outline:0;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal .finance-flow-content:focus {outline:none;}
  html .phone.mobile-v2 dialog.finance-screen-modal :is(.finance-panel-heading,.section-heading){
    display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0!important;margin:0 0 8px!important;
    border-bottom:1px solid #9184a633;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal :is(.finance-panel-heading,.section-heading) h2{margin:0;font-size:20px;}
  html .phone.mobile-v2 dialog.finance-screen-modal .purchase-scroll-body {padding:0!important;}
  html .phone.mobile-v2 dialog.finance-screen-modal .finance-purchase-rule {
    min-height:36px!important;padding:6px 0!important;margin:0!important;box-sizing:border-box;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal .micro-confirm-actions{
    padding:12px 0 0!important;margin:0!important;align-items:stretch!important;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal .micro-confirm-actions>button{margin:0!important;min-height:46px;height:auto;}
}

@layer mobileScreenFix {
  html .phone.mobile-v2 dialog.finance-screen-modal[open] {
    background:var(--page-bg,#f6f3fb);
    font-family:inherit;
  }
  html[data-theme="dark"] .phone.mobile-v2 dialog.finance-screen-modal[open] {background:var(--page-bg,#201d29);}
  html .phone.mobile-v2 dialog.finance-screen-modal .finance-flow-content[tabindex]:focus {outline:0!important;box-shadow:none!important;}
}
.finance-screen-modal .earn-tier-details {margin:2px 0 12px;border-block:1px solid #9184a633;}
.finance-screen-modal .earn-tier-details summary {cursor:pointer;padding:10px 0;color:inherit;font-size:.875rem;}
.finance-screen-modal .earn-tier-details[open] {padding-bottom:8px;}
.finance-screen-modal .earn-tier-details {border-block:0;}
.finance-screen-modal .earn-tier-details summary {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 14px;border-radius:10px;background:#eee6fa;color:#583787;
  font-weight:600;list-style:none;
}
.finance-screen-modal .earn-tier-details summary::-webkit-details-marker {display:none;}
.finance-screen-modal .earn-tier-details summary::after {
  content:"";flex:none;width:7px;height:7px;border:solid currentColor;
  border-width:0 1.5px 1.5px 0;transform:translateY(-2px) rotate(45deg);
}
.finance-screen-modal .earn-tier-details[open] summary::after {transform:translateY(2px) rotate(225deg);}
html[data-theme="dark"] .finance-screen-modal .earn-tier-details summary {background:#382c49;color:#e0c9ff;}
.finance-screen-modal .finance-selected-product b {font-size:1.05rem;}

.finance-workspace :is(.earn-section-links button,.finance-flow-content button) {
  min-inline-size:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35;
}
.finance-screen-modal .finance-flow-content :is(.finance-purchase-rule,.finance-confirm-facts>div,.finance-purchase-facts>div,.earn-funding-entry) {
  column-gap:12px;row-gap:4px;align-items:baseline;
}
.finance-screen-modal .finance-flow-content :is(dt,dd,label,summary,h2,.hint) {overflow-wrap:break-word;}

@layer mobileScreenFix {
  html .phone.mobile-v2 .finance-workspace .earn-product-card {
    display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 12px;
    padding:16px!important;text-align:start;
  }
  html .phone.mobile-v2 .earn-product-card .finance-product-top {min-width:0;grid-area:1/1;}
  html .phone.mobile-v2 .earn-product-card .finance-product-rate {grid-area:1/2/3/3;text-align:end;align-self:center;}
  html .phone.mobile-v2 .earn-product-card .finance-product-min {grid-area:2/1;margin:0!important;padding:0!important;}
  html .phone.mobile-v2 .finance-screen-modal .earn-summary {
    display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:12px;
    padding:12px 0 16px;margin-bottom:12px;border-bottom:1px solid #9184a633;
  }
  html .phone.mobile-v2 .earn-summary .finance-purchase-rule {margin:0!important;padding:0!important;border:0!important;min-width:0;}
  html .phone.mobile-v2 .earn-summary .finance-purchase-rule:last-child {
    display:flex;flex-direction:column-reverse;align-items:flex-end;text-align:end;gap:2px;
  }
  html .phone.mobile-v2 .earn-summary .rate-value {font-size:clamp(22px,6vw,30px);line-height:1.1;font-variant-numeric:tabular-nums;}
  html .phone.mobile-v2 .finance-screen-modal .earn-amount-range {margin:4px 0;font-size:.8rem;line-height:1.45;}
  html .phone.mobile-v2 .finance-screen-modal .earn-funding-entry {margin:0 0 8px!important;}
  html .phone.mobile-v2 .finance-screen-modal .earn-tier-details summary {min-height:42px;box-sizing:border-box;}
  html .phone.mobile-v2 .finance-screen-modal .finance-purchase-facts>div {padding:8px 0;}
  html .phone.mobile-v2 .finance-purchase-panel>.micro-confirm-actions {display:grid!important;grid-template-columns:minmax(0,1fr)!important;}
  html .phone.mobile-v2 .finance-purchase-panel>.micro-confirm-actions>.secondary {display:none!important;}
}

@layer mobileScreenFix {
  .phone.mobile-v2 .transfer-dialog form :is(select,.transfer-amount) {
    box-sizing:border-box!important;display:block;width:100%!important;min-width:0;
    height:48px!important;min-height:48px!important;max-height:48px!important;
    margin:0!important;border:1px solid #9685ab80!important;border-radius:12px!important;
    color:inherit;background-color:var(--surface,Canvas);font:inherit;font-size:16px;
  }
  .phone.mobile-v2 .transfer-dialog form select {padding-block:0!important;padding-inline:12px 32px!important;}
  .phone.mobile-v2 .transfer-dialog form .transfer-amount {
    display:flex!important;align-items:center;padding:0!important;gap:0!important;
  }
  .phone.mobile-v2 .transfer-dialog .transfer-amount input {
    flex:1 1 0%;min-width:0!important;width:0!important;min-height:0!important;height:100%!important;
    margin:0!important;padding:0 12px!important;box-sizing:border-box;border:0!important;
    border-radius:inherit;box-shadow:none!important;background:transparent!important;font-size:16px;
  }
  .phone.mobile-v2 .transfer-dialog .transfer-amount button {
    flex:0 0 auto;margin:0!important;min-width:44px;min-height:44px;padding:0 12px!important;border:0!important;background:transparent;
  }
  .phone.mobile-v2 .transfer-dialog form :is(select:focus-visible,.transfer-amount:focus-within) {outline:2px solid #8056cd;outline-offset:1px;}
}

.earn-product-summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:16px;margin:12px 0 18px;border-radius:14px;
  background:linear-gradient(105deg,#7c54ce18,#aa8ae409);border:1px solid #9271bc38;
}
.earn-product-name{display:flex;align-items:center;gap:9px;min-width:0;overflow-wrap:anywhere;}
.earn-product-name svg{width:22px;height:22px;flex:none;color:#8254cd;}
.earn-product-name strong{font-size:18px;}
.earn-rate-pair{display:grid;gap:2px;text-align:end;min-width:0;line-height:1.2;}
.earn-rate-pair bdi{font-size:clamp(22px,6vw,29px);font-weight:700;letter-spacing:-.03em;color:#794bc6;}
html[data-theme="dark"] .earn-rate-pair bdi{color:#c5a0ff;}
.earn-rate-pair span{font-size:13px;}
.earn-term-options{display:flex;flex-wrap:wrap;gap:8px;min-width:0;padding:0;border:0;margin:0 0 16px;}
.earn-term-options legend{padding:0;margin-bottom:6px;font-weight:600;}
.earn-term-options button{min-height:44px;min-width:64px;padding:6px 12px;border:1px solid #9486ac66;border-radius:10px;background:transparent;color:inherit;font:inherit;}
.earn-term-options button[aria-pressed="true"]{background:#8050ce1b;border-color:#8659ca;font-weight:700;}

/* Amount fields share the surrounding finance palette in both themes. */
@layer mobileScreenFix {
  .phone.mobile-v2 dialog.finance-screen-modal {
    --earn-field-fill:#eee9f6;--earn-field-line:#b6a7c8;
  }
  html[data-theme="dark"] .phone.mobile-v2 dialog.finance-screen-modal {
    --earn-field-fill:#302a3c;--earn-field-line:#746782;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal .amount-control:has(#earn-amount),
  html .phone.mobile-v2 dialog.finance-screen-modal input#earn-amount,
  html .phone.mobile-v2 dialog.finance-screen-modal .transfer-dialog .transfer-amount {
    background:var(--earn-field-fill)!important;border-color:var(--earn-field-line)!important;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal .transfer-amount input {
    background:transparent!important;color:inherit;
  }
  html .phone.mobile-v2 dialog.finance-screen-modal input#earn-amount:focus-visible,
  html .phone.mobile-v2 dialog.finance-screen-modal .transfer-amount:focus-within {
    outline:2px solid #8964bd!important;outline-offset:1px;
  }
}
