.hero-actions {
  position: absolute;
  top: 24px;
  right: 4%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-actions > .scene-enter {
  position: static;
  margin: 0;
}

.wallet-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  height: 58px;
  min-height: 58px;
  width: auto;
  margin: 0;
  padding: 0 21px;
  border: 1px solid #ba95ee70;
  border-radius: 100px;
  background: linear-gradient(115deg, #201032ed, #120d1be8);
  box-shadow: 0 8px 30px #07020f30, inset 0 1px 0 #ffffff0b;
  color: #f3eafa;
  font: 500 13px/1.2 'DM Sans', Arial, sans-serif;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.wallet-button .wallet-icon {
  display: block;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  color: #c6a4f5;
}

.wallet-button .wallet-button-label {
  margin: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.wallet-button:hover:not(:disabled) {
  border-color: #d4b4ff;
  background: #281939;
  box-shadow: 0 8px 30px #07020f40, 0 0 25px #b28aff18;
}

.wallet-button.is-connected {
  border-color: #79dcb14d;
  background: linear-gradient(115deg, #142522ed, #14121be8);
  color: #d9f3e8;
}

.wallet-button.is-connected::before {
  content: '';
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #79dcb1;
  box-shadow: 0 0 10px #79dcb133;
}

.wallet-button.is-connected .wallet-icon { color: #96dabb; }
.wallet-button.is-connected:hover:not(:disabled) { border-color: #79dcb199; background: #1b2d27; }

.terminal-top { flex-wrap: wrap; }
.terminal-top > :first-child { min-width: 0; }
.terminal-top-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 18px; margin-left: auto; }
.terminal-top-actions > .connection { margin: 0; }
.terminal-top .wallet-button { height: 40px; min-height: 40px; padding: 0 15px; gap: 8px; border-radius: 7px; font-size: 11px; box-shadow: inset 0 1px 0 #ffffff08; }
.terminal-top .wallet-button .wallet-icon { width: 15px; height: 15px; }

dialog.wallet-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  width: 430px;
  min-width: 0;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  margin: auto;
  padding: 26px;
  border: 1px solid #b28aff40;
  border-radius: 20px;
  background: radial-gradient(ellipse at 100% 0, #69399524, transparent 62%), #151019;
  box-shadow: 0 30px 100px #0009, inset 0 1px 0 #ffffff08;
  color: #f2eaf8;
  font: 13px/1.5 'DM Sans', Arial, sans-serif;
  letter-spacing: 0;
  text-align: left;
  overscroll-behavior: contain;
  color-scheme: dark;
}

.wallet-dialog::backdrop {
  background: #08050fb3;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.wallet-dialog[open] { animation: wallet-appear .18s ease-out; }
.wallet-dialog *, .wallet-dialog *::before, .wallet-dialog *::after { box-sizing: border-box; }
.wallet-dialog [hidden] { display: none !important; }
.wallet-dialog .wallet-dialog-head { position: static; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; height: auto; margin: 0; padding: 0; border: 0; }
.wallet-dialog .wallet-eyebrow { display: block; margin: 0 0 9px; color: #b292d9; font-size: 9px; line-height: 1.4; font-weight: 600; letter-spacing: 1.7px; text-transform: uppercase; }
.wallet-dialog h2#wallet-title { margin: 0; color: #f6eefb; font: 500 27px/1.2 'Space Grotesk', Arial, sans-serif; letter-spacing: -.8px; }
.wallet-dialog .wallet-intro { margin: 15px 0 22px; color: #aba0b7; font-size: 12px; line-height: 1.75; letter-spacing: 0; }

.wallet-dialog button {
  appearance: none;
  width: auto;
  margin: 0;
  border: 1px solid #b28aff38;
  border-radius: 8px;
  background: #21172c;
  color: #d7bff4;
  font: 500 12px/1.4 'DM Sans', Arial, sans-serif;
  letter-spacing: 0;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.wallet-dialog button:hover:not(:disabled) { border-color: #b28aff80; background: #30203f; color: #f5eafb; }
.wallet-dialog button.wallet-close { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; padding: 0; border-color: #b28aff20; border-radius: 50%; background: #211928; color: #b6a3c9; font: 400 23px/1 Arial, sans-serif; }
.wallet-dialog #wallet-options { display: grid; gap: 9px; margin: 0; }
.wallet-dialog button.wallet-option { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 72px; padding: 14px; border-color: #b28aff2e; border-radius: 11px; background: #1d1624; text-align: left; }
.wallet-dialog .wallet-option > svg, .wallet-dialog .wallet-option > img { display: block; width: 36px; height: 36px; flex-shrink: 0; padding: 8px; border: 1px solid #b28aff25; border-radius: 10px; background: #2e203d; color: #c2a0ed; object-fit: contain; }
.wallet-dialog .wallet-option > div { flex: 1; min-width: 0; }
.wallet-dialog .wallet-option strong { display: block; overflow-wrap: anywhere; color: #eee3f7; font-size: 13px; font-weight: 600; line-height: 1.4; }
.wallet-dialog .wallet-option small { display: block; margin-top: 3px; color: #9988aa; font-size: 10px; line-height: 1.5; }
.wallet-dialog .wallet-option > .arrow, .wallet-dialog .wallet-option > span:last-child { flex-shrink: 0; margin-left: auto; color: #ab8ec9; font-size: 18px; }

.wallet-dialog #wallet-account { padding: 18px; border: 1px solid #79dcb12b; border-radius: 12px; background: linear-gradient(135deg, #79dcb108, transparent 70%), #19151e; }
.wallet-dialog .wallet-account-label { display: block; margin: 0 0 8px; color: #91b9a8; font-size: 9px; line-height: 1.5; letter-spacing: 1.3px; text-transform: uppercase; }
.wallet-dialog #wallet-provider { margin: 0 0 9px; color: #eee3f7; font-size: 13px; font-weight: 600; line-height: 1.5; }
.wallet-dialog code#wallet-address { display: block; width: 100%; margin: 0; padding: 11px 12px; border: 1px solid #b28aff1c; border-radius: 7px; background: #100e14; color: #c4b4d5; font: 11px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; white-space: normal; }
.wallet-dialog #wallet-network { margin: 11px 0 0; color: #a39aaa; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.wallet-dialog .wallet-account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.wallet-dialog .wallet-account-actions button { flex: 1; min-height: 38px; padding: 9px 12px; white-space: nowrap; font-size: 11px; }
.wallet-dialog button#wallet-disconnect { border-color: #a783ad2e; background: transparent; color: #ba9ebd; }
.wallet-dialog button#wallet-disconnect:hover:not(:disabled) { border-color: #dc96b35c; background: #341f2a; color: #e5b8ce; }
.wallet-dialog #wallet-status { min-height: 0; margin: 14px 0 0; color: #c7aedf; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.wallet-dialog #wallet-status:empty { display: none; }
.wallet-dialog #wallet-status[data-state='error'], .wallet-dialog #wallet-status.error { color: #eeabbc; }
.wallet-dialog #wallet-status[data-state='success'] { color: #96dabb; }
.wallet-dialog #wallet-empty { padding: 19px; border: 1px dashed #b28aff40; border-radius: 12px; background: #1b1422; }
.wallet-dialog #wallet-empty p { margin: 0; color: #b2a1c1; font-size: 12px; line-height: 1.75; }
.wallet-dialog button#wallet-retry { min-height: 38px; margin-top: 15px; padding: 9px 14px; font-size: 11px; }
.wallet-dialog .wallet-footnote { margin: 21px 0 0; padding-top: 17px; border-top: 1px solid #b28aff1c; color: #8e7e9d; font-size: 10px; line-height: 1.75; letter-spacing: 0; }
.wallet-dialog .wallet-footnote a { color: #c9aceb; text-underline-offset: 3px; }
.wallet-button:focus-visible, .wallet-dialog button:focus-visible, .wallet-dialog a:focus-visible { outline: 2px solid #d6b9ff; outline-offset: 4px; }
.wallet-button:disabled, .wallet-dialog button:disabled { opacity: .55; cursor: wait; }

@keyframes wallet-appear {
  from { opacity: 0; transform: translateY(6px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1200px) {
  .terminal-top { gap: 16px; }
  .terminal-top-actions { gap: 12px; }
}

@media (max-width: 520px) {
  dialog.wallet-dialog { padding: 23px 20px; border-radius: 17px; }
  .wallet-dialog h2#wallet-title { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .wallet-dialog[open] { animation: none; }
  .wallet-button, .wallet-dialog button { transition: none; }
}
