.wallet-dock { display: inline-flex; align-items: center; justify-content: flex-end; gap: 12px; }
.wallet-network { color: var(--green); font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.wallet-trigger, .wallet-close, .wallet-actions button, .wallet-actions a {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ice);
  padding: 0;
  font: 700 8px/1.4 var(--mono);
  letter-spacing: .06em;
  cursor: pointer;
}
.wallet-trigger { min-height: 34px; padding: 0 13px; border: 1px solid var(--line-strong); }
.wallet-trigger:hover, .wallet-close:hover, .wallet-actions button:hover, .wallet-actions a:hover { color: var(--acid); border-color: var(--acid); }
.wallet-trigger:disabled { opacity: .5; cursor: wait; }
.wallet-modal[hidden], .wallet-popover[hidden], .field-notice[hidden] { display: none !important; }
.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 5, 8, .82);
  backdrop-filter: blur(5px);
}
body.wallet-modal-open { overflow: hidden; }
.wallet-terminal {
  width: min(540px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(215, 255, 56, .58);
  background: #061017;
  box-shadow: 0 25px 90px rgba(0, 0, 0, .65);
}
.wallet-terminal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.wallet-terminal h2 { margin: 4px 0 0; color: var(--ice); font-size: 13px; letter-spacing: .04em; }
.wallet-kicker, .wallet-copy, .wallet-footnote { margin: 0; }
.wallet-kicker { color: var(--acid); font-size: 8px; letter-spacing: .12em; }
.wallet-copy { margin: 16px 0; color: var(--muted); font-size: 9px; }
.wallet-footnote { margin-top: 14px; color: var(--faint); font-size: 7px; line-height: 1.7; }
.wallet-close { color: var(--muted); }
.wallet-choices { display: grid; gap: 7px; }
.wallet-choice {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(115, 247, 193, .28);
  background: rgba(3, 18, 17, .35);
  color: var(--ice);
  padding: 8px 11px;
  text-align: left;
  cursor: pointer;
}
.wallet-choice:hover, .wallet-choice:focus-visible { border-color: var(--acid); outline: none; background: rgba(215, 255, 56, .03); }
.wallet-choice:disabled { opacity: .72; cursor: default; }
.wallet-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(111, 215, 241, .25);
  background: #051017;
}
.wallet-mark img { width: 28px; height: 28px; object-fit: contain; }
.wallet-choice-copy { min-width: 0; display: grid; gap: 4px; }
.wallet-choice-copy strong { color: var(--ice); font-size: 10px; }
.wallet-choice-copy small { color: var(--faint); font-size: 7px; letter-spacing: .05em; }
.wallet-choice-state { color: var(--acid); font-size: 7px; font-weight: 700; text-align: right; }
.wallet-popover {
  position: fixed;
  z-index: 900;
  top: calc(var(--header-h) + 8px);
  right: max(20px, calc((100vw - var(--max)) / 2));
  width: min(390px, calc(100vw - 40px));
  padding: 16px;
  border: 1px solid rgba(215, 255, 56, .5);
  background: #061017;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .6);
}
.wallet-popover-title { margin-bottom: 14px; color: var(--acid); font-size: 8px; letter-spacing: .1em; }
.wallet-popover dl { margin: 0; display: grid; }
.wallet-popover dl > div { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.wallet-popover dt { color: var(--faint); font-size: 8px; }
.wallet-popover dd { margin: 0; color: var(--ice); font-size: 8px; text-align: right; overflow-wrap: anywhere; }
.wallet-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; }
.wallet-actions button, .wallet-actions a { color: var(--muted); }
.field-notice {
  position: fixed;
  z-index: 1300;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 12px 15px;
  border-left: 2px solid var(--acid);
  background: #061017;
  color: var(--ice);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.8;
  white-space: pre-line;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity .2s ease, transform .2s ease;
}
.field-notice.is-visible { opacity: 1; transform: none; }
.field-notice.is-error { color: var(--danger); border-left-color: var(--danger); }
@media (max-width: 820px) {
  .wallet-network { display: none; }
  .wallet-popover { top: calc(var(--header-h) + 6px); right: 12px; width: calc(100vw - 24px); }
}
@media (max-width: 520px) {
  .wallet-terminal { padding: 16px; }
  .wallet-choice { grid-template-columns: 38px minmax(0,1fr); }
  .wallet-choice-state { grid-column: 2; text-align: left; }
}
