/* Privy sign-in block on /login and the terminal wallet (#297-#299). Colours follow the page: the site tokens on /login,
   the terminal's --it-* variables in the terminal; plain fallbacks keep both readable. */
.privy-slot { min-height: 52px; margin: 0 0 4px; }
.privy-box { display: grid; gap: 10px; }
.privy-box .hint { margin: 0; }
.privy-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.privy-consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.privy-or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--muted, #8b95a1); font-size: 13px; }
.privy-or::before, .privy-or::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: 0.35; }

.privy-wallet-button {
  position: fixed; left: 16px; bottom: 16px; z-index: 58; min-height: 40px; padding: 0 16px; border: 1px solid var(--it-border, #2a3138);
  border-radius: 999px; background: var(--it-panel, #12171c); color: var(--it-text, #e8eef2); font: 600 14px/1 inherit; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.privy-wallet-button:hover { background: var(--it-raised, #1b2228); }
.privy-backdrop { position: fixed; inset: 0; z-index: 76; display: grid; place-items: center; padding: 12px; background: rgba(0, 0, 0, 0.55); }
.privy-wallet {
  width: min(460px, 100%); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px 20px 20px; border: 1px solid var(--it-border, #2a3138);
  border-radius: 12px; background: var(--it-panel, #12171c); color: var(--it-text, #e8eef2); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}
.privy-wallet header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.privy-wallet h2 { margin: 0; font-size: 18px; }
.privy-close { width: 40px; height: 40px; border: 0; border-radius: 6px; background: none; color: var(--it-muted, #8b95a1); font-size: 24px; cursor: pointer; }
.privy-close:hover { background: var(--it-raised, #1b2228); color: var(--it-text, #e8eef2); }
.privy-pane { display: grid; gap: 10px; margin-top: 12px; }
.privy-pane p { margin: 0; }
.privy-address { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.privy-address code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; color: var(--it-muted, #8b95a1); }
.privy-tabs { display: flex; gap: 4px; margin-top: 12px; border-bottom: 1px solid var(--it-border, #2a3138); }
.privy-tabs button { min-height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--it-muted, #8b95a1); font: inherit; cursor: pointer; }
.privy-tabs button[aria-selected="true"] { color: var(--it-text, #e8eef2); border-bottom-color: currentColor; }
.privy-field { display: grid; gap: 4px; margin-top: 10px; font-size: 13px; color: var(--it-muted, #8b95a1); }
.privy-field input, .privy-field select {
  min-height: 40px; padding: 0 10px; border: 1px solid var(--it-border, #2a3138); border-radius: 6px; background: var(--it-bg, #0b0d10);
  color: var(--it-text, #e8eef2); font: inherit; font-size: 15px;
}
.privy-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.privy-balances { width: 100%; border-collapse: collapse; font-size: 14px; }
.privy-balances th { text-align: left; font-weight: 500; color: var(--it-muted, #8b95a1); padding: 6px 0; }
.privy-balances td { text-align: right; font-variant-numeric: tabular-nums; padding: 6px 0; }
.privy-row { display: flex; flex-wrap: wrap; gap: 8px; }
.privy-row .button { min-height: 40px; }
.privy-confirm { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--it-border, #2a3138); border-radius: 8px; }
.privy-msg { margin: 12px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.privy-err { color: #f87171; }
.privy-ok { color: #4ade80; }
.privy-info { color: var(--it-muted, #8b95a1); }
html.bm-rules-open .privy-wallet-button { display: none; }
@media (max-width: 767px) {
  .privy-wallet-button { left: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .privy-grid { grid-template-columns: 1fr; }
}
