#wallet-modal {
  width: min(456px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 29px;
  overflow-x: hidden;
  border-color: #66718270;
  border-radius: 8px;
  background: radial-gradient(ellipse at 15% 0%, #c9d1dc12, transparent 62%), linear-gradient(145deg, #242b35, #161b23 72%);
  box-shadow: 0 40px 110px #0009, 0 1px 0 #e8efff12 inset, 0 0 0 7px #10151c45;
}

#wallet-modal::before { height: 2px; opacity: .85; }
#wallet-modal::backdrop { background: #05080dbd; backdrop-filter: blur(12px); }
#wallet-modal[open] { animation: wallet-enter .22s ease-out both; }
.wallet-modal__head { align-items: center; margin-bottom: 23px; }
.wallet-modal__head > .mono { font-size: 10px; letter-spacing: .15em; }
.wallet-modal__head [data-close-modal] {
  display: grid;
  width: 44px;
  height: 44px;
  margin: -9px -10px -9px 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #9aa5b6;
  line-height: 1;
  transition: border-color .18s, background .18s, color .18s;
}
.wallet-modal__head [data-close-modal]:hover { border-color: #c9d1dc24; background: #ffffff06; color: #f4f7fa; }
.wallet-modal__emblem {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 23px;
  place-items: center;
  border: 1px solid #abb9cf30;
  border-radius: 8px;
  background: linear-gradient(145deg, #eaf2ff0c, #60789906);
  color: #d5dce7;
  box-shadow: 0 1px 0 #ffffff10 inset, 0 7px 20px #0002;
}
.wallet-modal__emblem svg { width: 29px; height: 29px; }
.wallet-modal__emblem img { display: block; width: 36px; height: 36px; object-fit: contain; }
#wallet-modal h2 { margin-bottom: 10px; font-size: 29px; line-height: 1.16; letter-spacing: -.025em; }
#wallet-modal .wallet-modal__intro { max-width: 30em; font-size: 13px; line-height: 1.75; }
#wallet-options { gap: 9px; margin-top: 25px; }
#wallet-options .wallet-option, #wallet-options .wallet-install {
  display: flex;
  min-height: 79px;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border: 1px solid #9caec72c;
  border-radius: 6px;
  background: linear-gradient(112deg, #ffffff06, #ffffff02);
  color: #d9e0eb;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .18s;
}
#wallet-options .wallet-option:not(:disabled):hover, #wallet-options .wallet-install:hover {
  transform: translateY(-1px);
  border-color: #c9d1dc68;
  background: linear-gradient(112deg, #ffffff0b, #ffffff04);
  box-shadow: 0 5px 13px #0002, 0 1px 0 #ffffff08 inset;
}
#wallet-options .wallet-option:disabled { cursor: default; }
#wallet-options .wallet-option.is-connected { border-color: #2ee6c840; background: linear-gradient(110deg, #2ee6c80a, #2ee6c802); }
#wallet-options .wallet-option.is-pending { border-color: #c9d1dc75; }
.wallet-option__icon {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #c9d1dc1c;
  border-radius: 6px;
  background: linear-gradient(145deg, #c9d1dc0d, #080b100f);
  color: #b9c6d8;
}
.wallet-option__icon svg { width: 25px; height: 25px; }
.wallet-option__icon img { position: absolute; inset: 5px; display: none; width: 28px; height: 28px; object-fit: contain; }
.wallet-option__icon.has-image img { display: block; }
.wallet-option__icon.has-image svg { visibility: hidden; }
.wallet-option__copy { min-width: 0; flex: 1; }
.wallet-option__name { display: block; overflow: hidden; color: #e3e9f2; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.wallet-option__description { display: block; margin-top: 5px; color: #94a1b3; font-size: 11px; font-weight: 400; line-height: 1.35; }
.wallet-option__status { display: inline-flex; flex: none; align-items: center; gap: 5px; color: #9ba8b9; font: 400 9px/1.4 var(--font-mono); letter-spacing: .03em; }
.wallet-option__status::before { width: 4px; height: 4px; border-radius: 50%; background: #7d8a9c; content: ''; }
.wallet-option.is-connected .wallet-option__status { color: var(--teal); }
.wallet-option.is-connected .wallet-option__status::before { background: currentColor; box-shadow: 0 0 8px #2ee6c83a; }
.wallet-option.is-pending .wallet-option__status::before { width: 9px; height: 9px; border: 1px solid #a3afc338; border-top-color: #d3dce8; background: transparent; animation: wallet-spin 1s linear infinite; }
#wallet-error { min-height: 0; margin-top: 15px; padding: 12px 13px; border: 1px solid #e9bb5730; border-radius: 6px; background: #e9bb5707; color: #d6bc80 !important; font-size: 12px !important; line-height: 1.65 !important; overflow-wrap: anywhere; }
#wallet-error:empty { display: none; }
#wallet-error[data-kind="pending"] { border-color: #a4b7d32b; background: #a4b7d307; color: #b3c3d8 !important; }
#wallet-error[data-kind="error"] { border-color: #db997d32; background: #db997d08; color: #e2b39c !important; }
#wallet-error[data-kind="success"] { border-color: #2ee6c829; background: #2ee6c807; color: #90d5c7 !important; }
.wallet-modal__security { display: flex; align-items: flex-start; gap: 7px; margin-top: 23px; padding-top: 18px; border-top: 1px solid #b6c3d416; }
#wallet-modal .wallet-modal__security { color: #8d9aab; font-size: 11px; line-height: 1.6; }
.wallet-modal__security svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; color: #8fa79e; }
#wallet-session { margin-top: 21px; padding: 16px; border: 1px solid #2ee6c82b; border-radius: 6px; background: #2ee6c804; }
.wallet-session__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: #c8d1df; font-size: 12px; }
.wallet-session__top > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallet-session__network { display: flex; flex: none; align-items: center; gap: 6px; color: #d1b77d; font: 400 10px/1.4 var(--font-mono); }
.wallet-session__network::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ''; }
.wallet-session__network[data-ready="true"] { color: #8ed1c2; }
.wallet-session__address { display: block; color: #a9b6c9; font: 400 10px/1.7 var(--font-mono); overflow-wrap: anywhere; }
.wallet-session__switch { width: 100%; min-height: 44px; margin-top: 14px; border: 1px solid #e2bf662e; border-radius: 6px; background: #e2bf6608; color: #dec58a; text-align: center; font: 500 12px var(--font-body); cursor: pointer; }
.wallet-session__switch:disabled { opacity: .65; cursor: wait; }
#disconnect-wallet { min-height: 44px; margin-top: 15px; border-color: #d0dae326; color: #b3becd; font-size: 12px; }
#wallet-modal :is(button, a):focus-visible { outline: 2px solid #95c8e3; outline-offset: 4px; }

@keyframes wallet-enter { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes wallet-spin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  #wallet-modal { padding: 23px; }
  #wallet-modal h2 { font-size: 26px; }
  #wallet-options .wallet-option, #wallet-options .wallet-install { gap: 11px; padding-inline: 12px; }
  .wallet-option__status { font-size: 8px; }
  .wallet-option__description { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  #wallet-modal[open], .wallet-option.is-pending .wallet-option__status::before { animation: none; }
  #wallet-options .wallet-option, #wallet-options .wallet-install { transition: none; }
  #wallet-options .wallet-option:not(:disabled):hover, #wallet-options .wallet-install:hover { transform: none; }
}
