.account-pane {
  color: #282723;
}

.account-wrap {
  max-width: 40rem;
  margin: 0 auto;
}

.account-wrap .modalTitle:focus {
  outline: none;
}

.account-switch,
.account-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.5rem;
  margin: .4rem 0 1.5rem;
  border-bottom: 1px solid #d8d2c8;
}

.account-switch button,
.account-link,
.password-eye {
  min-height: 2.75rem;
  border: 0;
  background: transparent;
  font: inherit;
  color: #63333d;
  cursor: pointer;
}

.account-switch button {
  position: relative;
  padding: .4rem 0;
  color: #5d5851;
}

.account-switch button[aria-pressed="true"] {
  color: #542632;
  font-weight: 650;
}

.account-switch button[aria-pressed="true"]::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #542632;
  content: "";
}

.account-link,
.password-eye {
  padding: .25rem 0;
  font-size: .9rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.account-links {
  gap: .15rem 1.2rem;
}

.account-links .account-link {
  color: #51483f;
}

.account-form {
  margin-top: 1rem;
}

.account-pane .account-field,
.account-pane .account-input {
  min-width: 0;
  position: relative;
}

.account-pane .account-field label {
  display: block;
  margin: 0 0 .35rem;
  font-size: .94rem;
  font-weight: 600;
}

.account-pane .account-field input,
.account-pane .account-field select {
  min-height: 2.85rem;
  width: 100%;
  margin: 0;
  font-size: 1rem;
}

.account-pane .account-input:has(.password-eye) input {
  padding-inline-end: 5rem;
}

.password-eye {
  position: absolute;
  top: 50%;
  right: .65rem;
  transform: translateY(-50%);
  padding-inline: .25rem;
}

.account-pane [aria-invalid="true"] {
  border-color: #973e49;
}

.account-error,
.account-hint,
.account-message {
  font-size: .875rem;
  line-height: 1.45;
}

.account-error,
.account-hint {
  display: block;
  margin-top: .2rem;
}

.account-error {
  color: #87333f;
}

.account-hint {
  color: #635d55;
}

.account-message {
  padding: .65rem .8rem;
  border-left: 3px solid #733d47;
  background: #f2ece7;
  color: #5c3239;
}

.account-error:empty,
.account-message:empty {
  display: none;
}

.account-preferences {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .8rem;
  margin-top: .55rem;
}

.account-optional,
.account-settings {
  min-width: 0;
  margin: .35rem 0;
  border: 0;
  border-block-start: 1px solid #d8d2c8;
  padding: .7rem 0 0;
}

.account-settings legend {
  padding: 0 .5rem 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.account-optional small {
  color: #635d55;
  font-size: .85rem;
  font-weight: 400;
}

.account-forgot {
  margin: -.5rem 0;
}

.account-submit,
.account-recovery-actions,
.account-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
}

.account-submit {
  margin-top: .4rem;
}

.account-pane button:disabled {
  cursor: wait;
  opacity: .7;
}

.account-intro {
  max-width: 38ch;
}

.account-code {
  justify-content: space-between;
  margin: 1.2rem 0;
  padding: .65rem .85rem;
  border: 1px solid #d3c9bc;
  background: #f1ece3;
}

.account-code code {
  min-width: 0;
  color: #50343b;
  font: 600 1.08rem/1.5 ui-monospace, monospace;
  letter-spacing: .045em;
  overflow-wrap: anywhere;
  user-select: all;
}

@media (max-width: 560px) {
  .account-pane .account-form,
  .account-preferences {
    grid-template-columns: 1fr;
  }

  .account-submit .btn,
  .account-recovery-actions .btn {
    flex: 1 1 auto;
  }
}
