:root{
  --bg-card: #0f0f0f;
  --text-light: #f5f5f5;
  --gold: #e0c067;
}

/* Modal overlay and content (Aureus colors preserved) */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 12px;
  z-index: 999;
  overflow-y: auto; /* allow page to scroll behind modal on very small screens */
}

.modal.hidden { display: none; }

.modal-content {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 10px;
  width: 320px; /* keep width unchanged as requested */
  max-width: calc(100% - 32px);
  border: 1px solid rgba(255,255,255,0.04);
  max-height: calc(100vh - 48px); /* ensure content fits in viewport */
  overflow-y: auto; /* scroll inside the modal when content is tall */
}

.modal-content input,
.modal-content select {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  margin-bottom: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  background: #121212;
  color: var(--text-light);
}

.modal-actions { display:flex; justify-content:space-between; gap:8px }

.hidden { display: none }

/* ensure modal buttons expand evenly */
.modal-actions .btnog { flex: 1 }
.modal-actions .btnog-outline { flex: 1 }

/* wallet inside modal */
.wallet-block{display:flex;gap:8px;align-items:center;margin-top:6px;flex-wrap:wrap}
.wallet-addr{background:#0f0f0f;padding:6px 8px;border-radius:6px;border:1px solid #222;font-family:monospace;color:var(--gold);user-select:text;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;min-width:0}
.wallet-addr:focus{outline:2px solid rgba(224,192,103,0.12)}
.small{padding:.4rem .6rem;font-size:.85rem}

/* Chain/network badges inside modal */
.chain-badges{display:flex;gap:8px;margin-top:8px}
.chain-badge{background:transparent;color:var(--text-light);border:1px solid rgba(255,255,255,0.06);padding:6px 8px;border-radius:6px;font-weight:600;font-size:0.85rem;cursor:pointer}
.chain-badge.active{background:linear-gradient(90deg, rgba(224,192,103,0.12), rgba(224,192,103,0.06));border-color:rgba(224,192,103,0.18);color:var(--gold)}
.chain-badge:focus{outline:2px solid rgba(224,192,103,0.12)}

/* ensure copy button stays compact and aligned */
.wallet-block .btnog-outline.small{flex:0 0 auto;padding:.35rem .6rem}