:root {
  --bg: #000000;
  --bg-soft: #04080d;
  --bg-card: #050a14;
  --border: #0d2030;
  --border-strong: #143247;
  --text: #d5e8f5;
  --text-dim: #4b6478;
  --primary: #00d4ff;
  --primary-soft: rgba(0, 212, 255, 0.10);
  --primary-glow: rgba(0, 212, 255, 0.45);
  --accent: #ff3344;
  --eth: #627eea;
  --green: #00ff95;
  --yellow: #ffcc00;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { background: #000; }

body {
  font-family: 'Share Tech Mono', ui-monospace, monospace;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ---------- Matrix canvas + FX ---------- */
#matrix-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.92) 100%);
  pointer-events: none;
  z-index: 2;
}

.scanline {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 212, 255, 0.025) 2px,
    rgba(0, 212, 255, 0.025) 3px
  );
  pointer-events: none;
  z-index: 3;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}
header .logo { flex-shrink: 0; }
header .page-nav { flex-shrink: 0; }
header .header-status { margin-left: auto; flex-shrink: 0; min-width: 0; }
header .connect-wrap { flex-shrink: 0; }

.logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none; color: var(--text);
}
.logo-icon {
  width: 38px; height: 38px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 14px var(--primary-soft), inset 0 0 10px var(--primary-soft);
}
.logo-core {
  width: 12px; height: 12px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--primary);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.65); opacity: 0.55; }
}
.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 2px;
  line-height: 1.05;
}

.page-nav {
  display: flex;
  gap: 18px;
}
.page-nav a {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s, text-shadow 0.15s;
  font-family: inherit;
}
.page-nav a:hover { color: var(--primary); text-shadow: 0 0 8px var(--primary-glow); }
.page-nav a.active {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 6px currentColor;
}
.status-dot.active { background: var(--green); animation: blink 1.6s infinite; }
.status-dot.inactive { background: var(--accent); }
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

.btn-glow {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 9px 18px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 0 8px var(--primary-soft);
}
.btn-glow:hover {
  background: var(--primary-soft);
  box-shadow: 0 0 20px var(--primary-glow);
}

/* ---------- Main ---------- */
main {
  position: relative;
  z-index: 5;
  padding: 48px 32px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 140px);
}

/* ---------- Terminal box ---------- */
.terminal {
  width: 100%;
  max-width: 640px;
  background: rgba(4, 8, 13, 0.92);
  border: 1px solid var(--primary);
  position: relative;
  box-shadow:
    0 0 40px var(--primary-soft),
    inset 0 0 30px rgba(0, 212, 255, 0.04);
}
.terminal::before, .terminal::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid var(--primary);
}
.terminal::before {
  top: -3px; left: -3px;
  border-width: 2px 0 0 2px;
}
.terminal::after {
  bottom: -3px; right: -3px;
  border-width: 0 2px 2px 0;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(0, 212, 255, 0.07);
  border-bottom: 1px solid var(--border-strong);
  font-size: 11px;
  letter-spacing: 1px;
}
.tdot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.tdot.red    { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.tdot.yellow { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.tdot.green  { background: var(--green);  box-shadow: 0 0 6px var(--green); }
.tbar-title {
  margin-left: 10px;
  color: var(--primary);
  font-weight: 700;
  flex: 1;
}
.tbar-clock {
  color: var(--text-dim);
  font-family: 'VT323', monospace;
  font-size: 14px;
  letter-spacing: 1px;
}

.terminal-body {
  padding: 28px 28px 24px;
}

/* ---------- Log lines ---------- */
.boot { display: flex; flex-direction: column; gap: 5px; }
.log {
  font-size: 13px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  letter-spacing: 0.5px;
}
.px { color: var(--primary); font-weight: 700; }
.lbl {
  color: var(--text-dim);
  text-transform: uppercase;
  min-width: 110px;
  letter-spacing: 1px;
}
.val { color: var(--text); }
.ok { color: var(--green); text-shadow: 0 0 8px var(--green); }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  margin: 22px 0;
  opacity: 0.5;
}

/* ---------- Quantity section ---------- */
.qty-section { text-align: center; }

.section-label {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--primary);
  margin-bottom: 16px;
  text-align: left;
}
.section-label .hint {
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-left: 4px;
}

.qty-big {
  font-family: 'VT323', monospace;
  font-size: 96px;
  font-weight: 400;
  color: var(--primary);
  line-height: 1;
  text-shadow:
    0 0 12px var(--primary),
    0 0 30px var(--primary-glow);
  letter-spacing: 2px;
  margin: 8px 0 16px;
  transition: text-shadow 0.15s;
}

/* Slider — custom themed range */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--border);
  border: 1px solid var(--primary);
  outline: none;
  cursor: pointer;
  margin: 8px 0 8px;
  position: relative;
  box-shadow: 0 0 8px var(--primary-soft);
}
.slider::-webkit-slider-runnable-track {
  height: 8px;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--fill, 0%),
    transparent var(--fill, 0%),
    transparent 100%
  );
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 24px;
  background: var(--primary);
  border: 2px solid #000;
  cursor: pointer;
  margin-top: -10px;
  box-shadow: 0 0 16px var(--primary), 0 0 4px var(--primary);
  transition: transform 0.1s;
}
.slider::-webkit-slider-thumb:hover {
  transform: scaleY(1.15);
}
.slider::-moz-range-track {
  height: 8px;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--fill, 0%),
    transparent var(--fill, 0%),
    transparent 100%
  );
  border: none;
}
.slider::-moz-range-thumb {
  width: 14px;
  height: 22px;
  background: var(--primary);
  border: 2px solid #000;
  cursor: pointer;
  box-shadow: 0 0 16px var(--primary);
  border-radius: 0;
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.preset-chips {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 18px;
}
.chip {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  padding: 9px 0;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.12s;
}
.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.chip.active {
  border-color: var(--primary);
  color: #000;
  background: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

/* ---------- Cost row ---------- */
.cost-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  margin: 4px 0 18px;
}
.cost-row .lbl { min-width: 110px; }
.cost {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--primary);
  margin-left: auto;
  text-shadow: 0 0 12px var(--primary-glow);
}

/* ---------- Progress ---------- */
.progress-block { margin-bottom: 24px; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.bar {
  width: 100%;
  height: 8px;
  background: var(--border);
  border: 1px solid var(--border-strong);
  position: relative;
  overflow: hidden;
}
.fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--eth));
  box-shadow: 0 0 12px var(--primary);
  transition: width 0.7s ease;
}

/* ---------- Execute button ---------- */
.btn-execute {
  width: 100%;
  padding: 18px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  font-family: 'Orbitron', sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 4px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 0 18px var(--primary-soft);
  text-transform: uppercase;
  position: relative;
}
.btn-execute .b { color: var(--text-dim); margin: 0 6px; transition: color 0.15s; }
.btn-execute:hover:not(:disabled) {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 36px var(--primary);
}
.btn-execute:hover:not(:disabled) .b { color: #000; }
.btn-execute:disabled {
  border-color: var(--border-strong);
  color: var(--text-dim);
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Status / cursor ---------- */
.status-line {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-dim);
  display: flex;
  gap: 8px;
  align-items: baseline;
  word-break: break-all;
  min-height: 18px;
}
.status-line.success #statusText { color: var(--green); text-shadow: 0 0 8px var(--green); }
.status-line.error   #statusText { color: var(--accent); text-shadow: 0 0 8px var(--accent); }
.status-line.info    #statusText { color: var(--primary); }

.cursor {
  display: inline-block;
  color: var(--primary);
  animation: cursorBlink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes cursorBlink {
  50% { opacity: 0; }
}

.footer-meta {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

/* ---------- Footer ---------- */
footer {
  position: relative;
  z-index: 5;
  border-top: 1px solid var(--border);
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}
.foot-right { display: flex; gap: 16px; }
.foot-right a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}
.foot-right a:hover {
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
}

/* ---------- Dashboard ---------- */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 16px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}
.agents-grid::-webkit-scrollbar { width: 6px; }
.agents-grid::-webkit-scrollbar-track { background: var(--bg-soft); }
.agents-grid::-webkit-scrollbar-thumb { background: var(--border-strong); }
.agents-grid::-webkit-scrollbar-thumb:hover { background: var(--primary); }

.agent-card {
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  padding: 12px;
  position: relative;
  transition: all 0.15s;
}
.agent-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-soft);
}
.agent-card.registered { border-color: var(--green); }
.agent-card.registered::before {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: blink 1.6s infinite;
}
.agent-card.unregistered::before {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
}
.agent-id {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.agent-pending {
  font-family: 'VT323', monospace;
  font-size: 22px;
  color: var(--text);
  line-height: 1;
}
.agent-pending-unit {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  margin-left: 2px;
}
.agent-status {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-top: 4px;
}

.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 14px;
}
.dash-stat {
  border: 1px solid var(--border-strong);
  padding: 12px 14px;
  background: var(--bg-soft);
}
.dash-stat .lbl-sm {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.dash-stat .val-big {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
  text-shadow: 0 0 8px var(--primary-glow);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 13px;
  letter-spacing: 1px;
}
.empty-state .empty-cta {
  margin-top: 14px;
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--primary);
  font-size: 12px;
  letter-spacing: 2px;
  transition: all 0.15s;
}
.empty-state .empty-cta:hover {
  background: var(--primary);
  color: #000;
  box-shadow: 0 0 20px var(--primary-glow);
}

.refresh-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.15s;
  margin-left: auto;
}
.refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Connect button dropdown menu ---------- */
.connect-wrap { position: relative; }
.btn-glow.connected {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 10px rgba(0, 255, 149, 0.3);
}
.btn-glow.connected::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 6px var(--green);
  animation: blink 1.6s infinite;
}
.btn-glow.connected:hover {
  background: rgba(0, 255, 149, 0.08);
  box-shadow: 0 0 20px rgba(0, 255, 149, 0.5);
}

.connect-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(4, 8, 13, 0.96);
  border: 1px solid var(--primary);
  box-shadow: 0 0 24px var(--primary-soft), 0 8px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  z-index: 60;
  animation: dropIn 0.12s ease-out;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.connect-menu::before, .connect-menu::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border: 2px solid var(--primary);
}
.connect-menu::before {
  top: -2px; left: -2px;
  border-width: 2px 0 0 2px;
}
.connect-menu::after {
  bottom: -2px; right: -2px;
  border-width: 0 2px 2px 0;
}
.connect-menu-addr {
  padding: 12px 14px;
  border-bottom: 1px dashed var(--border-strong);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--primary);
  background: rgba(0, 212, 255, 0.05);
  word-break: break-all;
}
.connect-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.12s;
  min-height: 44px;
}
.connect-menu-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.connect-menu-item.danger:hover {
  background: rgba(255, 51, 68, 0.12);
  color: var(--accent);
}

/* ---------- Wallet picker modal ---------- */
.wallet-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.wallet-modal {
  width: 100%;
  max-width: 440px;
  background: rgba(4, 8, 13, 0.96);
  border: 1px solid var(--primary);
  position: relative;
  box-shadow: 0 0 50px var(--primary-glow), 0 0 100px rgba(0, 212, 255, 0.15);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.wallet-modal::before, .wallet-modal::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--primary);
}
.wallet-modal::before {
  top: -3px; left: -3px;
  border-width: 2px 0 0 2px;
}
.wallet-modal::after {
  bottom: -3px; right: -3px;
  border-width: 0 2px 2px 0;
}

.wallet-modal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0, 212, 255, 0.08);
  border-bottom: 1px solid var(--border-strong);
  font-size: 11px;
  letter-spacing: 1px;
}
.wallet-modal-bar .tbar-title {
  margin-left: 10px;
  color: var(--primary);
  font-weight: 700;
  flex: 1;
}
.wallet-modal-close {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-dim);
  width: 28px; height: 28px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.wallet-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wallet-modal-body {
  padding: 18px 16px;
  overflow-y: auto;
  flex: 1;
}
.wallet-modal-body::-webkit-scrollbar { width: 6px; }
.wallet-modal-body::-webkit-scrollbar-track { background: transparent; }
.wallet-modal-body::-webkit-scrollbar-thumb { background: var(--border-strong); }

.wallet-section {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin: 4px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}
.wallet-section:not(:first-child) { margin-top: 18px; }

.wallet-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  margin-bottom: 6px;
  text-decoration: none;
  transition: all 0.15s;
  min-height: 56px;
}
.wallet-option:hover, .wallet-option:focus-visible {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 12px var(--primary-soft);
  outline: none;
}
.wallet-option:active {
  transform: scale(0.98);
}
.wallet-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 4px;
  object-fit: contain;
  background: var(--bg-soft);
}
.wallet-icon-fallback {
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: var(--bg-soft);
  border: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  color: var(--primary);
  font-size: 16px;
}
.wallet-name {
  flex: 1;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-align: left;
}
.wallet-meta {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.wallet-empty {
  text-align: center;
  padding: 30px 14px;
  color: var(--text-dim);
}
.wallet-empty-meta {
  font-size: 11px;
  margin: 10px 0 18px;
  color: var(--text-dim);
  opacity: 0.7;
}
.wallet-empty-cta {
  display: inline-block;
  color: var(--primary);
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--primary);
  font-size: 11px;
  letter-spacing: 2px;
  transition: all 0.15s;
}
.wallet-empty-cta:hover {
  background: var(--primary);
  color: #000;
}

.wallet-hint {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border-left: 2px solid var(--primary);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
  letter-spacing: 0.5px;
}
.wallet-hint strong {
  color: var(--primary);
  letter-spacing: 1px;
}

.wallet-modal-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border-strong);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.4);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  main { padding: 32px 20px; }
}

@media (max-width: 700px) {
  header { padding: 10px 14px; gap: 8px 14px; }
  .connect-menu { min-width: 200px; right: 0; left: auto; }
  .logo-text { font-size: 11px; letter-spacing: 1.5px; }
  .logo-icon { width: 36px; height: 36px; }
  .page-nav { order: 4; width: 100%; justify-content: center; margin: 4px 0 0; margin-right: 0; gap: 14px; }
  .header-status { order: 3; width: 100%; justify-content: center; font-size: 10px; padding-top: 4px; border-top: 1px dashed var(--border); }
  .btn-glow { min-height: 40px; padding: 10px 16px; font-size: 10px; letter-spacing: 1.5px; }
  main { padding: 20px 12px; }
  .terminal-body { padding: 18px 14px 16px; }
  .qty-big { font-size: 64px; }
  .preset-chips { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .chip { padding: 11px 0; font-size: 11px; min-height: 44px; }
  .qty-selector button { width: 50px; height: 50px; font-size: 22px; }
  .qty-selector input { width: 70px; height: 50px; font-size: 18px; }
  .total-cost .cost-value { line-height: 1.2; }
  .footer-meta { justify-content: center; gap: 10px; font-size: 9px; }
  .log { font-size: 12px; gap: 8px; }
  .lbl { min-width: 84px; font-size: 11px; }
  .val { font-size: 12px; }
  .cost { font-size: 20px; }
  footer { padding: 12px 16px; flex-direction: column; gap: 8px; text-align: center; font-size: 10px; }
  .tbar-clock { display: none; }
  .tbar-title { font-size: 10px; }
  .agents-grid { grid-template-columns: repeat(2, 1fr); max-height: 360px; }
  .dash-stats { grid-template-columns: 1fr; }
  .dash-stat .val-big { font-size: 16px; }
  .btn-execute { padding: 16px; font-size: 12px; letter-spacing: 2.5px; min-height: 52px; }
  .btn-mint { padding: 16px; font-size: 12px; min-height: 52px; }

  /* Larger slider thumb for touch */
  .slider { height: 10px; }
  .slider::-webkit-slider-thumb {
    width: 26px; height: 32px; margin-top: -12px;
  }
  .slider::-moz-range-thumb {
    width: 22px; height: 30px;
  }

  /* Modal full-bleed on mobile */
  .wallet-modal-backdrop { padding: 12px; }
  .wallet-modal { max-height: 92vh; }
  .wallet-modal-body { padding: 14px 12px; }
  .wallet-option { padding: 14px 12px; min-height: 60px; }
  .wallet-name { font-size: 14px; }

  /* Refresh button on dashboard label */
  .refresh-btn { padding: 8px 12px; min-height: 36px; }
}

@media (max-width: 380px) {
  .qty-big { font-size: 54px; }
  .preset-chips { grid-template-columns: repeat(2, 1fr); }
  .agents-grid { grid-template-columns: 1fr; }
  .logo-text { font-size: 10px; }
}

/* Touch-friendly hover/focus on touch devices */
@media (hover: none) {
  .agent-card:hover { box-shadow: none; }
  .wallet-option:hover { background: transparent; }
}
