/* Narrow paper dialog, edged with a muted geometric brocade ribbon. */
#wallet-dialog {
  --wallet-paper: #f2eee3; --wallet-ink: #34483a; --wallet-muted: #6b7565; --wallet-line: #a0a58b44;
  position: fixed; inset: 0; margin: auto;
  width: 380px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 40px);
  padding: 25px 24px 0; overflow-y: auto; overscroll-behavior: contain;
  background: var(--wallet-paper); color: var(--wallet-ink); border: 1px solid #b1a18277;
  box-shadow: 0 20px 72px #0d211b30, inset 0 0 0 4px var(--wallet-paper), inset 0 0 0 5px #b1a18233;
  scrollbar-width: thin; scrollbar-color: #a0a58b70 transparent;
}
#wallet-dialog::before {
  content: ''; position: absolute; top: 6px; left: 6px; right: 6px; height: 6px;
  background: url('./brand/song-brocade.svg') repeat-x center; pointer-events: none;
}
#wallet-dialog::backdrop { background: #15281f59; backdrop-filter: blur(4px); }
.wallet-heading { position: relative; }
.wallet-kicker { display: flex; gap: 9px; color: #8b5946; font: 10px var(--sans); letter-spacing: 2px; }
.wallet-kicker>span { color: #a4ab98; }
.wallet-heading form { position: absolute; right: -11px; top: -14px; }
.wallet-close { display: grid; place-items: center; width: 44px; height: 44px; color: var(--wallet-muted); }
.wallet-close svg { width: 17px; height: 17px; }
.wallet-close:hover { color: var(--wallet-ink); }
#wallet-title { margin: 12px 0 6px; font: 26px/1.4 var(--serif); letter-spacing: 2px; }
#wallet-description { margin: 0; font-size: 11px; color: var(--wallet-muted); }
.wallet-search { display: flex; align-items: center; gap: 10px; margin-top: 16px; border-bottom: 1px solid var(--wallet-line); color: var(--wallet-muted); }
.wallet-search:focus-within { border-color: #72856b; }
.wallet-search svg { width: 16px; height: 16px; }
.wallet-search input { width: 100%; height: 38px; border: 0; background: transparent; outline: none; color: var(--wallet-ink); font-size: 13px; }
.wallet-search input::placeholder { color: #8d9484; }
.wallet-list-heading { display: flex; justify-content: space-between; padding: 14px 0 7px; color: var(--wallet-muted); font-size: 9px; letter-spacing: 1px; }
.wallet-results { height: min(275px,42dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.wallet-option { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 0; min-height: 54px; border-top: 1px solid var(--wallet-line); text-align: left; color: var(--wallet-ink); }
.wallet-option:last-child { border-bottom: 1px solid var(--wallet-line); }
.wallet-option:disabled { opacity: 1; cursor: default; }
.wallet-option:not([data-installed]) { color: #6e7869; }
.wallet-option:not(:disabled):hover { color: #87503d; }
.wallet-option:focus-visible { outline-offset: -2px; }
.wallet-option-icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; color: #697a60; font: 20px/1 Georgia,serif; }
.wallet-option-icon img { width: 28px; height: 28px; object-fit: contain; }
.wallet-option-copy { flex: 1; min-width: 0; }
.wallet-option-copy strong { overflow-wrap: anywhere; font: 13px/1.35 var(--sans); font-weight: 500; }
.wallet-option-state { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--wallet-muted); font-size: 10px; }
.wallet-option[data-installed] .wallet-option-state { color: #4c7258; }
.wallet-option[data-installed] .wallet-option-state::before { content: ''; width: 4px; height: 4px; background: currentColor; border-radius: 50%; }
.wallet-option[data-selected] .wallet-option-state { color: #92533c; }
#wallet-status { min-height: 30px; margin: 10px 0 8px; color: var(--wallet-muted); font-size: 10px; line-height: 1.7; }
#wallet-status[data-error=true] { color: #98543f; }
#wallet-empty { padding: 18px 0; font-size: 12px; color: var(--wallet-muted); }
.wallet-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; bottom: 0; margin: 0 -18px; padding: 8px 18px 14px; border-top: 1px solid var(--wallet-line); background: var(--wallet-paper); }
.wallet-foot::after { content: ''; position: absolute; bottom: 4px; left: 0; right: 0; height: 6px; background: url('./brand/song-brocade.svg') repeat-x center; pointer-events: none; }
#wallet-dialog .wallet-foot p { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--wallet-muted); font-size: 9px; line-height: 1.8; }
.wallet-foot svg { width: 15px; height: 17px; color: #8b5946; }
#wallet-rescan { flex: none; min-height: 38px; padding: 6px 0; color: var(--wallet-ink); font-size: 10px; }
#wallet-rescan span { margin-left: 5px; font-size: 15px; }
#wallet-rescan:hover { color: #98543f; }
@media(max-width:400px) {
  #wallet-dialog { padding: 24px 22px 0; max-height: calc(100dvh - 32px); }
  #wallet-title { font-size: 25px; }
  .wallet-option { gap: 9px; }
  .wallet-option-copy strong { font-size: 12px; }
  .wallet-option-state { font-size: 9px; }
  .wallet-foot { margin: 0 -16px; padding-inline: 16px; gap: 8px; }
}
