/* Every rule is scoped to decorated wallet dialogs; Bank and main UI untouched. */
dialog.hd-dialog{--hd-accent:#8346e8;--hd-tint:#f3eefa;box-sizing:border-box!important;position:fixed!important;inset:0!important;margin:auto!important;width:min(496px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;height:fit-content!important;max-height:min(calc(100dvh - 32px),var(--sign-vh,100dvh))!important;padding:26px 24px 62px!important;border:1px solid #e8eaf3!important;border-radius:24px!important;background:#fff!important;color:#141b42!important;box-shadow:0 18px 70px #14245930!important;font-size:15px!important;line-height:1.45!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;isolation:isolate;scrollbar-width:thin}
dialog.hd-dialog::backdrop{background:#20284655;backdrop-filter:blur(4px)}
dialog.hd-dialog::after{content:'';display:block;height:56px;margin:26px -24px -62px;pointer-events:none;background:var(--hd-wave) center bottom/100% 100% no-repeat}
dialog.hd-dialog{--hd-wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 120' preserveAspectRatio='none'%3E%3Cpath fill='%238346e8' opacity='.17' d='M0 6C240 20 280 170 580 108S820 50 1000 0V120H0Z'/%3E%3Cpath fill='%238346e8' opacity='.17' d='M0 120C170 0 270 100 500 115S800 10 1000 36V120Z'/%3E%3C/svg%3E")}
dialog.hd-lightning{--hd-wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 120' preserveAspectRatio='none'%3E%3Cpath fill='%23efb414' opacity='.23' d='M0 6C240 20 280 170 580 108S820 50 1000 0V120H0Z'/%3E%3Cpath fill='%23efb414' opacity='.18' d='M0 120C170 0 270 100 500 115S800 10 1000 36V120Z'/%3E%3C/svg%3E")}
dialog.hd-sign{--hd-wave:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 120' preserveAspectRatio='none'%3E%3Cpath fill='%2318a7ea' opacity='.20' d='M0 6C240 20 280 170 580 108S820 50 1000 0V120H0Z'/%3E%3Cpath fill='%2318a7ea' opacity='.19' d='M0 120C170 0 270 100 500 115S800 10 1000 36V120Z'/%3E%3C/svg%3E")}
dialog.hd-lightning{--hd-accent:#efb414;--hd-tint:#fff7de}dialog.hd-sign{--hd-accent:#18a7ea;--hd-tint:#eaf8ff}
.hd-dialog .hd-brand{display:flex;align-items:center;gap:12px;margin:0 44px 28px 4px;color:#11183a;font-size:22px;letter-spacing:-.7px}.hd-dialog .hd-brand img{width:32px;height:32px;object-fit:contain}.hd-dialog .hd-brand strong{font-weight:750}
.hd-dialog h2,.hd-dialog .personal-message-sign h2{position:relative;margin:0 0 8px!important;padding:4px 0 0 76px!important;min-height:43px;font-size:24px!important;font-weight:750;line-height:1.17!important;letter-spacing:-.8px;color:#111737!important}
.hd-dialog .hd-title-icon{position:absolute;left:0;top:0;width:60px;height:68px;background:var(--hd-tint);color:var(--hd-accent);display:grid;place-items:center;clip-path:polygon(50% 0,96% 23%,96% 77%,50% 100%,4% 77%,4% 23%)}.hd-dialog .hd-title-icon svg{width:36px;height:36px}.hd-lightning .hd-title-icon{background:linear-gradient(140deg,#ffd03c,#ff9900);color:white}
.hd-dialog .manual-send-heading{display:block!important;margin:0!important;gap:0!important}.hd-dialog .manual-send-heading>img{display:none!important}
.hd-dialog .manual-send-instructions>p:first-child,.hd-dialog .personal-message-sign>h2+p,.hd-dialog .hl-body>p:first-child{margin:0 0 24px!important;padding-left:76px;font-size:14px!important;line-height:1.45!important;color:#202744}
.hd-dialog .hd-close,.hd-dialog .sign-dialog-close,.hd-dialog .hl-close{position:absolute!important;right:15px!important;top:16px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#131d40!important;font:26px/1 sans-serif!important;padding:0!important;cursor:pointer}
.hd-dialog p{font-size:14px;line-height:1.5;overflow-wrap:anywhere}.hd-dialog label,.hd-dialog legend{display:block;color:#172041!important;font-weight:650!important;font-size:15px!important;margin:18px 0 7px!important}.hd-dialog fieldset{border:0!important;padding:0!important;margin:16px 0 0!important;min-width:0!important}
.hd-dialog input,.hd-dialog textarea,.hd-dialog select{box-sizing:border-box!important;display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;padding:12px 14px!important;margin-top:8px!important;border:1px solid #c9cbd6!important;border-radius:12px!important;background:#fff!important;color:#182140!important;font-family:inherit!important;font-size:16px!important;line-height:1.45!important;box-shadow:0 1px 3px #18214006!important}
.hd-dialog input{min-height:46px!important}.hd-dialog textarea{font-family:inherit!important;font-size:16px!important;line-height:1.5!important;resize:vertical}.hd-sign #personal-message{min-height:162px!important}.hd-lightning textarea{border-color:#eab42d!important;min-height:106px!important}.hd-dialog input:focus,.hd-dialog textarea:focus{outline:2px solid var(--hd-accent);outline-offset:2px}
.hd-dialog .manual-send-warning,.hd-dialog .sign-warning{position:relative;background:#fff6df!important;border:0!important;border-radius:15px!important;padding:16px 16px 16px 54px!important;margin:22px 0 18px!important;color:#202440!important;text-align:left!important}
.hd-dialog .manual-send-warning::before,.hd-dialog .sign-warning::before{content:'!';position:absolute;left:17px;top:18px;border:2px solid #edb31e;border-radius:8px;color:#c58a00;width:24px;height:27px;text-align:center;font-size:21px;font-weight:800}.hd-dialog .manual-send-warning-title{display:block!important;background:transparent!important;color:#121a3a!important;font-size:18px!important;font-weight:750!important;padding:0!important;margin:0 0 3px!important;text-align:left!important}.hd-dialog .manual-send-warning-title img{display:none!important}.hd-dialog .manual-send-sender-warning{background:transparent!important;padding:0!important;margin:0!important;color:#202440!important;font-size:14px!important;line-height:1.5!important}.hd-dialog .sign-warning strong{font-size:15px!important;font-weight:650!important}
.hd-dialog .manual-send-from,.hd-dialog .sign-selected-account{font-weight:650;margin:18px 0!important;color:#172041!important}.hd-dialog code{font-family:inherit!important;font-size:12px!important;font-weight:400!important;line-height:1.5!important;overflow-wrap:anywhere!important;word-break:break-all!important}.hd-dialog .manual-send-from code,.hd-dialog .sign-selected-account code{display:block!important;padding:10px 12px!important;margin-top:7px!important;border-radius:10px!important;background:#f5f4fa!important;border:1px solid #eeedf5!important;color:#172041!important}
.hd-dialog .manual-send-token-list{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important}.hd-dialog .manual-send-token-option{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;min-width:0!important;min-height:48px!important;padding:8px 5px!important;border:1px solid #dedee8!important;border-radius:12px!important;background:white!important;color:#182140!important;font-size:13px!important;font-weight:700!important}.hd-dialog .manual-send-token-option img{width:24px!important;height:24px!important;object-fit:contain!important}.hd-dialog .manual-send-token-option[aria-pressed=true]{border-color:#8346e8!important;background:#f6f1ff!important;box-shadow:0 0 0 1px #8346e82a!important}
.hd-dialog .manual-send-token-field+[role=status]{background:#f6f3fc;border-radius:10px;padding:5px 10px;font-size:13px;margin:9px 0 0!important}
.hd-dialog button.primary,.hd-dialog .personal-message-sign>button:first-of-type,.hd-dialog .hl-pay{width:100%!important;min-height:52px!important;margin:23px 0 0!important;padding:12px 15px!important;border:0!important;border-radius:24px!important;background:linear-gradient(115deg,#04bce9 0%,#078ff0 36%,#4331ee 100%)!important;color:white!important;font-family:inherit!important;font-size:16px!important;font-weight:700!important;line-height:1.4!important;box-shadow:0 5px 12px #218be41a!important}
.hd-dialog button:disabled{cursor:not-allowed!important}.hd-dialog button.primary:disabled,.hd-dialog .personal-message-sign>button:disabled,.hd-dialog .hl-pay:disabled{background:#e9edf4!important;color:#667187!important;box-shadow:none!important}
.hd-dialog>button.secondary.full,.hd-dialog .hl-safe-close{width:100%!important;min-height:46px!important;padding:10px!important;margin:12px 0 0!important;border:0!important;border-radius:24px!important;background:#edf0f8!important;color:#182140!important;font-size:15px!important;font-weight:650!important}.hd-dialog .hl-recover{border-top:1px solid #e4e4ee;margin:24px 0 14px;padding-top:10px}.hd-dialog .hl-recover summary{color:#6430cc;min-height:42px;font-weight:650;font-size:14px}.hd-dialog .hl-note{background:#f1efff;border-radius:14px;padding:14px 16px;font-size:13px;line-height:1.5;margin:14px 0 22px}.hd-dialog .hl-source{font-size:13px;color:#49536a;margin:12px 0!important}.hd-dialog .hl-body [role=status]:empty{display:none}.hd-dialog .hl-recovery-help,.hd-dialog .manual-send-review{padding:14px;border-radius:12px;background:#fff6df;color:#192342}.hd-dialog [hidden]{display:none!important}
@media(max-width:420px){dialog.hd-dialog{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important;padding:20px 18px 48px!important}.hd-dialog .hd-brand{font-size:20px;margin-bottom:22px}.hd-dialog h2,.hd-dialog .personal-message-sign h2{font-size:21px!important;padding-left:62px!important;min-height:37px}.hd-dialog .hd-title-icon{width:50px;height:58px}.hd-dialog .hd-title-icon svg{width:30px;height:30px}.hd-dialog .manual-send-instructions>p:first-child,.hd-dialog .personal-message-sign>h2+p,.hd-dialog .hl-body>p:first-child{padding-left:62px;font-size:13px!important}.hd-dialog .manual-send-token-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}.hd-dialog .manual-send-token-option{font-size:14px!important}.hd-dialog .manual-send-warning,.hd-dialog .sign-warning{padding:13px 13px 13px 46px!important}.hd-dialog .manual-send-warning::before,.hd-dialog .sign-warning::before{left:12px;top:14px;width:22px}dialog.hd-dialog::after{margin:20px -18px -48px;height:40px}}
/* Clear legacy nested card decoration without changing its contents. */
.hd-dialog .manual-send-from{padding:0!important;border:0!important;background:transparent!important;border-radius:0!important}.hd-dialog .manual-send-sender-warning{border:0!important;box-shadow:none!important}.hd-dialog .sign-dialog-close{margin:0!important;float:none!important;z-index:2}
/* Preserve the existing signer's visualViewport keyboard contract. */
dialog.hd-sign{inset:calc(var(--sign-viewport-top,0px) + 16px) 0 auto!important;margin:0 auto!important;max-height:calc(var(--sign-viewport-height,100dvh) - 32px)!important}
@media(prefers-reduced-motion:reduce){.hd-dialog *{animation:none!important;transition:none!important}}
