.account-page::before { opacity: .38; }

.balance-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(min-content, 1fr) auto minmax(0, 1fr);
  align-items: start;
  justify-items: center;
  row-gap: 1rem;
}

.account-main {
  --account-gold: #dfc79b;
  width: min(100% - 2.5rem, 27rem);
  padding: clamp(2rem, 9vh, 6rem) 0 2.5rem;
}

.account-main h1 { font-size: clamp(2.7rem, 7vw, 3.9rem); }

.account-panel {
  margin-top: 1.2rem;
  overflow-wrap: anywhere;
  padding: clamp(1rem, 4vw, 1.4rem);
  border: 1px solid #39382f;
  border-radius: .55rem;
  background: #121310;
}

.account-panel h2 {
  margin: 0;
  font: 400 clamp(1.65rem, 5vw, 2.1rem)/1.15 var(--serif);
  letter-spacing: -.04em;
}

.account-panel > p, .account-note, .account-hint { color: var(--muted); }
.account-panel strong, .account-panel code { color: var(--paper); }

.balance-notice {
  grid-row: 2;
  width: min(100% - 2.5rem, 25rem);
  padding: 0;
  text-align: center;
}

.balance-notice .account-panel {
  margin: 0;
  padding: 1.6rem 1.25rem;
}

.balance-notice h1 {
  font: 600 clamp(1rem, 2.5vw, 1.2rem)/1.4 var(--sans);
  letter-spacing: normal;
}

.balance-notice .account-primary { margin-top: 1rem; }

.account-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .2rem;
  padding: .25rem;
  border: 1px solid #38382e;
  border-radius: .38rem;
  background: #0b0c0a;
}

.account-modes button {
  min-height: 42px;
  border: 0;
  border-radius: .25rem;
  background: transparent;
  color: var(--muted);
  font-size: .93rem;
}

.account-modes button[aria-pressed="true"] {
  background: #29271e;
  color: var(--paper);
}

.account-modes button:hover { color: var(--paper); }

#account-fields, .account-fields {
  display: grid;
  margin: .8rem 0 0;
  padding: 0;
  border: 0;
}

#account-fields label, .account-fields label {
  margin: .6rem 0 .3rem;
  color: var(--paper);
  font-weight: 600;
  font-size: .93rem;
}

#account-fields input, #account-fields textarea, .account-fields input[type="password"] {
  min-height: 44px;
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #555145;
  border-radius: .33rem;
  background: #090a08;
  color: var(--paper);
}

#account-fields textarea { font: inherit; resize: vertical; }

.recover-link {
  padding: .35rem 0 0;
  margin-top: .65rem;
  border: 0;
  background: transparent;
  color: var(--account-gold);
  text-decoration: underline;
}

.account-panel > .account-phrase {
  padding: .85rem;
  border: 1px solid #555145;
  border-radius: .33rem;
  background: #090a08;
  color: var(--paper);
  font: 1rem/1.7 monospace;
  user-select: text;
}

.phrase-confirmation {
  display: flex;
  gap: .55rem;
  align-items: center;
}

.phrase-confirmation input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  accent-color: var(--account-gold);
}

.account-primary, .account-secondary {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  padding: .5rem .78rem;
  border: 1px solid transparent;
  border-radius: .33rem;
  font-weight: 650;
}

.account-primary { background: var(--account-gold); color: #21190f; }
.account-primary:hover { background: #ebd8b6; }
.account-secondary { border-color: #555145; background: transparent; color: var(--paper); }
.account-secondary:hover { border-color: var(--account-gold); }
.account-primary:disabled, .account-secondary:disabled { opacity: .58; cursor: not-allowed; }
.account-primary[aria-busy="true"] { cursor: wait; }
#account-submit { margin-top: 1rem; }

#account-pin, #account-new-pin {
  font-variant-numeric: tabular-nums;
  letter-spacing: .12em;
}

.account-hint { margin: .32rem 0 0; font-size: .875rem; }
.account-message { margin: .7rem 0 0; color: #efc7a0; }
.account-message:empty { margin: 0; }

.profile-identity {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.profile-identity img {
  width: 4rem;
  height: auto;
  border: 1px solid #504736;
  border-radius: .45rem;
  background: #0a0b09;
}

.profile-identity .account-hint { margin: 0 0 .18rem; }
.profile-joined { margin: .85rem 0; }
.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}

.profile-wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: 1rem;
  padding: .8rem 0;
  border-block: 1px solid #39382f;
}

.profile-wallet .account-hint { margin: 0; }
.profile-wallet strong {
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}

.deposit-form label, .withdraw-form .deposit-amounts label { display: block; margin-bottom: .4rem; }
.deposit-form .account-primary { margin-top: .85rem; }

.deposit-amounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.deposit-amounts input { width: 100%; }
#deposit-rate { margin-top: .6rem; }

.deposit-input {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.deposit-amounts input, .deposit-input input, .withdraw-form input {
  min-width: 0;
  min-height: 44px;
  padding: .55rem .7rem;
  border: 1px solid #555145;
  border-radius: .33rem;
  background: #090a08;
  color: var(--paper);
  font: inherit;
}

.deposit-input input { flex: 1 1 12rem; }
.deposit-input .deposit-address { font: .84rem/1.25 monospace; }
.deposit-details { margin-top: .7rem; padding-top: .75rem; border-top: 1px solid #39382f; }
.deposit-details label { display: block; margin: .65rem 0 .35rem; }
.deposit-row { display: flex; justify-content: space-between; gap: .6rem; }
.deposit-state { font-size: .875rem; color: var(--muted); }
.deposit-review { color: #efc7a0; }
.deposit-checkout {
  display: inline-block;
  margin-top: .5rem;
  color: var(--account-gold);
  text-decoration: underline;
  text-underline-offset: .17em;
}

.withdraw-form {
  display: grid;
  gap: .45rem;
}

.withdraw-form label:not(:first-child) { margin-top: .4rem; }
.withdraw-form .account-primary { justify-self: start; margin-top: .45rem; }
.withdraw-details { margin: .7rem 0 0; }
.withdraw-details dt { margin: .65rem 0 .25rem; color: var(--muted); font-size: .875rem; }
.withdraw-details dd { margin: 0; }
